Mantis - Squeak
Viewing Issue Advanced Details
7529 System minor always 05-08-10 01:21 05-08-10 01:25
unoduetre  
 
normal  
new 4.1  
open  
none    
none  
0007529: SerialPort
SerialPort primitives on unix VM seems to be broken. My version of VM is 4.0.3.2202-linux_i386
For reproducing this behaviour you need to:
1.
ls /dev/pts

remember what devices are there

2.
socat -x -v PTY PTY 2>&1 | tee path_to_some_file_for_debug_log.txt

3.
ls /dev/pts

there should be 2 new devices created by socat
remember them
in further discussion let's assume these are /dev/pts/1 and /dev/pts/2

4.
in squeak workspace do:
kom:=XModem new.
kom open:'/dev/pts/1'.
kom sendFile

in file dialog select file i gave in attachment

5.
In linux shell do:
rx some_file.txt </dev/pts/2 >/dev/pts/2

some_file.txt is destination file for xmodem software

6.
In transcript you should get many messages like:
Trying to send packet
06
Success
Trying to send packet
06
Success
Trying to send packet
06
Success
Trying to send packet
06
Success
Trying to send packet
06
Success
Trying to send packet
00

Notice this 00 in the end. readInto:startingAt: outputs #[0], but should output #[6]. Log is in path_to_some_file_for_debug_log.txt.

So connection looks lika that:

waiting for connection (waiting to receive NAK)
sending first packet
getting ACK
sending second packet
getting ACK
...
sending n-th packet
getting 0 instead of ACK, despite that it WAS NOT SEND
waiting for ACK
getting NAK because of timeout
retrying sending n-th packet
getting ACK
sending n+1-th packet
getting ACK
......
etc.


 SerialPort-M7529.cs.gz [^] (936 bytes) 05-08-10 01:22
 testfile-M7529.pdf [^] (161,069 bytes) 05-08-10 01:25

There are no notes attached to this issue.