Teensy 4.1 with two LAN Port

Hello everyone,
Is it possible to operate two LAN ports with the Teensy 4.1? One port Modbus TCP the other "normal" LAN/Internet (to get the time via NTP).
I would like to receive the time via NTP and pass it on to the Modbus TCP.
So the Tennsy should work as an SNTP server.

Greetings - Martin
 
Hardware wise, no. You would need additional resources, at least something like a W5500. If this is a near one off design, I would suggest a MODBUS-TCP to MODBUS-RTU (Not MODBUS-ASCII) bridge to make MODBUS available to the Teensy 4.1 via a serial port. MODBUS doesn't tend to be the speediest of protocols, and seldom needs anything faster than 115200 baud. MODBUS-485 is also popular, but there are wiring and hardware issues that have to be handled. Most of these gateways require one time configuration and documentation can be "Lacking", but they can be purchased for around $30 on Amazon or AliExpress.
 
Hardware wise, no. You would need additional resources, at least something like a W5500. If this is a near one off design, I would suggest a MODBUS-TCP to MODBUS-RTU (Not MODBUS-ASCII) bridge to make MODBUS available to the Teensy 4.1 via a serial port. MODBUS doesn't tend to be the speediest of protocols, and seldom needs anything faster than 115200 baud. MODBUS-485 is also popular, but there are wiring and hardware issues that have to be handled. Most of these gateways require one time configuration and documentation can be "Lacking", but they can be purchased for around $30 on Amazon or AliExpress.

I think the OP is asking whether he can have multiple connections on different TCP port numbers at the same time. The answer is yes, you can have many simultaneous TCP/IP connections at the same time through the single Ethernet connector on T4.1. Modbus/TCP uses TCP port 502 by default. I don't know the TCP port number for SNTP, but yes, your T4.1 can simultaneously be an SNTP server (or client) and a Modbus/TCP server (or client).
 
Thanks to joepasquariello. You got the question right.

If you implement an SNTP server or Modbus/TCP server on the T4.1, you can decide whether you want each of those servers to allow only 1 connection at a time, or 2, or however many is appropriate. The limit will probably be a function of how much RAM is required to support each connection. I recommend using QNEthernet rather than NativeEthernet, mostly because it's more actively supported.
 
Back
Top