Sending/Receiving Bulk SMS via USB Modem and gnokii-smsd-pgsql

2.6k views Asked by At

I'm trying to send and receive bulk SMSs via a standard GSM USB Modem using gnokii-smsd-pgsql on Debain Squeeze 6.0.3 64-bit.

I'm following instructions from the following site: http://thelogbox.com/send-receive-sms-messages-usb-modem-linux/

I already had Postgres installed on my machine, so I used gnokii-smsd-pgsql.

shalin@developer-hp:/dev$ sudo apt-get install gnokii-smsd-pgsql 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gnokii-smsd-pgsql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 378 not upgraded.
shalin@developer-hp:/dev$ sudo apt-get install gnokii-smsd-pgsql 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gnokii-smsd-pgsql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 378 not upgraded.

When I try to find which port the modem is connected on, this is what I get:

shalin@developer-hp:~$ sudo lsusb 
[sudo] password for shalin: 
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 0461:0010 Primax Electronics, Ltd 
Bus 003 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 007: ID 19d2:0154 ONDA Communication S.p.A. 
Bus 001 Device 006: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 001 Device 002: ID 04e8:3426 Samsung Electronics Co., Ltd SCX-4500 Laser Printer
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
shalin@developer-hp:~$ 

The device is: ONDA Communication S.p.A.

shalin@developer-hp:~$ sudo dmesg | grep USB
[    0.471217] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.471311] ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
[    0.475052] uhci_hcd: USB Universal Host Controller Interface driver
[    0.487912] ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00
[    0.487956] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.487960] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.488073] hub 1-0:1.0: USB hub found
[    0.488148] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
[    0.488195] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[    0.488197] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.488257] hub 2-0:1.0: USB hub found
[    0.489428] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3
[    0.489495] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
[    0.489497] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.489559] hub 3-0:1.0: USB hub found
[    0.490862] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4
[    0.490916] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[    0.490918] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.490981] hub 4-0:1.0: USB hub found
[    0.491031] uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5
[    0.491082] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
[    0.491084] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.491141] hub 5-0:1.0: USB hub found
[    0.803706] usb 1-1: new high speed USB device using ehci_hcd and address 2
[    0.937425] usb 1-1: New USB device found, idVendor=04e8, idProduct=3426
[    0.937431] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.268016] usb 1-7: new high speed USB device using ehci_hcd and address 6
[    1.401680] usb 1-7: New USB device found, idVendor=058f, idProduct=6366
[    1.401683] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.406441] Initializing USB Mass Storage driver...
[    1.406635] scsi4 : SCSI emulation for USB Mass Storage devices
[    1.406703] USB Mass Storage support registered.
[    1.640040] usb 4-2: new full speed USB device using uhci_hcd and address 2
[    1.803952] usb 4-2: New USB device found, idVendor=1a86, idProduct=7523
[    1.803957] usb 4-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[    1.803961] usb 4-2: Product: USB2.0-Ser!
[    2.044018] usb 3-1: new low speed USB device using uhci_hcd and address 2
[    2.218546] usb 3-1: New USB device found, idVendor=093a, idProduct=2510
[    2.218552] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.218557] usb 3-1: Product: USB OPTICAL MOUSE
[    2.524518] usb 3-2: new low speed USB device using uhci_hcd and address 3
[    2.701552] usb 3-2: New USB device found, idVendor=0461, idProduct=0010
[    2.701558] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.701562] usb 3-2: Product: USB Keyboard
[    3.125256] usblp0: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x04E8 pid 0x3426
[    3.140601] USB Serial support registered for generic
[    3.140639] usbserial: USB Serial Driver core
[    3.163516] USB Serial support registered for ch341-uart
[    3.176282] usb 4-2: ch341-uart converter now attached to ttyUSB0
[    3.476799] input: PIXART USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input4
[    3.476877] generic-usb 0003:093A:2510.0001: input,hidraw0: USB HID v1.11 Mouse [PIXART USB OPTICAL MOUSE] on usb-0000:00:1d.1-1/input0
[    3.491755] input: NOVATEK USB Keyboard as /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/input/input5
[    3.491808] generic-usb 0003:0461:0010.0002: input,hidraw1: USB HID v1.10 Keyboard [NOVATEK USB Keyboard] on usb-0000:00:1d.1-2/input0
[    3.525651] input: NOVATEK USB Keyboard as /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.1/input/input6
[    3.525714] generic-usb 0003:0461:0010.0003: input,hidraw2: USB HID v1.10 Device [NOVATEK USB Keyboard] on usb-0000:00:1d.1-2/input1
[    3.525736] usbhid: v2.6:USB HID core driver
[ 1636.760031] usb 1-5: new high speed USB device using ehci_hcd and address 7
[ 1636.893751] usb 1-5: New USB device found, idVendor=19d2, idProduct=0154
[ 1636.893756] usb 1-5: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 1636.896329] scsi5 : SCSI emulation for USB Mass Storage devices
[ 1641.897006] scsi 5:0:0:0: CD-ROM            ZTE      USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2
shalin@developer-hp:~$ 

I should state that I haven't been on linux systems in a while and am beginning to suspect main reason why I have no clue as to which /dev/ folder modem is mapped to is because I'm on an older version of Debian.

I created and edited the config file as per instruction. File is located here:

/home/shalin/.config/

Edited as:

port = /dev/tty0

And:

model = AT

Finally, when I try to test using:

sudo gnokii --identify

gnokii isn't even listed in the possible command on prompt. Tab only goes to gnome, so I don't even think gnokii is installed.

As you can see, I have no idea whats wrong, and what exactly I should be doing. Any help will be greatly appreciated.

Regards, Shalin.

1

There are 1 answers

0
benjamin On
  1. I believe you haven't installed gnokii. smsd is NOT gnokii. Just apt-get install gnokii and then try running the gnokii --identify from the command line

  2. Also you have to make sure that the port is the exact port your modem is connected to. When I plugged my modem in and did dmesg it didn't list it but luckily I only had 6 USB ports so I just tried all of them until I found the right one. The line in my config file is:

port = /dev/ttyUSB3

the number at the end will vary depending on the port.

3.http://rolfblijleven.blogspot.nl/2013/01/raspberry-pi-as-sms-gateway.html