Skip to content

USB Ethernet support #2

@martin-mat

Description

@martin-mat

creating a ticket to bookmark this feature. This is a point I've been thinking about recently and this comes to me as a really neat idea to add to RF24Ethernet: Support of USB Network device.

Idea: create an USB Stick with nRF24l01 supporting one of standard USB Ethernet interfaces (ECM, RNDIS, ...) so the stick is detected by OS as a regular USB ethernet device.

My explorations on this so far:

  • VUsb is probably not a good idea to use as it utilizes USB 1.1 standard only and does not support bulk endpoints that mentioned USB ethernet standards use
  • good way seems to be to use LUFA library; there is a nice example there for simple RNDIS device. But this implies to use an avr chip with USB support
  • it should be possible to use atmega32U4 used in Leonardo, pro micro, etc...
  • mentioned RNDIS example requires better chips with more ram, but it is mainly due to large max ethernet frames, large tcp window and can be reduced to fit to atmega32u4's ram (I did some trials recently there)

The code to be added for this purpose to RF24Network would be probably not that complicated from my point of view and maybe it's already mostly there: get an ethernet frame from LUFA/network, check it's type:

  • arp -> call uip's arp handling & send it back to LUFA or network
  • ip -> get dest mac from uip's arp, and send the frame with ip accordingly via LUFA or network
    ...and that's probably it. No need for any transport/application layer handling, all this is done on host OS level.

Expected scenario - plug Leonardo into usb -> you get an Ethernet device, assign it's IP and here you go, you are connected to RF24 network.

@TMRh20 any opinion about that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions