Dealing with Unix character devices?
Aaron J Reichow
reic0024 at d.umn.edu
Thu Aug 28 05:55:11 UTC 2003
Ahoy!
I'm rather new to dealing with Unix serial/character devices in Squeak.
Anyone have any tips to impart? Can I just approach grabbing data via a
/dev/* file with a regular FileStream, or do I need a) OSProcess or b)
something else?
All I'm interested in is reading from the device, I don't need to write to
it. The specific device is /dev/ttyS0, the physical device is the IR
port, and the purpose of this is to read codes from the IrDA keyboard I
have. The Qtopia driver doesn't seem to interact well with the Squeak VM,
so I thought I'd try my hand at writing a driver that has no underlying
dependencies beyond some serial access.
I've attempted to just use a file stream (FileStream oldFileNamed:
'/dev/ttyS0') and then sending it #next to get the next character.
Unfortunately, when I tell it to #next, Squeak just locks up. I've not
done much investigation as to why this is, but I thought perhaps this was
something others have dealt with in the past...
Platform is Linux/ARM on a Zaurus C760, Squeak 3.4 (among others). Any
tips would be much obliged!
Regards,
Aaron
--
"truth is beautiful, without doubt; but so are lies." :: r. w. emerson
More information about the Squeak-dev
mailing list
|