I've been working on a networking stack for the CE called Nanotube. It's based on lwIP, an open-source networking stack designed for embedded systems. It uses the USB port and a USB ethernet adapter to send ethernet packets directly, with no host computer involved.

So far, I've been able to get a file off my webserver over HTTP using the example HTTP client provided with lwIP. I don't have any fancy screenshots of this happening, as I'm logging to an appvar rather than the screen.

Currently, basically everything about the device has to be manually configured. lwIP includes DHCP, but it crashes whenever I try to use it. I'll try to fix that in the future, but the issue has been difficult to debug. You also have to specify a MAC address, MTU, USB configuration number, in and out endpoints, and the relative address of any alternate interfaces that must be selected. I'm currently working on properly parsing USB descriptors so that these can be detected automatically.

The program is also quite large - it's 85KB uncompressed. This makes it inconvenient to use in actual programs. It's also currently statically linked, so you would have to include it in your own programs in order to use it. I'm not really sure how to fix this - ideally, I would make it a dynamically linked library, and libload would relocate the code section to flash and relocate the BSS section to memory the way it currently does with the code of existing libraries.

I'm currently focusing on parsing the USB descriptors, but I only have one device to test it with. If anyone has a USB ethernet device, could you please DM me the USB descriptors (either in raw hex or the output of lsusb -v) so I can make sure my descriptor parser works?

The code is available on GitHub, though you'll have to change several options about your USB ethernet device for it to work.
Nice project Smile

I have access to some USB Ethernet adapters, but they're in a closet at my work place, and it's going to be several more weeks before I return there, presumably. If I do an unplanned trip there for some reason, I'll borrow one to post the information you're looking for.
I've used Nanotube to make a CE IRC demo. For more details, check out my other post.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement