Closed john-terrell closed 3 years ago
In smoltcp master
(not yet released in crates.io) you can specify the "medium" of a Device. You can pick the IP medium, in which case your Device will send/receive IP packets, not Ethernet frames. If the hardware generates the Ethernet frames and does neighbor discovery/ARP etc on its own it should work.
Which chip/board is it?
Thanks for the info. I'm implementing the ethernet driver for the atsam-rs project (specifically for the ATSAM4E). https://github.com/atsam-rs
Follow-on question: It looks like enabling proto-dhcpv4 also forcibly enables medium-ethernet. Is that due to needing to get to the underlying MAC address?
Yes, DHCP only makes sense over Ethernet, since the protocol deals with MAC addresses. It doesn't make sense to try to run it over something like PPP, which doesn't have MAC addresses at all.
From a quick look at the SAM4E datasheet and C code examples, it seems to me it does receive/transmit raw Ethernet frames, not IP frames, though. You should be able to use Ethernet medium just fine.
Thanks for the guidance.
This is a question and not an issue per-se: The embedded hardware on my Microchip board generates its own Ethernet frames. Does smoltcp have any mechanism to bypass smoltcp's own Ethernet frame generation and supply IP frames directly to the Device object?
Thanks!