Someone here was talking about sending / receiving SMS messages. My motive to figure out how to do this on my Neo was that I needed to activate an online account and add more minutes. They wanted to send me an SMS message with my initial password. Necessity being the mother of learning...
<br><br>I had trouble getting this to work and getting all the text returned using libgsmd-tool. It seems gsmd doesn't care for "unsolicited messages" and when I ask to retrieve all my messages, a lot of data is returned which gsmd doesn't like, and therefore drops it instead of sending it back to libgsmd-tool.
<br><br>That's ok. cu is pretty easy to use - I just used it instead.<br><br>To get into an SMS mode (there are two modes - PDU and text mode). I think gsmd prefers PDU mode, but I learned to do it text mode. Switching over is easy. You can read up on it here:
<br><a href="http://www.developershome.com/sms/operatingMode.asp" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.developershome.com/sms/operatingMode.asp</a><br><br>I think the following will turn off, then on, the gsm modem. I do it in an attempt to reset the modem and start from a known state. If anyone knows anything about this, please elaborate.
<br><br>Turn gsm off:<br>echo 0 > /sys/bus/platform/devices/gta01-pm-gsm.0/power_on<br><br>Turn gsm back on:<br>echo 1 > /sys/bus/platform/devices/gta01-pm-gsm.0/power_on<br><br>And fire up cu:<br>cu -l /dev/ttySAC0
<br><br>Once you get the "Connected." line hit [Enter] a few times or "AT" followed by [ENTER] and you should get an "OK". Now go at it...<br><br>Turn on echoing so you can see what you're doing (use control-H to backspace on mistakes):
<br>ATE1<br><br>Then register or "turn on" the network. Can't remember exactly what these commands mean:
<br>AT+CFUN=1<br>AT+COPS<br><br>Then go into SMS mode:<br>AT+CMGF=1<br><br>Now you can play. If you've already sent yourself an SMS message to your phone, you can now retrieve it - and all the others with:<br>AT+CMGL="ALL"
<br>+CMGL: 1,"REC READ","907",,"07/07/30,18:21:45-20",129,156<br>Welcome to T-Mobile! To check your balance and refill your account, go to <a href="http://my.t-mobile.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
my.t-mobile.com</a>
or visit t-zones on your phone. Your T-Mobile number is XXXXXXXXXX<br>+CMGL: 2,"REC READ","907",,"07/07/30,18:59:33-20",129,156<br>Welcome to T-Mobile! To check your balance and refill your account, go to
<a href="http://my.t-mobile.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">my.t-mobile.com</a> or visit t-zones on your phone. Your T-Mobile number is XXXXXXXXXX<br>+CMGL: 3,"REC READ","XXXXXXXXXXX",,"07/08/02,15:01:51-20",145,5
<br>Hello
<br>+CMGL: 4,"REC READ","501",,"07/08/02,15:14:43-20",129,92<br><a href="mailto:tselfcare@t-mobile.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">tselfcare@t-mobile.com
</a> /Temporary Password /Dear Customer, Your temporary password is XXXXXX
<br>+CMGL: 5,"REC READ","724",,"07/08/02,15:18:42-20",129,150<br>Your balance is 140 minutes ($28.04). You are $75 from Gold Rewards where you get 15% more minutes on subsequent refills & unused minutes last a year.
<br>+CMGL: 6,"REC READ","724",,"07/08/02,15:18:42-20",129,145<br>Free MSG: $25.00 has been added to your account. Your new balance is 140 minutes and the new expiration date is 10-31-2007. Thanks for refilling!
<br><br>OK<br><br>And to send a message, it's:<br>AT+CMGS="Phone #"<br>Then press the [Enter] key and you'll get a ">" prompt. Enter your message and press control-Z.<br>For example:<br>AT+CMGS="1234567890"
<br>> HOWDY<br><br>Then hit control-Z<br>You should get an "OK" and the message should be on its way.<br><br>I'm sure someone here can go through and make these directions a little better. Just wanted to get things started - then maybe we can get them added to the wiki.
<br><br>
Again - you can learn a lot more about SMS at the above web page.<br><br>