RS232 loopback test

I am using a Mega ADK in a Bluetooth project and my RS232 is giving me problems. I have been using 3rd party bluetooth code and have tried all versions found so as to get me started.

I have set RS232 ports to 14, 15 on ADK I also had one arduino totally failed to upload from the pc after a samsung phone was connected to my PC and it installed its device driver. ( may be thats not related to this post but its odd ) I am therefore very skeptically proceeding as have had to buy a new board during this development.

I have had some response from Arduino & Bluetooth EGBT-06 using AT commands, but very inconsistently, some commands respond, some don't, even AT sent on its own doesn't always OK I have this feeling that my Bluetooth EGBT-06 module might be a faulty card.

To ensure all is ok on the arduino side first: What I am looking for is an RS232 loop-back code tester, so I can e.g. send a character out on TxD 14 and if there is a shorting cable connecting to RxD 15 then it will appear back and be displayed on the serial monitor and if 14 to 15 isn't shorted then do data will come back through. This would prove that arduino is sending RS232 out and getting same data back and back reliably, this without the bluetooth being connected.

I am new to arduino programming and have looked for such a loop tester code, but all I can find are loopback testers to see if the PC can send to download a sketch to arduino itself ok and not to check if arduino can send successfully through an assigned pin as RS232 and then get it back.

If anyone knows of such a loop test program, I would be very grateful.

Many Thanks in advance. Les

This would prove that arduino is sending RS232 out and getting same data back and back reliably, this without the bluetooth being connected.

I would think that just jumping the rx to the tx pin and using the serial monitor should do what you want. Not sure how you are doing the TTL to rs232 conversion.

I don't think that is possible, say e.g you use 2 ports on arduino to be assigned as RS232 roles, each serving an RS232 task, then one couldn't expect both of them to automatically appear on the Serial Monitor if they were simply shorted it would be a mixed grill of data on the serial monitor.

Surely the serial port assigned to Arduino pins doesn't gate crash the same PC to Arduino COM port ! ? It could be unstable to say the least as you have 2 entities reading and writing to that same port

FYI I am now not converting any RS232 levels to arduino levels, my bluetooth claims to work both 3.3 v and 5v, but anyway I have removed that out of the equation now and simply want to prove that loop back is working .

I need a sort of a Telnet or Putty type program but one which works through the com port of the PC and reaches the destination assigned port pins and then parsses that over.

I don't have an ADK but it sounds similar to a Mega2560.

The Serial input/output is shared with the USB interface. Serial sent outwards appears both on the USB port and the serial Tx pin.

Incoming serial would indeed clash if you tried to have something on the Rx pin, and send something from the PC at the same time.

A simple sketch that wrote to Serial and then read from Serial could be used as a loopback test.