[105381] in North American Network Operators' Group
Re: smstools and CDMA
daemon@ATHENA.MIT.EDU (Andrey Gordon)
Sat Jun 21 00:12:17 2008
Date: Fri, 20 Jun 2008 23:11:25 -0500
From: "Andrey Gordon" <andrey.gordon@gmail.com>
To: "Douglas K. Rand" <rand@meridian-enviro.com>
In-Reply-To: <873an7hj3i.wl%rand@meridian-enviro.com>
Cc: nanog@merit.edu
Errors-To: nanog-bounces@nanog.org
------=_Part_2908_15232778.1214021485247
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
>From what I found is that smstools will only work with GSM AT command set,
so if you are 'locked' into CDMA you are screwed in regards of using
smstools.
I'm attaching the html page that I wrote up after I got the modem working in
case the server dies. I have to mention that i was only interested in
sending sms, so that's the only part I was messing with.
Andrey Gordon [andrey.gordon@gmail.com]
On Fri, Jun 20, 2008 at 4:50 PM, Douglas K. Rand <rand@meridian-enviro.com>
wrote:
> Andrey> I have a RHEL server that I connected MultiTech CDMA modem
> Andrey> (MTCBA-C-U-N3) and running smstools3 with it.
>
> Great!
>
> Andrey> Let me know if you want some documents that I wrote up when I
> Andrey> was messing with it.
>
> Yes, that'd be great.
>
------=_Part_2908_15232778.1214021485247
X-Attachment-Id: f_fhpp0b810
Content-Disposition: attachment; filename="Netmon2 CDMA modem notes.htm"
MIME-Version: 1.0
Content-Type: text/plain; name="Netmon2 CDMA modem notes.htm"
Netmon2 CDMA modem notes
_______________________________________________________________________
Operating System:
RHEL4
Application:
InterMapper/SMS
Version:
Security:
Author:
Andrey Gordon
Last Updated:
04/08/08
Overview
Here I will describe what I did to make the CDMA modem work on netmon2.
agordon@netmon2:/~$ cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 6)
agordon@netmon2:/~$ uname -r
2.6.9-67.0.7.ELsmp
More Information
Installing the driver:
When I first plugged in the modem it only showed up in
/proc/bus/usb/devices with the following record:
< T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
< D: Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
< P: Vendor=06e0 ProdID=f110 Rev= 1.01
< S: Manufacturer=Texas Instruments
< S: Product=TUSB3410 Serial Port
< C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
< I: If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
< E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
The device had now power (as it does even in windows before you
install the driver)
So I went on your support page:
[1]http://multitech.com/SUPPORT/Families/MultiModemCDMA/drivers.asp
There about in the middle of the page you will see "Linux drivers for
wireless USB modems"
File named wireless_linux.zip
That link is broken, so is the ReadMe file. But clicking on readme
takes me to
[2]ftp://ftp.multitech.com/wireless/wireless_linux.txt/ (this maybe
behavior of Firefox3 on Mac)
I went up a directory into [3]ftp://ftp.multitech.com/wireless
There was a file that should have been referenced from the support
page
[4]ftp://ftp.multitech.com/wireless/wireless_linux.zip
Unzipping that file revealed
drwxr-xr-x 3 agordon epicadm 4096 Apr 4 11:49 .
drwxr-xr-x 4 agordon epicadm 4096 Apr 4 11:05 ..
-rw-r--r-- 1 agordon epicadm 950 Apr 4 11:06 readme.txt
-rw-r--r-- 1 agordon epicadm 159077 Apr 4 11:06 ti_usb-1.1-1.src.rpm
-rw-r--r-- 1 agordon epicadm 156137 Apr 4 11:06 ti_usb-1.1.tgz.gz
-rw-r--r-- 1 agordon epicadm 143048 Apr 4 11:06
ti_usb_2.6-1.1-1.src.rpm
-rw-r--r-- 1 agordon epicadm 140357 Apr 4 11:06 ti_usb_2.6-1.1.tgz
-rw-r--r-- 1 agordon epicadm 16358 Apr 4 11:06
ti_usb_2.6_release_notes-1.1.txt
-rw-r--r-- 1 agordon epicadm 16385 Apr 4 11:06
ti_usb_multitech-1.1.tgz
-rw-r--r-- 1 agordon epicadm 10325 Apr 4 11:06
ti_usb_multitech_release_notes-1.1.txt
-rw-r--r-- 1 agordon epicadm 22299 Apr 4 11:06
ti_usb_release_notes-1.1.txt
Of particular interest I found ti_usb_2.6-1.1-1.src.rpm
RedHat Enterprise server 4 has no kernel sources, just headers, so I
followed the following link to get sources for RHEL4 kernel
[5]http://kbase.redhat.com/faq/FAQ_85_5109.shtm
After installing sources, I followed the ReadMe in the
wireless_linux.zip file, basically giving these commands:
sudo rpmbuild --rebuild ti_usb_2.6-1.1-1.src.rpm
sudo rpm -Uvh ti_usb_2.6-1.1-1.i386.rpm
After this /dev/ttyUSB0 was created and the modem received power. I
have not tested the send/receive yet, but I think on the right track
here.
I also appears that after any RedHat updates you need to reinstall the
RPM package.
Installing the SMS software:
I downloaded SMS server tools v.3. [6]http://smstools3.kekekasvi.com/
Unfortunately, they are written for GSM modems. They detect our CDMA
modem just fine, but the message sending format is slightly different.
GSM modems have a concept of PDU, which is basically all the info like
destination, message text, etc encoded together. CDMA modems have to
send it in clear text.
After unzipping smstools3-3.0.10.tar.gz in ./src folder I edited two
files:
In smsd.c I replaced this text
make_pdu(to,text,textlen,alphabet,flash,report,with_udh,udh_data,device
s[deevice].mode,pdu,validity, replace_msg);
if (strcasecmp(devices[device].mode,"old")==0)
sprintf(command,"AT+CMGS=%i\r",(int)strlen(pdu)/2);
else
sprintf(command,"AT+CMGS=%i\r",(int)strlen(pdu)/2-1);
sprintf(command2,"%s\x1A",pdu);
With this text
sprintf(command,"AT+CMGS=\"%s\"\r",to);
sprintf(command2,"%s\x1A",text);
This takes care of the message command format
Now we need to trick the software at the point where it tries to select
the PDU mode for the modem, because this command simply does not exist
on CDMA modems and returns and error.
In modeminit.c I replaced this line:
strcpy(command,"AT+CMGF=0\r");
with this one
strcpy(command,"AT\r");
Now we compile and install the software. So the intermapper can make
use of this we need a few changes. The outgoing folder for SMS need be
writable by intermapper, so I made it writable by everyone. It's
located in /var/spool/sms/outgoing
To make use of CLI notifier in intermapper I made a symbolic link in
/opt/Intermapper/InterMapper_Settings/Tools to /usr/local/bin/sendsms
which is a script installed by the smstools
Also, smstools need configuration file to run:
agordon@netmon2:/~$ cat /etc/smsd.conf
# Example smsd.conf. Read the manual for a description
devices = CDMA1
logfile = /var/log/smsd.log
loglevel = 5
[CDMA1]
device = /dev/ttyUSB0
incoming = no
baudrate = 115200
The last item is to create an rc.d link for the service to start on
boot.
$cd /etc/rc3.d
$sudo ln -s ../init.d/sms3
And start the service. Intermapper CLI notifier should look like so:
sendsms 608xxxxxxx `${MESSAGE}'
References
1. https://vpn1.epicsystems.com/+CSCO+ch756767633A2F2F7A68796776677270752E70627A++/SUPPORT/Families/MultiModemCDMA/drivers.asp
2. file://localhost/+CSCOE+/files/files_retr/init/html/file/ftp://7367632E7A68796776677270752E70627A/wireless/wireless_linux.txt/
3. file://localhost/+CSCOE+/files/files_retr/init/html/file/ftp://7367632E7A68796776677270752E70627A/wireless
4. file://localhost/+CSCOE+/files/files_retr/init/html/file/ftp://7367632E7A68796776677270752E70627A/wireless/wireless_linux.zip
5. https://vpn1.epicsystems.com/+CSCO+ch756767633A2F2F786F6E66722E657271756E672E70627A++/faq/FAQ_85_5109.shtm
6. https://vpn1.epicsystems.com/+CSCO+ch756767633A2F2F667A666762627966332E78727872786E6669762E70627A++/
------=_Part_2908_15232778.1214021485247--