Shop OBEX P1 Docs P2 Docs Learn Events
WiFi & IOT for home controllers/monitors using WR703N $20 routers and xx-WRT - Page 5 — Parallax Forums

WiFi & IOT for home controllers/monitors using WR703N $20 routers and xx-WRT

1235719

Comments

  • Heater.Heater. Posts: 21,230
    edited 2014-07-19 10:24
    Cluso,

    I had a quick look underneath yesterday, only a sprinkling of teensy little Cs and Rs as far as I can tell. No big chips.

    Now that I think about it those chips I mentioned do look like RAM and FLASH. I have never seen a SoC that did not come with dozens of pins down all four sides or BGA. I guess the SoC is in that can.

    I'm busy connecting that header up to a prop-plug as we speak so I can get the console up in a terminal on the PC. The pin out is on the OpenWRT web page for this machine. I would feel better having a console before try any firmware changes.

    I wonder if OpenWRT is of much practical use on the Pi. I'm might give it a go later.

    It's best to stay away from all that Windows pain.

    Aside: Whilst I have the soldering iron out I have done my first ever SMT soldering job. A few dozen SMT white LEDs and resistors. I went surprisingly easily with no magnifier or even tweezers. I guess those Rs are quite big for SMT. Might even be less bother than messing around with through hole. I'l have to try some SMT chips next. What sort of lead pitch can people get down to without microscopes and such?
  • Heater.Heater. Posts: 21,230
    edited 2014-07-19 11:13
    Yay it speaks:
    # cat /proc/cpuinfo
    system type             : Ralink SoC
    processor               : 0
    cpu model               : MIPS 24K V4.12
    BogoMIPS                : 255.48
    wait instruction        : yes
    microsecond timers      : yes
    tlb_entries             : 32
    extra interrupt vector  : yes
    hardware watchpoint     : yes
    ASEs implemented        : mips16 dsp
    VCED exceptions         : not available
    VCEI exceptions         : not available
    
    
    # uname -a
    Linux DIR-615 2.6.21 #1 Wed Oct 22 15:49:36 CST 2008 mips unknown
    # ps -A
      PID  Uid     VmSize Stat Command
        1 0           152 S   init
        2 0               SWN [ksoftirqd/0]
        3 0               SW< [events/0]
        4 0               SW< [khelper]
        5 0               SW< [kthread]
       22 0               SW< [kblockd/0]
       33 0               SW  [pdflush]
       34 0               SW  [pdflush]
       35 0               SW< [kswapd0]
       36 0               SW< [aio/0]
      625 0               SW  [mtdblockd]
      672 0           476 S   xmldb -n wrgn22_dlwbr_dir615 -t
      806 0           288 S   syslogd -F sysact -F attack -F notice
      809 0           168 S   klogd -l br0 -w eth2.2
      840 0           204 S   sh /var/run/http-loop.sh
      849 0           276 S   fresetd
      862 0           260 S   scheduled
      866 0           680 S   httpd -s wrgn22_dlwbr_dir615 -f /var/etc/httpd.cfg
      928 0           288 S   udhcpd /var/run/udhcpd-br0.conf
      929 0           236 S   dhcpxmlpatch -f /var/run/udhcpd-br0.lease
      976 0           416 S   hostapd /var/run/hostapd.ra0.conf
      977 0           240 S   wlxmlpatch -S ra0 /runtime/stats/wireless RADIO_ON RA
     1066 0           208 S   portt
     1125 0           324 S   dnrd -c off
     1136 0           196 S   telnetd -l /usr/sbin/login -u Alphanetworks:wrgn22_dl
     1304 0           292 S   udhcpc -i eth2.2 -p /var/run/udhcpc-eth2.2.pid -H DIR
     1319 0           332 S   lld2d -c /var/lld2d.conf br0 ra0
     1334 0           244 S   neaps -i br0 -c /var/run/neaps.conf
     1390 0           272 S   igmpproxy -c /var/run/igmpproxy.conf -s /etc/template
     1406 0           288 S   -sh
     1600 0           160 R   ps -A
    #
    
  • Heater.Heater. Posts: 21,230
    edited 2014-07-19 12:37
    Yay, the OpenWRT brain transplant seems to have worked! At least ethernet is functioning. No idea about WIFI. Do I have to install that WEB GUI to set this up? What's the procedure?
    BusyBox v1.22.1 (2014-07-11 15:16:08 CEST) built-in shell (ash)Enter 'help' for a list of built-in commands.
    
    
      _______                     ________        __
     |       |.-----.-----.-----.|  |  |  |.----.|  |_
     |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
     |_______||   __|_____|__|__||________||__|  |____|
              |__| W I R E L E S S   F R E E D O M
     -----------------------------------------------------
     BARRIER BREAKER (14.07-rc1, r41580)
     -----------------------------------------------------
      * 1/2 oz Galliano         Pour all ingredients into
      * 4 oz cold Coffee        an irish coffee mug filled
      * 1 1/2 oz Dark Rum       with crushed ice. Stir.
      * 2 tsp. Creme de Cacao
     -----------------------------------------------------
    root@OpenWrt:/# ping 192.168.0.2
    PING 192.168.0.2 (192.168.0.2): 56 data bytes
    ping: sendto: Network is unreachable
    root@OpenWrt:/# [   65.910000] rt305x-esw 10110000.esw: link changed 0x00
    [   70.940000] rt305x-esw 10110000.esw: link changed 0x01
    
    
    root@OpenWrt:/# ping 192.168.1.213
    PING 192.168.1.213 (192.168.1.213): 56 data bytes
    64 bytes from 192.168.1.213: seq=0 ttl=64 time=0.738 ms
    64 bytes from 192.168.1.213: seq=1 ttl=64 time=0.685 ms
    64 bytes from 192.168.1.213: seq=2 ttl=64 time=0.667 ms
    ^C
    --- 192.168.1.213 ping statistics ---
    3 packets transmitted, 3 packets received, 0% packet loss
    round-trip min/avg/max = 0.667/0.696/0.738 ms
    root@OpenWrt:/#
    
    
    

    Now I'm a bit worried that I forgotten which image I used. I have both dir-300-b1 and -dir-615-d images here. As I tried the upload it did not want to start, I started to worry this was not going to work, I tried again, and again, with the different files, all of a sudden it sucked one down. But which one? I think it was the 615-Dd.

    Anyway, I'm going to get me a beer to celebrate and think about what comes next. Where are those GPIO's?
  • Heater.Heater. Posts: 21,230
    edited 2014-07-19 12:49
    Ah, it seems that out of the box there is not even a web server running:
    root@OpenWrt:/# ps
      PID USER       VSZ STAT COMMAND
        1 root      1356 S    /sbin/procd
        2 root         0 SW   [kthreadd]
        3 root         0 SW   [ksoftirqd/0]
        4 root         0 SW   [kworker/0:0]
        5 root         0 SW<  [kworker/0:0H]
        6 root         0 SW   [kworker/u2:0]
        7 root         0 SW<  [khelper]
        8 root         0 SW   [kworker/u2:1]
       60 root         0 SW<  [writeback]
       62 root         0 SW<  [bioset]
       64 root         0 SW<  [kblockd]
       93 root         0 SW   [kswapd0]
      140 root         0 SW   [fsnotify_mark]
      217 root         0 SW<  [deferwq]
      275 root         0 SWN  [jffs2_gcd_mtd5]
      352 root       888 S    /sbin/ubusd
      353 root      1484 S    /bin/ash --login
      510 root         0 SW<  [cfg80211]
      514 root         0 SW   [kworker/0:2]
      592 root      1048 S    /sbin/logd -S 16
      626 root      1544 S    /sbin/netifd
      650 root      1184 S    /usr/sbin/odhcpd
      687 root      1148 S    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p
      705 root      1476 S    /usr/sbin/telnetd -F -l /bin/login.sh
      729 root      1480 S    /usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org -p 1.ope
      778 root      1480 S    udhcpc -p /var/run/udhcpc-eth0.2.pid -s /lib/netifd/
      827 nobody     980 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf -k
      888 root      1480 R    ps
    
    
    
  • Heater.Heater. Posts: 21,230
    edited 2014-07-19 13:48
    This is looking to good too be true. I just found the magic command to turn on the wireless.
    uci set wireless.@wifi-device[0].disabled=0; uci commit wireless ; wifi
    
    From here http://wiki.openwrt.org/doc/uci/wireless

    No idea how well it works but my phone finds and connects to it. This thing is not on the net so that is as far as it goes.
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-07-19 18:19
    heater,

    a few posts back i wrote what ji found was required to turn wifi on with settings in /etc/wireless and /etc/network.
    These worked partiallybecause i could wifi connect using chrome (because if i needed to change settings i didnt want to do it to ie or firefox) and 192.168.1.1 which cameup with root logon.

    you are making good progress tho.

    smt only takes practice. i have a jewelers pair of magnifying goggles which reallyhelps. i can hand solder to 0.5mm pitch reliably. i also have an ir rework station and ir oven which helps for my volume boards. but i have hand soldered thm all too.

    if you feel like it yiu could look under the frame for the cpu chip.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-07-19 21:22
    OK, What exactly is it that you guys are trying to do here? I have an older Linksys router that I am not doig anything with and might want to follow along.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-19 23:59
    What are we trying to do?

    A. Cluso desires to make WR703N devices that can work independently with their existing GPIO and/or interface via RS232 serial to communicate and /or down load Propeller binaries into Propellers.

    B. Loopy (thats me) desires to make a MR3020 device pretty much the same, though I could stop at just having RS232 to Tachyon and not deploy the Reset which demands a GPIO pin configuration.

    C. Heater desires to load OpenWRT on his DIR-615 and ???????????? Heater's DIR-615 can support a serial link, but no USB port is included. This limits one dimension of expansion.

    +++++++++++++++++
    The main point.
    The WR703N and MR3020 are quite similar tiny 'portable routers' that have a wifi, one LAN, and a USB port (apparently host) installed (and very cheap at less that $20USD). They are low power at about 0.6 watts at 5v or less inputs. So they may permit an Internet of Things with wifi used in lieu of wire for nodes of control.

    It seems the first Milestone is very close.

    Milestone One - wifi to an RS232 that is Tx/Rx only for serial comms to and from a Propeller

    Milestone Two - wifi to an RS232 that is Tx/Rx with Reset to support the loading of binary 32K files into the Propeller.

    Interim By-product of Milestone Two - inclusion of scripts to directly control available GPIO remotely without a Propeller attached.

    Other - Create an SPI or I2C interface from available GPIO to attach to sensors or output devices as one wishes.

    NOTE -- 3G and 4G devices seem capable of working with the WR703N and MR3020 via a USB Modem device integration. For touchpad and smart phone enthusiast, this might be a strongly preferred configuration.

    (OpenWRT does support development and use of such, but I personally don't own any. Nonetheless, developing their use is very welcome.)

    ++++++++++
    Here is a link to a "Milestone One type" MR3020 hacker...
    http://morethanuser.blogspot.tw/2012/10/rs232-on-openwrt-mr3020.html
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-20 00:45
    For all that have gotten OPENwrt installed...

    basic.config will tell you everything you should be doing next.
    It also explains that there is NO password until you install one and no wifi untill you reconfigure.

    http://wiki.openwrt.org/doc/howto/basic.config

    +++++++++++++++++++++++++

    After all the basics are satisfactory..............

    Opkg is the Package Repository format and resident means to install more features. Don't bother with executable files or FTP transfers.

    http://wiki.openwrt.org/doc/techref/opkg

    In fact, for installing Propeller binaries, it just may be much more reasonable to use XModem, YModem, ZModem, or Kermit to transfer binary files into your OpenWRT device.

    ++++++++++++++
    Advanced packages.
    It seems quite obvious that at least ONE package is going to have to be compiled from C code to install a command line Propeller binary loader.

    http://wiki.openwrt.org/doc/packages
    http://wiki.openwrt.org/doc/packages#creating.custom.packages
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 02:07
    NWCCTV,
    OK, What exactly is it that you guys are trying to do here?
    In short, if you have a Propeller powered gadget and you want to get it talking to the internet over WIFI what do you do?

    You could get a WIFI module like this: http://www.adafruit.com/products/1469 which is nice.

    Or you could use that 20 dollar WIFI router box that's been kicking around the house doing nothing for ages. Which potentially has some advantages, especially if it has GPIO pins available, or USB, or SD card.

    Or what about this, you have d-link router that is in use for you LAN. Well perhaps maybe you can attach a Propeller to that "live" box and have it do something useful. Like drive displays indicating packet counts, network speed, strange network activity, whatever.

    The router is a Linux running ARM machine with a bit of free space so you can add your own software to it to do such things.


    Anyway, me, I just got intrigued by what these guys were up to and as I had an old unused d-link router decided to see what could be done with it. Just playing. Turns out it may have a positive outcome already. The same kind of d-link is currently running my home connection and the damn thing needs rebooting every day to when it decides not to serve up DHCP. May be OpenWRT would ease that annoyance.

    Do you know what model and version is your Linksys router? Can you find it in the list of supported devices here: http://wiki.openwrt.org/toh/start If so you may be in luck.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-20 02:41
    Okay, I am still targeting MilestoneONE and the WR703N and MR3020 devices in particular.

    There are claims that the WR703N was made ONLY for the China market and TP-Link's English language website seems to support that observation. The MR3020 does exist at the TP-Link's English language web site and I ended up with one because it was an easy local purchase for less than $20USD.

    Adafruit has a 802.11/g version device, the TP-link devices are 802.11/n for a bit more performance, a bit less cost and so on. I don't want to go PRO and CON on this... just want to assert the threads title is WR703N devices. The MR3020 is a closely related one that might be easier to acquire.

    Other wifi routers can diverge widely in terms of your personal preferences and help along the way.

    ~~~~~~~~~~~~~~~~
    Staying on track with Milestone ONE. I have been searching the Web to see what others have actually done, if they have a successful solution method that might just be followed, and what are the perceived snags (real and unreal).

    Please read the attached. It focuses on Milestone ONE and not the preliminary OPENwrt learning curve. Obviously these are two separate targets and some of you might just not want to participate in the Milestones ONE and TWO. Afterall, just hacking a Linux router can go in many many directions.

    BTW, at least one person claims to have gotten a WR703N or MR3020 to work as a solar powered wifi node. This in and of itself is a very interesting application.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-20 02:57
    Heater. wrote: »
    Turns out it may have a positive outcome already. The same kind of d-link is currently running my home connection and the damn thing needs rebooting every day to when it decides not to serve up DHCP. May be OpenWRT would ease that annoyance.

    I love it. Open source revives a device that has a proprietary bug issue. That is just another reason to explore Linux router hacks.

    My Asus WL-500g Premium router has long been loaded with open-source Linux and performing fine. Added to that, it can do far more than any packaged firmware every offered. I did look at these things and considered adding this or that feature, but in the end.. most of us just want a router than is reliable and works in the background.

    Wifi nodes are a whole different topic and these silly little devices just happen to be called wifi routers. But to me, they are more of an adapter than a router.
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 03:02
    Yay, another small break through. That 615-d image that I built from the "Bleeding Edge" source of OpenWRT loads and runs just fine on my box.

    We have a working build system!
    BusyBox v1.22.1 (2014-07-19 03:31:09 EEST) built-in shell (ash)
    Enter 'help' for a list of built-in commands.
    
    
      _______                     ________        __
     |       |.-----.-----.-----.|  |  |  |.----.|  |_
     |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
     |_______||   __|_____|__|__||________||__|  |____|
              |__| W I R E L E S S   F R E E D O M
     -----------------------------------------------------
     BARRIER BREAKER (Bleeding Edge, r41737)
     -----------------------------------------------------
      * 1/2 oz Galliano         Pour all ingredients into
      * 4 oz cold Coffee        an irish coffee mug filled
      * 1 1/2 oz Dark Rum       with crushed ice. Stir.
      * 2 tsp. Creme de Cacao
     -----------------------------------------------------
    root@OpenWrt:/# [   77.270000] rt305x-esw 10110000.esw: link changed 0x00
    [  103.250000] rt305x-esw 10110000.esw: link changed 0x01
    
    
    root@OpenWrt:/# ping 192.168.1.213
    PING 192.168.1.213 (192.168.1.213): 56 data bytes
    64 bytes from 192.168.1.213: seq=0 ttl=64 time=0.720 ms
    64 bytes from 192.168.1.213: seq=1 ttl=64 time=0.683 ms
    64 bytes from 192.168.1.213: seq=2 ttl=64 time=0.647 ms
    64 bytes from 192.168.1.213: seq=3 ttl=64 time=0.644 ms
    
    Loopy,

    I'm not sure why one would want to mess with XModem and friends when we have scp available out of the box.

    We don't need to make actual OpenWRT packages to build and run our own code. I would not bother unless whatever it is is generally useful, many people want it and you want to support and maintain it.

    Interesting thing about you said about creating a SPI or I2C interface from available GPIO, in the opemwrt pages they mention a kernel module that does exactly that, i2c_gpio_custom/w1_gpio_custom, so far I have not found any sign of those in the openwrt source tree I have here. The only kernel modules that look like using gpio I can find so far are leds_gpio and gpio-button-hotplug.

    SPI or I2C would certainly open up a world of possibilities.

    Progress is going too halt here for a while. I need to get that box on the internet and I can't do that without disrupting the network here, which is more than my life is worth.
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 03:17
    Loopy,
    I love it. Open source revives a device that has a proprietary bug issue.
    Well, let's see if it does that first. But yes, my d-links were only bought a couple of years ago but they contain firmware from 2008!


    That's OK, you might think, just upgrade the firmware to the latest revision.


    Nope, despite the router having a web interface for firmware upgrade there is no later firmware for this box available from d-link. What a crock. It's basically a pile of unsupported junk that d-link pushes out the door, takes the money for and then forgets all about.


    I have always wondered why a box with two ports is called a router. You can't exactly route with only two ports.
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 03:31
    Loopy,

    Had a look at your milestone text. TL;DR and full of too many links to mess with.

    But I did spot the mention of ser2net. What a blast from the past. It's small, simple and cool, you might like it. It just accepts network connections and relays whatever comes in to a serial port, and vice versa. Quite useful if timing is not an issue. Would be great for chatting to your Forth engines, not likely to work for any kind of Prop programming.
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 03:37
    Cluso,

    That metal can appears to be soldered down very well to the PCB. There is a solder fillet running all around between it and the PCB.

    I could get it off for a look underneath but the way I do such things the board is unlikely to ever work again!
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 04:42
    Yay, another small breakthrough.

    I though I'd have to unplug my live router and plug the OpenWRT router to the internet. No can do because everyone would object at the outage.

    But, the openwrt router operates a LAN on 192.168.1.0 as opposed to the original 192.168.0.0. So why not just chain them together?

    Sure enough it works. OpenWRT router => Old D-Link router => the internet.

    I tried to install luci with ssl support but it failed due to lack of space in the router file system. Regular luci is now running nicely. SSH works. scp works. WIFI works. Serial port works. Not bad so far.

    The only strange thing is that the internet connection LED never lights up! But hey, we need a spare GPIO right?
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-07-20 05:10
    my xoom isbeing frustrating tonight - 3rd attempt to post!

    heater, fantastic progress. I am after putting my 703 router on my main router/internet (my hotspot) as you have done. Could you please post your /etc/wireless file?
    Packaging serial data to/from the internet is another requirement of mine. seems it might be easier than first thought
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 05:32
    Cluso,

    Yep, I'm pretty much convinced it's time to brain transplant the main household router.

    I have just been dicking around with the admin/system/leds page in LUCI. Turns out that you can do odd things like assigning LEDS to different functionality. For example, selecting a LED and connecting it to a timer gets you a LED flashing at about 1Hz. Connecting it to a PWM gets you a half brightness LED. Or there is just "default on".

    So now I have my WAN lamp flashing amber and also that other red LED that I never figured out was for:)

    Somehow whilst doing that the internet access light started working!

    What I had not remembered is that some of these LEDs are at least bi-colour so we must be able to repose one colour without missing much.

    I did not do anything in the WIFI configuration yet except hit the ENABLE button in LUCI. Here is my current /etc/etc/wireless:
    config wifi-device 'radio0'
            option type 'mac80211'
            option channel '11'
            option hwmode '11g'
            option path '10180000.wmac'
            option htmode 'HT20'
    
    
    config wifi-iface
            option device 'radio0'
            option network 'lan'
            option mode 'ap'
            option ssid 'OpenWrt'
            option encryption 'none'
    

    It looks like what I got when I enabled WIFI from the command line before I had LUCI:
    uci set wireless.@wifi-device[0].disabled=0; uci commit wireless ; wifi
    
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-20 05:39
    Heater. wrote: »
    Loopy,

    Had a look at your milestone text. TL;DR and full of too many links to mess with.

    But I did spot the mention of ser2net. What a blast from the past. It's small, simple and cool, you might like it. It just accepts network connections and relays whatever comes in to a serial port, and vice versa. Quite useful if timing is not an issue. Would be great for chatting to your Forth engines, not likely to work for any kind of Prop programming.

    Forth is Propeller programming, just not the way you prefer.

    About SER2NET....
    Yes this might be the most direct for a wifi to serial link to at least communicate with the Propeller. That would be pretty much what MILESTONE ONE desires, and possibly less troublesome that have STTY and Picocom (or Mincom) inside the WR703N.

    http://linux.die.net/man/8/ser2net

    Progress Report
    ++++++++++++++++
    Mostly I have been spending the afternoon studying OPKG on Openwrt. As the stty, Picocom, and Minicom packages are available (previdously checked)
    There are a lot of package choices and SER2NET might be a very good alternative in an available package, but so far it seems others haven't gotten it right.
    https://forum.openwrt.org/viewtopic.php?id=27139
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-20 05:48
    Cluso99 wrote: »
    my xoom isbeing frustrating tonight - 3rd attempt to post!

    heater, fantastic progress. I am after putting my 703 router on my main router/internet (my hotspot) as you have done. Could you please post your /etc/wireless file?
    Packaging serial data to/from the internet is another requirement of mine. seems it might be easier than first thought

    Wifi is NOT active upon loading OpenWRT. The basic.config explains how to get it running.
    http://wiki.openwrt.org/doc/howto/basic.config

    I haven't gotten mine up yet as I spent a bit of time today reviewing VI commands.... after you edit, you have to issue a :wq to commit the change to the file, AND then reboot the WR703N.
    This will be gotten to soon ... later today.
    I am pretty much reading everything 3 times before I do something... due to past frustrations.
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 05:51
    Grrr...the d-link has 4MB of FLASH of which only 148K is now free. No wonder LUCI with SSL did not fit!

    This might make it a bit hard to add a Propeller loader.

    But wait....it also has 32MB of RAM which is being used as tmpfs. A giant RAM disk. That's huge!

    So as long as power is not removed there is a huge amount of space for adding all kinds of things.

    We could of course add a little program that sucks down software from somewhere on the net and puts it into /tmp at boot up. Easy.

    Edit: Of course there is already such a program on the router, wget. It just needs a little script to kick it off at start up.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-20 05:55
    Heater. wrote: »
    I'm not sure why one would want to mess with XModem and friends when we have scp available out of the box.

    Why, Xmodem? For file transfers through a Propeller1 to an SDcard file system. I doubt you are going to get FTP/SCP working on a Propeller1. Actually it seems that YModem, and ZModem are more reliable and may work on a Propeller1 as weil.
    Kermit is unlikely.

    You seem to just want to have Linux everything... there is the Propeller side of all this as well.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-20 05:57
    Heater. wrote: »
    Grrr...the d-link has 4MB of FLASH of which only 148K is now free. No wonder LUCI with SSL did not fit!

    This might make it a bit hard to add a Propeller loader.

    But wait....it also has 32MB of RAM which is being used as tmpfs. A giant RAM disk. That's huge!

    So as long as power is not removed there is a huge amount of space for adding all kinds of things.

    We could of course add a little program that sucks down software from somewhere on the net and puts it into /tmp at boot up. Easy.

    Edit: Of course there is already such a program on the router, wget. It just needs a little script to kick it off at start up.

    Possibly an opgk script and a custom repository for the addition of Propeller specific custom packages.

    Or, you could have a remote file system and download as an NTF/SCP client.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-20 07:10
    Well, I did manage to get my Wifi up and running by removing the line in /etc/config/wireless that said 'option disable 1'

    So I located a new SSID = 'Openwrt'. And ran http:192.168.1.1 to get a login that worked nicely with my password that I previously changed via 'passwd'

    Everything seemed okay, So I decided to change the SSID and Host name to something less generic tha Openwrt (which just might attract hackers). Now I am struggling to get back in via the browser.

    It is important to have the LuCi running and to allow the LAN port to reach the outside world for my next step-- using the existing opkg repositiories to get an RS232 port running. So this is all a bit tedious and disappointing.

    +++++++++++
    Just turned everything off and rebooted after a bit of time.
    Oh, LuCi is working now. I can do all the internal menus.. so the wifi is up. But I still can't get to the WWW over the Lan CABLE.

    I am exploring.. looking for the Wifi to LAN bridge. new SSID and Host name seem accepted.

    LuCi very clearly says "IP4 WAN STATUS -- not conneced.
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 07:16
    Why xmodem?

    Sorry, as I see no sign of anyone having made a router to Propeller serial link yet so I thought we were talking about transfers into the router over the net.

    However...

    xmodem was created in the days of CP/M and bulletin boards and slow old modems over noisy and unreliable telephone connections. It's purpose was to ensure file downloads worked, without error, in the face of such line errors.

    xmodem did not work very well so they invented ymodem.

    ymodem did not work very well so they invented zmodem.

    I don't recall how kermit fitted in to all this.

    None of that worked very well so they invented TCP/IP. There is no way xmodem and friends are more reliable.

    Now. I'm going to assume that the propellers here are going to be in close proximity to the routers with short serial links. That's why we want ethernet and WIFI is it not?

    These serial links are basically reliable, unlike telephone lines, so xmodem and friends are not required.

    My approach would be to send files to the Propeller formatted as Intel Hex or Motorola S Records, in the way we used to load binaries into PROM programmers back in the day. It will be much easier to format and send an Intel Hex file than messing around with xmodem.

    Heck for loading Forth programs, which are just text files, just send the raw text with some kind of checksum on it.
    You seem to just want to have Linux everything... there is the Propeller side of all this as well.
    Not at all. I just like the easiest way to do something that works nicely.

    What is an "NTF client"? I guess you mean "NFS". I thought about that but the nfs-utils package is not on the router and I guess there is not enough room to install it.
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 07:29
    Loopy,

    Why are you messing around with hacking on the config files like /etc/config/wireless ?

    You can use uci to do this as spelled out in the OpenWRT basic config documentation. I quoted the command required to get wireless up twice here already.

    Or, seeing as you have Luci installed, just change the WIFI settings on the WIFI page.

    I just tried that to see if changing ESSID had a problem like yours. It just worked and my phone found and connected to it easily.
    It is important to have the LuCi running and to allow the LAN port to reach the outside world for my next step
    Luci is cool. Looks a whole lot better than the hideous d-link web interface. I guess we don't actually need it if we learn all about the command line uic tool which I guess Luci uses at the back end.
  • kwinnkwinn Posts: 8,697
    edited 2014-07-20 07:33
    Heater. wrote: »
    ..............

    None of that worked very well so they invented TCP/IP. There is no way xmodem and friends are more reliable.

    Er.....At the risk of being growled at, IIRC TCP/IP was around before xmodem came along. That was in the glory days of thick ethernet and vampire taps.
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 07:47
    kwinn,

    No growling here. I'm sure you are right. My time line is a bit fuzzy.

    xmodem was devised in 1977.

    TCP/IP is a bit harder to pin down. First dreamt up in 1973. The first connection between different types of machines across the Atlantic in 1975. And so on.

    Certainly TCP/IP was not on the radar of personal computer users until nearly 20 years later. I did not get an internet connection until 1995!

    I loved those coax ethernet cables and vampire taps! You didn't need all those stupid hub, switch and router boxes together with all their wall wart power supplies to get a bunch of machines in an office or at home talking.
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 08:16
    Yay, yet another minor breakthrough.

    On the PC create a simple C source file, compile with the cross compiler that was built when building OpenWRT from sources, scp that to the router.
    On the router just run it. BINGO it works !

    On the PC:
    heater@debian:~/openwrt$ cat jack.c
    #include "stdio.h"
    
    int main (int argc, char* argv[ ])
    {
        while (1)
        {
            printf ("All work and no play makes Jack a dull boy\n");
            sleep(1);
        }
    }
    heater@debian:~/openwrt$ mipsel-openwrt-linux-gcc -o jack jack.c 
    mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined
    mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined
    mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined
    heater@debian:~/openwrt$ file jack
    jack: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked (uses shared libs), not stripped
    heater@debian:~/openwrt$ scp jack root@192.168.1.1:
    root@192.168.1.1's password: 
    jack                                                                                                                         100% 6052     5.9KB/s   00:00
    heater@debian:~/openwrt$
    
    On the router:
    root@OpenWrt:~# ls -l 
    -rwxr-xr-x    1 root     root          6052 Jul 20 18:09 jack
    root@OpenWrt:~# ./jack
    All work and no play makes Jack a dull boy
    All work and no play makes Jack a dull boy
    All work and no play makes Jack a dull boy
    All work and no play makes Jack a dull boy
    All work and no play makes Jack a dull boy
    All work and no play makes Jack a dull boy
    ^C
    root@OpenWrt:~# 
    
    Now what about that Propeller loader....
Sign In or Register to comment.