View Single Post

  #3 (permalink)  
Old 03-14-2008
Bill Marcum
 
Posts: n/a
Default Re: Serial communication

On 2008-03-13, frances.albanese@gmail.com <frances.albanese@gmail.com> wrote:
>
>
> Hi,
> I need to establish an automatic communication on a serial line with a
> gsm. I'm wondering whether it is possible to issue some commands in a
> script fashion so that I have not to put commands by hand every time I
> need to send a SMS, for instance. I'd like not to spend too much time
> making a C program.
> What I need it is a method to feed a serial terminal (like cu or
> minicom) with scripted command, skipping the interactive mode.
>
> Thanks


echo hello > /dev/ttyS0
or
exec 3>/dev/ttyS0
echo hello >&3

If you need to wait for a response from the device, you could use chat
or expect.
Reply With Quote