2

I have a hardware device that sends data over the serial port and over a socket connection.

I have the TX of the device connected to the RX of the ESP8266, RX of the device to TX of the ESP8266.

Comm speed is set to 115200 on both.

Code is nothing more than

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
}

void loop() { // run over and over
  if (Serial.available()) {
    Serial.write(Serial.read());
  }
}

I listen on the socket and on the serial port at the same time. On the socket port i get correct data (ASCII characters). On the serial monitor of the Arduino i get garbled data. Also, it looks like the Arduino IDE cannot cope with the volume of data. I am sending appx 100 char/sec.

Any ideas?

Update Aug 13 '18

Ok, I found out that I was trying to hook up an RS232 to an UART and that, to accomplish this, I need a RS232 to TTL converter like the max3232. I will go that road and update the question if I have it.


Ok, i found out that i was trying to hook up an RS232 to an UART and that, to accomplish this, i need a RS232 to TTL converter like the max3232. I will go that road and update the question if i have it.

  • 1
    What is this mystery device? – Majenko Aug 11 '18 at 9:55
  • 1
    and how is Serial Monitor connected? – Juraj Aug 11 '18 at 11:12
  • Mystery device is an RFID reader. Serial monitor is connected via the USB port and launched from Arduino IDE.. – Ton Machielsen Aug 11 '18 at 15:12
  • What RFID reader? The reason I ask is that not all serial connections are equal. I need to know the exact device so I can look up the manual / datasheet and discover what kind of serial connection it has. There is a chance you may require extra hardware between the device and your ESP8266. – Majenko Aug 11 '18 at 22:46
1

I think RS232 signals are outside the TTL limits; I don't know if you've done any permanent damage.

On the interfacing itself:

https://www.sparkfun.com/tutorials/215

On the damage part:

https://forum.arduino.cc/index.php?topic=26139.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.