WE (Doug) DID IT!

The struggle is over! It looks like we had the right idea with our code as previously written, but the problem rested with the actual port we were using. It looks like the serial pins we were using were the pins for debugging the code, which is why the data came out so inconsistently when we tested it. So instead of using pins 2 and 3, we had to use pins 7 and 8. It is pretty poorly documented on the TS site, but here are two URLs with diagrams:
http://wiki.embeddedarm.com/wiki/TS-8200-4200#DB9

http://www.embeddedarm.com/about/res…501#section5.1

In short, we needed to quit using the debug port on the the DB9 connector, and use ttyS2 instead.  The way to change ports on the DB9 connector is to use different pins on the DB9 connector.  The resultant code is attached in a Word file because this blog seems to be a little finicky about indentation!

Here’s an example of the output:
————————————-
wx14@ts4200:~/Weather$ ./DT1.py
/dev/ttyS2
sent q
11A    33B    10    3D9    1    0    0    0sent q
A75    C69    10    C07    1    0    0    0sent q
444    0    10    0    1    0    0    0

sent q
6C3    D74    10    D74    1    0    0    0

sent q
6B7    0    10    0    1    0    0    0

sent q
59E    BB4    10    C1C    1    0    0    0

sent q
93A    461    10    3BF    1    0    0    0

sent q
164    325    10    3C1    1    0    0    0

sent q
A70    C74    10    C14    1    0    0    0

sent q
44E    0    10    0    1    0    0    0

wx14@ts4200:~/Weather$

————————————-

Also, we had been testing our programs from the root user previously, and have now added permission to our wx14 user to execute serial programs. This process is not intuitive, and required some help, which we got here:

In our case, we need to add a user (wx14) to the group “dialout” for the specified port (ttyS2).

First, you have to be root to do this.
The command used was:
  adduser wx14 dialout
Then exit out of being root, and exit out of Freya.  Then SSH back into Freya as wx14.  After that, wx14 can use ttyS2 (which is the serial port we want to use on the DB9 connector of our TS 4200/8200).
Big thanks to Doug on this one, who burned the midnight oil and finally put the pieces together here last night. After being able to successfully communicate through Freya’s serial port, we should now be able to do more interesting and weather related things with her!
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *