Dear all,
I am working on a project which is using a WizNET Ethernet shield to send data in 802.1Q format. But the data to transfer has grown a lot (> 1500 kByte per Second) and as a result the Ethernet transfer rate has become to slow (limiting factor seems to be the SPI interface). That's why I would like to use the on-board Ethernet interface.
My question now: How can I send Ethernet data in RAW format by using the Teensy 4.1 on-board Ethernet? The NativeEthernet library is great for TCP or UDP, but I found no RAW transfer mode.
A simplified example how 802.1Q data has been sent over Ethernet until now by using the WizNET ethernet shield (using the MACRAW mode):
Any help will be appreciated!
Greetings,
M.
PS: I've been using Teensy 4.1 for over a year now and I love it - you did a great job!
I am working on a project which is using a WizNET Ethernet shield to send data in 802.1Q format. But the data to transfer has grown a lot (> 1500 kByte per Second) and as a result the Ethernet transfer rate has become to slow (limiting factor seems to be the SPI interface). That's why I would like to use the on-board Ethernet interface.
My question now: How can I send Ethernet data in RAW format by using the Teensy 4.1 on-board Ethernet? The NativeEthernet library is great for TCP or UDP, but I found no RAW transfer mode.
A simplified example how 802.1Q data has been sent over Ethernet until now by using the WizNET ethernet shield (using the MACRAW mode):
Code:
/*
| Destination MAC | Source MAC | 802.1Q Header | EthType | Payload |
| 0x1A1B1C1D1E1F | 0x2A2B2C2D2E2F | 0x8100 0x8000 | 0x8146 | 0xCAFECAFE |
*/
byte mybuffer[] = { 0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x81,0x00,0x80,0x00,0x81,0x46,0xCA,0xFE,0xCA,0xFE};
SOCKET socket;
W5100.init();
W5100.writeSnMR(socket, SnMR::MACRAW);
W5100.execCmdSn(socket, Sock_OPEN);
W5100.send_data_processing(socket, mybuffer, sizeof(mybuffer));
W5100.execCmdSn(socket, Sock_SEND_MAC);
Any help will be appreciated!
Greetings,
M.
PS: I've been using Teensy 4.1 for over a year now and I love it - you did a great job!