FrontlineSMS

FrontlineSMS let users send, receive and manage SMS over a mobile network.

How to use /dev/ttyACM0 like /dev/ttyS0 whith a phone pluged on a linux computer

Hi all,

I make this post to give my experience for using a Nokia 3220 and FrontlineSMS 1.5.4 under linux ubuntu, using 2.6.24-16-generic kernel.

First i connect my phone to my computer, and ubuntu detected it like a ppp modem, and mounted it on /dev/ACM0.
Here is my syslog output :
--------------------------------------------------------------------------------------------------
Jan 26 11:35:09 tsf-niger-desktop kernel: [250511.859379] usb 3-2: new full speed USB device using ohci_hcd and address 4
Jan 26 11:35:09 tsf-niger-desktop kernel: [250511.960747] usb 3-2: configuration #1 chosen from 1 choice
Jan 26 11:35:09 tsf-niger-desktop NetworkManager: [1232966109.957735] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_421_802_noserial').
Jan 26 11:35:09 tsf-niger-desktop kernel: [250511.962109] /build/buildd/linux-2.6.24/drivers/usb/class/cdc-acm.c: This device cannot do calls on its own. It is no modem.
Jan 26 11:35:09 tsf-niger-desktop kernel: [250511.969737] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
Jan 26 11:35:10 tsf-niger-desktop NetworkManager: [1232966110.132624] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_421_802_noserial_if1').
Jan 26 11:35:10 tsf-niger-desktop NetworkManager: [1232966110.186810] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_421_802_noserial_if0').
Jan 26 11:35:10 tsf-niger-desktop NetworkManager: [1232966110.188897] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_421_802_noserial_if0_serial_unknown_0').
--------------------------------------------------------------------------------------------------

Frontline wait a ttyS0 device (port com), so i've linked my ACM0 device to S0 device with this command line :
sudo ln -sf /dev/ttyACM0 /dev/ttyS0.

After, i used wvdial (a ppp connection manager) to reconfigure all tty com device with this command line :
sudo wvdialconf
Here is my output :
--------------------------------------------------------------------------------------------------
Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

Modem Port Scan<*1>: Scanning ttyACM0 first, /dev/modem is a link to it.
WvModem<*1>: Cannot get information for serial port.
ttyACM0<*1>: ATQ0 V1 E1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 Z -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM0<*1>: Modem Identifier: ATI -- Nokia
ttyACM0<*1>: Speed 4800: AT -- OK
ttyACM0<*1>: Speed 9600: AT -- OK
ttyACM0<*1>: Speed 19200: AT -- OK
ttyACM0<*1>: Speed 38400: AT -- OK
ttyACM0<*1>: Speed 57600: AT -- OK
ttyACM0<*1>: Speed 115200: AT -- OK
ttyACM0<*1>: Speed 230400: AT -- OK
ttyACM0<*1>: Speed 460800: AT -- ��
ttyACM0<*1>: Speed 460800: AT -- ��
ttyACM0<*1>: Speed 460800: AT -- ��
ttyACM0<*1>: Max speed is 230400; that should be safe.
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
WvModem<*1>: Cannot get information for serial port.
ttyS0<*1>: ATQ0 V1 E1 -- OK
ttyS0<*1>: ATQ0 V1 E1 Z -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyS0<*1>: Modem Identifier: ATI -- Nokia
ttyS0<*1>: Speed 4800: AT -- OK
ttyS0<*1>: Speed 9600: AT -- OK
ttyS0<*1>: Speed 19200: AT -- OK
ttyS0<*1>: Speed 38400: AT -- OK
ttyS0<*1>: Speed 57600: AT -- OK
ttyS0<*1>: Speed 115200: AT -- OK
ttyS0<*1>: Speed 230400: AT -- OK
ttyS0<*1>: Speed 460800: AT -- ��
ttyS0<*1>: Speed 460800: AT -- ��
ttyS0<*1>: Speed 460800: AT -- ��
ttyS0<*1>: Max speed is 230400; that should be safe.
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
Modem Port Scan<*1>: S2 S3

Found an USB modem on /dev/ttyACM0, using link /dev/modem in config.
Modem configuration written to /etc/wvdial.conf.
ttyACM0: Speed 230400; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
ttyS0: Speed 230400; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
--------------------------------------------------------------------------------------------------

I think it was a necessary step to inform my system there is a modem attached on ttyS0.

After this steps, i launched Frontline. It works. Frontline found my phone on /dev/ttyS0, and configure it properly.

I hope my help will be usefull for you.

Phil.

Views: 12662

Tags: /dev/ttyACM0, /dev/ttyS0, 3220, frontline, frontlinesms, linux, nokia, phone, pluged, ubuntu

Comment

You need to be a member of FrontlineSMS to add comments!

Join FrontlineSMS

Comment by Sean Hilliard on November 7, 2010 at 10:22pm
Thanks phil, I actually used this trick to be able to run a program using arduino and processing.
Comment by Sakthivel on April 20, 2009 at 8:12am
Hi,
Its working great for me
Thanks.
But like Pablo, i would like to know how do we save these settings?
Comment by Pablo on April 7, 2009 at 1:56pm
Hi
the solution works great, I would like to know how to save these preference because when I reboot the machine I have to configure it again
regards
Comment by eyedol on January 27, 2009 at 10:09am
That solution worked for me too. :-)
Comment by kiwanja on January 26, 2009 at 5:55pm
Thanks, Phil!

We appreciate you sharing this - and the other Forum post - with us.

Ken

Photos

  • Add Photos
  • View All

© 2014   Created by FrontlineSMS Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service