I am switching to the RCM3700 on a board that currently uses the RCM3750. On the 3750, I programmed the Asix ethernet controller directly, since I was already familiar with it from a previous project. On the 3700 I’d like to use library functions because I’m not familiar with the Realtek controller. I don’t see any library functions for handling raw 802.3 ethernet packets. I did run across a mention of packet drivers but can’t find any library functions relating to them. The application has nothing to do with any kind of networking, it just uses the ethernet as a high-speed serial link between a computer and the rabbit board. No IP addresses, no TCP/IP stack, no router, the 2 devices just broadcast packets at each other over a crossover cable, so they don’t even need to know each other’s MAC address. At some point, every ethernet driver has to initialize the ethernet controller and transfer data packets between specified memory locations and the ethernet controller chip. If anybody can steer me to any info on library functions that do this, I’d sure appreciate it.
Take a look at Lib/tcpip/REALTEK.LIB for the APIs to configure the hardware interface to the Ethernet controller.
You might be able to use the rtk_receive() and ne2k_sendpacket() APIs to send and receive packets directly. They are tied to function pointers in the NetControllerDevice of REALTEK.LIB.
But you might also want to look through IP.LIB.
I think that pkt_init(), pkt_received(), and pkt_gather() might give you access to raw Ethernet frames. I think you’ll need to define CUSTOM_ETHERNET_HANDLER to receive non-IP/ARP frames.
At the very least, you could use IP.LIB as a guide to writing your own interface to the receive() and sendpacket() APIs in REALTEK.LIB.
Thank you sir! I’ll give it a try.
I’d also recommend making use of that NetControllerDevice data structure – you could eventually have a single codebase to compile for either target (RCM3700/RCM3750) and make use of that standard API to interface with both the ASIX and Realtek Ethernet controllers.