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
Cart

