Test and Measurement Forum

Trouble connecting to Th-03

Having problems ? let us know the details here

Trouble connecting to Th-03

Postby Olen » Fri Jul 18, 2003 7:20 pm

I just bought a TH-03, and have trouble connecting to it.
I have tried from both a laptop, running redhat 9 and a desktop computer with redhat 7.3.

I have successfully unpacked th03.tar, and the software seems to be running fine, however, I get an error message:
Code: Select all
$ ./th03lnx -d -t100 /dev/ttyS0
th03lnx: th03 not found on /dev/ttyS0


I know the serial port is working - I just tested a connection with a serial cable to another device.

After reading the docs, it seems like the software should send one byte, and expects to recieve 3 bytes.
However, a strace seems to show a different result (i believe this is the interessting bit):
Code: Select all
open("/dev/ttyS0", O_RDWR|O_NOCTTY|O_SYNC) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE, {B2400 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCSETS, {B2400 -opost -isig -icanon -echo ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE, {B2400 -opost -isig -icanon -echo ...}) = 0
ioctl(3, FIONBIO, [1])                  = 0
ioctl(3, TIOCMBIC, [TIOCM_DTR])         = 0
ioctl(3, TIOCMBIC, [TIOCM_RTS])         = 0
nanosleep({0, 500000000}, NULL)         = 0
ioctl(3, TIOCMBIS, [TIOCM_RTS])         = 0
nanosleep({0, 200000000}, NULL)         = 0
ioctl(3, TCFLSH, 0)                     = 0
write(3, "\1", 1)                       = 1
nanosleep({0, 30000000}, NULL)          = 0
nanosleep({0, 10000000}, NULL)          = 0
ioctl(3, FIONREAD, [2])                 = 0
nanosleep({0, 10000000}, NULL)          = 0
ioctl(3, FIONREAD, [2])                 = 0
read(3, "\3\2", 3)                      = 2
rt_sigprocmask(SIG_BLOCK, [CHLD], [33], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [33], NULL, 8) = 0
nanosleep({1, 0}, {1, 0})               = 0
ioctl(3, TCFLSH, 0)                     = 0
write(3, "\1", 1)                       = 1
nanosleep({0, 30000000}, NULL)          = 0
nanosleep({0, 10000000}, NULL)          = 0
ioctl(3, FIONREAD, [2])                 = 0
nanosleep({0, 10000000}, NULL)          = 0
ioctl(3, FIONREAD, [2])                 = 0
read(3, "\3\2", 3)                      = 2
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
write(1, "th03lnx: th03 not found on /dev/"..., 38th03lnx: th03 not found on /dev/ttyS0) = 38


Without being an experienced programmer, I believe this means the software just recieves 2 bytes.

Could it be a problem with the th-03, or is it something I am missing?
Any other tips?

Rgds.

Ola Thoresen
Olen
 

Postby markspencer » Mon Jul 21, 2003 8:48 am

Hi,

I have just tried this on a Windows operating system using Borland, I send 0x01 to the TH-03 via the serial port and recieved 2 bytes back.

I seems that the documentation is incorrect.

The linux code is designed for the version 1, and not the version two, we are going to look into this, unfortunately I am unable to give a timescale for the fix.

Best regards,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Trouble connecting to Th-03

Postby Olen » Mon Jul 21, 2003 10:19 am

I think you are right about the unit just sending 2 bytes back.

However, it seems like this new one is returning the wrong two bytes.

My unit sends (according to strace):
Code: Select all
read(3, "\3\2", 3)                      = 2

But I checked another unit I have access to, and it returns:
Code: Select all
read(3, "\300", 3)                      = 2

Unfortunately this unit (the one that works) is located remotely, but I will try to get there this evening and swap the units, and see if the new one works there.

If I get the same problem there I believe it must be some sort of a hardware fault in the new one.


Rgds.

Ola Thoresen
Olen
 

Trouble connecting to Th-03

Postby Olen » Tue Jul 22, 2003 2:51 pm

I have now tested to swap it with a working th-03 in our production environment, but still get the same error there.

This seems to be a problem with the th-03 itself.

What is the easiest way to return it and get a replacement?


Rgds.

Ola Thoresen
Olen
 

Postby markspencer » Wed Jul 23, 2003 8:33 am

Hi,

To return the unit please email me your contact details and I will send you a returns number. Once we have it we will be able to investigate further.

email: tech@picotech.com

Best regards,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am


Return to Getting Started

Who is online

Users browsing this forum: No registered users and 0 guests