No announcement yet.

xPico Ethernet Frame Handling

  • Filter
  • Time
  • Show
Clear All
new posts

  • xPico Ethernet Frame Handling

    I need to handle Ethernet frames other than IP type. What I need to do is simply to send to serial port the payload of a non-IP Ethernet frame and to build and send a Ethernet frame whose payload is received from the serial port.

    In CoBox Pogrammer's Guide 611010 I found the Ethernet Frame Handling chapter for inbound and outbound frame processing.

    The instructions contained in "Inbound Frame Processing" work only if ethernet type is 0x0800 (IP) or 0x0806 (ARP). I need instead to handle other types of Ethernet frames and I cannot handle those frames, neither with bridge functionality.

    Thank you.
    Last edited by pmmicrowave; 07-22-2019, 04:25 PM.

  • #2
    Are you setting the pkt_default() hook variable to the address of your handler function? What ethernet type are you trying to receive?



    • #3
      I tried with pkt_bridge using the example of CoBox programmers guide:

      #include <eth.h>
      extern void (*pkt_bridge)();
      void bridge_default(BYTE *rb);
          pkt_bridge = bridge_default;
          /* .... */
      void bridge_default(BYTE *rb)
          sendblk(rb,32); /* for example first 32 byte */
      The result is that only IP or ARP packets (i.e. with ethernet type 0x800 and 0x806) are sent to serial. I need to handle PPP or PPPoE packets (ethernet type 0x8863 and 0x8864). I tried also to use pkt_default instead of pkt_bridge but the result is the same: it seems that these packets are not received or not handled properly.