[squeak-dev] How to talk to a modem via a com port

Louis LaBrunda Lou at Keystone-Software.com
Fri Jan 30 14:28:54 UTC 2015


Hi Mateusz,

Thanks for the reply.  Late yesterday I discovered SerialPort and have it
working for the basics.

Lou


On Fri, 30 Jan 2015 11:08:31 +0100, Mateusz Grotek
<unoduetre at poczta.onet.pl> wrote:

>Dnia 29.01.2015 19:28:40, Louis LaBrunda napisa?(a):
>> Hi All,
>> 
>> Does anyone have some sample code to talk to a telephone modem  
>> through a
>> com port?  It is a USB modem that shows up on COM3.  I want to play  
>> with
>> getting the caller Id info.  Any help is appreciated, so thanks in  
>> advance.
>> 
>> Lou
>> -----------------------------------------------------------
>> Louis LaBrunda
>> Keystone Software Corp.
>> SkypeMe callto://PhotonDemon
>> mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com
>> 
>> 
>> 
>
>Hi,
>
>There is a class called SerialPort.
>You use it like that:
>|port input output|
>port := SerialPort new.
>"Here you can set up the port, check the settings protocol of the  
>SerialPort class."		
>port openPort: 0. "Here you can put a number, or a string like  
>'/dev/ttyS0' in Linux"
>output := port nextPutAll: 'ATI0',Character cr.
>Transcript showln: port readString.
>
>ATI0 is an example of the Hayes AT commands used to control modems  
>(they are use for most modems, not only Hayes), see here:
>http://en.wikipedia.org/wiki/Hayes_command_set
>
>BTW. if you have problems with the SerialPort class on Windows or OSX,  
>try Linux instead.
>
>Mateusz
>
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com



More information about the Squeak-dev mailing list