I have Ethernet hardware functioning on Teensy 4.1, using NativeEthernet.h.
Webserver example yields the following output:
My hope is to communicate to the Teensy through my LAN using a .NET application.
Although I have the Teensy now connected to LAN, I can neither ping the Teensy server nor find it with the .Net code.
Any Pointers would be appreciated.
thanks
Webserver example yields the following output:
Code:
Ethernet WebServer Example
using HW_OCOTP_MAC* - see https://forum.pjrc.com/threads/57595-Serial-amp-MAC-Address-Teensy-4-0
MAC: 04:e9:e5:0b:c2:21
IP Address 10.22.1.164
10.22.1.164
server is at 10.22.1.164
My hope is to communicate to the Teensy through my LAN using a .NET application.
Code:
TcpClient client = new TcpClient("10.22.1.164", 20);
NetworkStream stream = client.GetStream();
Byte[] data = new Byte[1024];
String responseData = String.Empty;
Int32 bytes;
while (true)
{
bytes = stream.Read(data, 0, data.Length);
if (bytes > 0)
{
responseData = System.Text.Encoding.ASCII.GetString(data, 0, bytes);
Console.WriteLine("Received: {0}", responseData);
}
}
Although I have the Teensy now connected to LAN, I can neither ping the Teensy server nor find it with the .Net code.
Any Pointers would be appreciated.
thanks