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.

Monday, March 06, 2017

Arduino TPDD update

Progress, but not.

So the last update, it was communicating.  I was seeing commands being sent and my responses.  But when I looked harder at the output, something was off.  Everything looked right, but something was off.  I was getting "junk" just as communications stopped.

First thing I thought was "too fast".  So I dropped the speed from 19,200 to 9600.  More communications!  Yay!  But things still weren't working.

So I decided to step back and see what "good" communications looked like.  So I got my USB to Serial cable, hooked it up to my PC, and ran dlplus - having recompiled dl.c with debug mode on.

I captured the output and compared it to mine.

The input and outputs "match" in that when I get command X the correct response it sent.

Interestingly, the "mystery" commands aren't sent to dlplus, but they are sent to my Arduino setup.

I think that the data that I'm sending isn't all getting there.  That means I need to try another shifter, maybe one with hardware flow control lines available.  *Sigh*  I did not want to mess with RS-232 hardware flow control, but it looks like I'll have to.