Testing ExtendedSerialPort on Linux

Samir Saidani saidani at info.unicaen.fr
Thu Jun 9 13:49:28 UTC 2005


Hi John,

I encountered some problems while trying to install ExtendedSerialPort
on Linux... - latest vm 3.7-7

Compile error:

/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c: In function `primitiveSerialPortUnixCfgetispeed':
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c:127: warning: passing arg 1 of `cfgetispeed' from incompatible pointer type
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c: In function `primitiveSerialPortUnixCfgetospeed':
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c:150: warning: passing arg 1 of `cfgetospeed' from incompatible pointer type
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c: In function `primitiveSerialPortUnixCfmakeraw':
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c:171: warning: passing arg 1 of `cfmakeraw' from incompatible pointer type
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c: In function `primitiveSerialPortUnixCfsetispeed':
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c:197: warning: passing arg 1 of `cfsetispeed' from incompatible pointer type
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c: In function `primitiveSerialPortUnixCfsetospeed':
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c:227: warning: passing arg 1 of `cfsetospeed' from incompatible pointer type
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c: In function `primitiveSerialPortUnixTcgetattr':
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c:422: warning: passing arg 2 of `tcgetattr' from incompatible pointer type
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c: In function `primitiveSerialPortUnixTcsetattr':
/src/plugins/SerialExtendedUnixPlugin/SerialExtendedUnixPlugin.c:475: warning: passing arg 3 of `tcsetattr' from incompatible pointer type

Moreover there is a problem about undefined function : int
serialPortFindNamesPlusKeysstorage(int aUpperNumber, char
*aByteArray);

Two primitives used this function, I deleted it to see what will
happen. I added quickly a SerialPortTermiosUnix and then this
primitive failed :

primitiveSerialPortUnixTcgetattr: afd attributes: aByteString 
<primitive: 'primitiveSerialPortUnixTcgetattr' module:'SerialExtendedUnixPlugin'> 

So I think maybe the problem is with tcgetattr(fd,atermios) : I saw in
the appropriate .h that this function eats a structure, and we give it
a char* (atermios) ? Tried to compare with MacOS version (in
squeak.hpl.hp.com) but there is sometimes no plain code
(SerialExtendedPlugin.pbproj.sit and don't know what is this beast).

Since I'm not a C-pecialist, I'm stuck ! :-)


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

> I've sent you a copy of the header file.
> I believe Ned worked on it for linux, the original work was done
> under OpenBSD.
> If someone can put together a unix version we'll see about putting it
> into the SVN tree
>
> That of course includes fiddling with the Smalltalk side since *all*
> of the logic is in Smalltalk.
>
>
> On Jun 8, 2005, at 7:21 AM, Samir Saidani wrote:
>
>> Hi John,
>>
>> I'm playing with your work on Extended Serial Port. I looked onto the
>> code, and think that it should be possible to open a file like
>> '/dev/tty0' and write and read into it, is it right ? It's should be
>> more interesting than SerialPort since '/dev/ttyS0' is
>> hard-coded... But when I produce the plugin with VMMaker, it asks for
>> SerialExtendedUnixPlugin.h Can you tell me the first step to get it
>> working on linux ?
>>
>> Thanks !
>> Samir
>>
>> -- 
>> Samir SAIDANI
>> PhD Student in CS / Doctorant en informatique     web : http://
>> www.info.unicaen.fr/~saidani
>> Universite de Caen - Laboratoire GREYC          tel : 02-31-56-74-30
>> Equipe MAD - Campus II - 14032 Caen Cedex       fax : 02-31-56-76-30
>>
>>
>>
>
> --
> ========================================================================
> ===
> John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ========================================================================
> ===
>
>
>

-- 
Samir SAIDANI				
PhD Student in CS / Doctorant en informatique 	web : http://www.info.unicaen.fr/~saidani
Universite de Caen - Laboratoire GREYC          tel : 02-31-56-74-30
Equipe MAD - Campus II - 14032 Caen Cedex       fax : 02-31-56-76-30



More information about the Squeak-dev mailing list