Testing ExtendedSerialPort on Linux

Samir Saidani saidani at info.unicaen.fr
Thu Jun 16 12:12:46 UTC 2005


Hi John,

John M McIntosh <johnmci at smalltalkconsulting.com> writes:

> On 10-Jun-05, at 6:29 AM, Samir Saidani wrote:

>> is 32, and structureSize is 4 + 4 + 4 + 4 + 20 + 4 + 4, but if I kept
>> the hex form for SerialPortTermiosUnix, it doesn't work, which seems
>> to mean that the value are in decimal and not hex. But anyway, with
>> ncss at 20 or 32, it doesn't work, same 22 error. But if I replace 32
>> by 20 in structureSize, the primitive failed due to the problem we
>> discussed earlier (60 vs 48)...
>
> So if you get the printString of your workingSerialTermios  what does
> it look like?

I wrote a little program in C to verify the real structure size, and
it seems that it's different than I thought : inspecting the structure
with ddd/gdb gives something like 4 + 4 + 4 + 4 + 1 + 35 (although ncc
seems to have a 32 bytes size ??) + 4 + 4

When I try a tcgetattr with Smalltalk, it seems to work well, but I
discovered that a cfsetispeed in the C program gives the same error
than smalltalk, because probably I tried to open a virtual console
"/dev/tty1" or "/dev/pts/1"... It seems that we cannot change the
speed of such terminals... I saw that Ned Konz wrote some VirtualTerm
classes to work with SerialPort, it might be interesting to port it to
ExtendedSerialPort !

Thanks for your help !

Samir



More information about the Squeak-dev mailing list