Wednesday, March 29, 2017

Arduino TPDD Update - fail

tl;dr - failure.  I can't get the RS-232 communications to work.

Longer explanation:
So the latest shifter arrived and I had hoped that it would take care of the communications problems.  It didn't.  It did loop back the RTS/CTS and DTR/DSR lines on the RS-232 side, so I could use a normal cable instead of the Frankenstein cable I created (one less thing to go wrong).

I had hoped that the shifter would handle all the flow control, but no.  I still believe that this is the real root of the problem.

I created a test program, dusting off my memory banks and programming in BASIC for a bit.  I was able to send commands to the Arduino and validate that I was getting the correct response back.  I was.  No problems.

So why didn't it work with TS-DOS?  Someone very nicely posted an annotated dump of the TS-DOS program.  So I went through that looking for a smoking gun.  Keep in mind that all the debugging that I did so far showed that I sent the correct responses for the commands, but still TS-DOS treated my device as something else.

After looking through the code, I see where it determines what device it hooked up.  The short answer is that it looks like my T102 doesn't get a response for one of the commands.  TS-DOS then shifts down to 9600, at which point communications no longer works - because the Arduino wants 19,200.

I did try setting my communications to 9600 and I got farther, but it still wouldn't work correctly.  It looks like data was getting dropped sending to the T102.

I can't see why TS-DOS doesn't think there is something there.  My BASIC program works just fine, sending and receiving data.  So it's not hardware.  It's software, but where?  I have no idea.

So I declare this project Failed.

My options are:

  • Use a Raspberry PI instead.  Then I can use the USB-Serial cable that works with dlplus on my Linux systems.
  • Create my own version of TS-DOS that just uses the serial ports to communicate - since I know that I can make that work.

Neither seem worth while to me right now, since my T102 is only a hobby.  So I think I'll put this aside for a while.

No comments: