Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 8 months ago.
send/receive IP frames (OSI L3) via Ethernet
Hello,
I would like to make an “radio modem” with an Mbed board (LPC1768 or FRDM-K64F). This radio modem would use a home-made protocol. But this protocol carries IP frames.
- all the IP frames received via radio would be transferred to ethernet port
- All the IP frames received by Ethernet be transfered to radio I think that the best way to interface the modem is to use Ethernet, because it is “de facto” compatible with all PC and lots of others devices. Intially, I thought that I could use SLIP over serial over USB. But SLIP is not supported on Windows 7 or Windows 8.
Via Ethernet, there are 2 ways to make such a modem :
- considering the mbed as an “IP router”. This is probably the easiest solution. The Mbed would be the "default gateway" for devices on the local network.
- considering the mbed as an “Ethernet gateway”, therefore I would probably need “ARP proxy”, so that the mbed announces via ARP that it can manage all the IP addresses of the network used on the "radio WAN". I think that this would be more complex.
My question : how can I receive and send IP frames ? How can I write a program on Mbed that reads and sends IP frames? This is a “non standard” use of the “network stack”, because most of the usage only use UDP or TCP sockets (OSI L4 transport layer). But I need to work at OSI L3 (network layer).
On the official library, I see 2 libraries that do not answer to my needs :
- Ethernet library : at Layer 2. It does not includes the L3 IP level.
- Ethernet_interface library : I don’t see any way to communicate at “L3” (IP level), but only at L4 level (including socket UDP or TCP).
Thanks for the help you can provide! regards,
Leon.