Thread: Been looking in all the wrong places for an embedded Linux computer

  1. #1
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413

    Been looking in all the wrong places for an embedded Linux computer

    For a while I've been wanting a super cheap Linux computer with basically an ethernet port and a USB port. I had spent so much time looking at the Raspberry Pi, BeagleBoards, etc etc. While they all have nice features, they're not my idea of super cheap. The Raspberry Pi is $35, but you really need an enclosure and a power supply/cord, so it's more like $45 at least (I'm a cheapskate, I know). Even then, community support for everything except the Pi is questionable.

    Anyway, after some googling I finally found more of what I've really been looking for: OpenWrt. I had run across it many times before, but it never really clicked that you can load up OpenWrt on a router and then use it for general purposes instead of strictly networking.

    I'm going to use it for a special project here at work where we basically need to log the serial data coming over an RS485 line. I'm going to buy a $20 D-Link DIR-505L router (already enclosed and has a built-in power supply, UL listed too!), a cheap USB hub, and a cheap USB thumb drive. We've already got a USB to RS485 serial converter dongle, all I have to do is hook it all together. Once I install OpenWrt, all I have to do is (famous last words) install the appropriate packages for USB mass storage device support and USB-serial converter support. Then I can put a script in the init.d folder to basically cat /dev/ttySx > /media/thumb_drive/raw_data_file. Voila. And I'll be able to retrieve the data remotely via scp.

    All the dev boards definitely have their advantages (more CPU/RAM) and different purposes (I/O besides USB), but I think it's pretty frigging cool to buy a $20 travel router like the DIR-505L and get: enclosure, power supply, ethernet, wifi, USB, and an easily installable/available Linux firmware image.

    www.openwrt.org

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    That's cool. But you're not really getting an embedded development board, you're getting a full-featured computer that just happens to be embedded. If you're just chasing the cheapest possible thing, then I get it, but I wouldn't see the point of having a little Linux computer that is just like my PC except slower with no video capability.

    The reason I love my RPi is because it can interface directly to other electronics. Of course, it's not real-time capable, so that's why I have Arduinos as well
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    It's exactly what I've been looking for. It gives me a somewhat 'exotic' platform to program on (MIPS24Kc), and yes, a full-featured Linux computer for $20. Most of my projects center around needing the flexibility that a normal PC environment provides, and any I/O (which is minimal) can be provided through USB. Also, in this case, having something that is UL listed is critical, so routers win.

    I do like the Arduino, I used it in school to control a compressed-air-powered piston engine my team built: https://www.youtube.com/watch?v=3FeJYZ-i0OY

    Not a fan of the RPi because of the ARMv6 architecture.

  4. #4
    Tweaking master Aslaville's Avatar
    Join Date
    Sep 2012
    Location
    Rogueport
    Posts
    528
    Quote Originally Posted by Epy View Post
    All the dev boards definitely have their advantages (more CPU/RAM) and different purposes (I/O besides USB), but I think it's pretty frigging cool to buy a $20 travel router like the DIR-505L and get: enclosure, power supply, ethernet, wifi, USB, and an easily installable/available Linux firmware image.
    I am actually wondering how I could harness all this CPU/RAM to manage a network as one of my fancy projects.From what I have heard using PI for network management slows down the network.

  5. #5
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    Then I can put a script in the init.d folder to basically cat /dev/ttySx > /media/thumb_drive/raw_data_file. Voila. And I'll be able to retrieve the data remotely via scp.
    O_o

    I'd reverse that logic for the sake of persistent logging in the case of failure.

    Throw the "OpenWRT" into "client mode", open a socket to "so.me.whe.re", and "cat" the the output to the socket.

    If you are doing what I think you are doing, you don't want to lose the last log entries when the hardware goes wonky.

    From what I have heard using PI for network management slows down the network.
    That actually depends on what you mean by "network management".

    If you are talking about using an "RPi" as a router or similar, you'd be better served with an alternative strategy. The problems aren't really bad. You'll just get way more "bang for the buck" getting a consumer router--possibly compatible with "OpenWRT".

    If you are talking anything "end point", I have one "RPi" which does a great job pushing DHCP, DNS, and related paraphernalia for the dozen devices I have local.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  6. #6
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    "Sometimes", I needlessly "enquote" everything, "too".

  7. #7
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Pleasantly surprised.

    Everything went smoothly, bought the router, flashed the firmware, installed some packages and got the serial piped to a file no problem. The only hiccup I had was that the D-link emergency flash firmware page only works with IE, and also that I failed to read part of a guide concerning SSH refusing some connections. There was a kernel module issue for one off-brand USB-serial converter as well. All in all though, pretty smooth experience.

  8. #8
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    sounds like a gentle reminder to RTFM
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  9. #9
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Yes, funny story, when the SSH server did not come up as expected several times (nothing to do really, after you set the root password through telnet, telnet is disabled and SSH is enabled), the router spent the night in my kitchen garbage can before I decided to give it another try this morning.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Embedded Linux & Embedded Java
    By jdomm95 in forum Linux Programming
    Replies: 4
    Last Post: 10-02-2012, 09:01 AM
  2. TCP Application using C for embedded linux based board
    By zawii87 in forum C Programming
    Replies: 2
    Last Post: 08-11-2011, 08:47 AM
  3. Linux TCP/IP For Embedded Systems
    By sean in forum Linux Programming
    Replies: 2
    Last Post: 08-03-2009, 11:58 AM
  4. Replies: 14
    Last Post: 01-02-2009, 04:15 PM
  5. Debugging-Looking in the wrong places
    By JaWiB in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 11-03-2003, 10:50 PM