stepansnigirev / ArduinoSerialToEthernet

Arduino Serial (RS232) to Ethernet gateway, dynamically configurable. Makes your RS232 devices network-compatible.
51 stars 19 forks source link

Sending messages works only in one direction #3

Open muesgit opened 3 years ago

muesgit commented 3 years ago

Hello Mr. Snigirev,

Ive done a simple test to send Information from an Arduino with Ethernet Shield to another Arduino via Serial TX/RX and back. I was able to use netcat to send messages vie Ethernet to Serial. When i try to send a message back by typing into the Serial monitor of arduino (arduino without ethernet shield), i can only see the configuration in the serial monitors of both arduinos. My input message is not visible. As i understood, everytime when i type something into the serial and send it to the Arduino with ethernet shield i get the information printed on the usb-channel. I guess i cant see anything because i am sharing the pin 0 and 1. I wasnt able to see what and if anything is transferred to the ethernet port. I also tried to listen to the port 23 via netcat but it isnt possible.

Do u have any suggestions on how to solve this problem.?

muesgit commented 3 years ago

I solved the problem. It was what i was already guessing that using pin 0 und 1 is not possible because they are reserved for USB. Since I have an MEGA I renamed Serial1 to Serial3, reattached the pins and voila its working. I thought i must use SoftwareSerial but luckily I didnt have to change your code 👯