Title: Linux cellphone modem Subject: Send sms pages from server disconnected from network #------------------------------------------- # Setup cellphone as modem, over usbserial # REFERENCE: http://www.phonescoop.com/phones/p_forum.php?fm=m&ff=1303&fi=1383258 #------------------------------------------- # Disconnect phone, and record cat /proc/bus/usb/devices > pre_cell_phone # Connect phone diff /proc/bus/usb/devices pre_cell_phone |grep Vendor # < P: Vendor=22b8 ProdID=2ac4 Rev= 0.01 # Load load the usbserial module to use the phone modprobe usbserial vendor=0x22b8 product=0x2ac4 # Disconnect/reconnect the phone, and watch dmesg dmesg |grep usbserial # Setting up a ppp dialer # I haven't got here yet, but this is the basics # Username - @alltel.net # Password - alltel # Number - #777 # Device - /dev/ttyUSB0 # other apps to look at: # bitpim, kmobiletools, moto4lin, # # setup the phone to dial out # sudo su wvdialconf Editing `/etc/wvdial.conf'. Scanning your serial ports for a modem. Modem Port Scan<*1>: S0 S1 S2 S3 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 -- 64K 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 -- OK ttyACM0<*1>: Max speed is 460800; that should be safe. ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK Found an USB modem on /dev/ttyACM0. /etc/wvdial.conf: Can't open '/etc/wvdial.conf' for reading: No such file or directory /etc/wvdial.conf: ...starting with blank configuration. Modem configuration written to /etc/wvdial.conf. ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0" # # Look at the config file that was created # cat /etc/wvdial.conf [Dialer Defaults] Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Modem Type = USB Modem ; Phone = ISDN = 0 ; Username = Init1 = ATZ ; Password = Modem = /dev/ttyACM0 Baud = 460800 #------------------------ # teathered mode #------------------------ # Add this to /etc/wvdial.conf # # This mode gets the phone on-line, connected to your carrier, using your sim card as authentication. # The 'Phone' line depends on your phone manufacturor # [Dialer teathering] ;Init1 = ATM0DT Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Dial Command = ATM0DT Modem Type = USB Modem Modem = /dev/ttyACM0 Baud = 460800 ISDN = 0 Carrier Check = no Stupid mode = on Phone = *99# #------------------------ # sms #------------------------ # Each phone takes specific AT commands # http://en.wikipedia.org/wiki/Motorola_phone_AT_commands # I was able to send sms pages using: # Put phone in sms mode AT+CMGF=1 AT+CMGS="joe@my.domain.com"\n > test message ctrl-z