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.
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.