GSM modem stops responding after CMGL and CMGR commands - gsm

I have an LG B470 flip phone. I want to be able to send and receive text messages from my Mac Laptop running OS X 10.10.5.
I have the phone plugged in via USB. I can send SMS messages using the minicom terminal. However, attempting to list or read SMS messages from the phone/modem causes the modem to stop responding:
AT
OK
ATI
Manufacturer: LG ELECTRONICS
Model: LGB470
Revision: LGB470-QSC6270-V10c-JAN-11-2016-ATT-US 1 [JAN 11 2016 22:00:00]
SVN: 01
IMEI: 359926084167819
+GCAP: +CGSM,+DS,+ES
OK
AT+CPMS?
+CPMS: "ME",15,500,"ME",15,500,"SM",0,30
OK
AT+CMGF=1
OK
AT+CMGS="+12146168895"
> Hello World.
+CMGS: 169
OK
AT+CMGL="ALL"
I get no response and can no longer communicate at all. Typing is not echoed back and if I turn local echoing on and attempt to send the AT command I get no response. The only way to get the modem to respond is by restarting the phone (unplugging and plugging back in the phone's USB, etc. does not help).
The same thing happens after AT+CMGR commands.
Question
Why does the phone/modem stop responding after AT+CMGL and AT+CMGR commands? How can I fix this so I can get incoming SMS messages from my phone to my mac? Any tips on how to debug?
Setup
I did not install any drivers. When I plugged my phone into my mac via USB it was recognized automatically. It is shown as an internet modem in System Preferences->Network. Some character devices were also created:
$ ll /dev/tty.*
crw-rw-rw- 1 root wheel 18, 4 Apr 20 13:27 /dev/tty.BIGJAMBOXbyJawbone-SPPD
crw-rw-rw- 1 root wheel 18, 2 Apr 20 13:27 /dev/tty.Bluetooth-Incoming-Port
crw-rw-rw- 1 root wheel 18, 0 Apr 20 13:27 /dev/tty.Bluetooth-Modem
crw-rw-rw- 1 root wheel 18, 6 Apr 20 13:27 /dev/tty.LGB470-LGPCSuite
crw-rw-rw- 1 root wheel 18, 12 Apr 20 13:46 /dev/tty.lgusbmodem1411
crw-rw-rw- 1 root wheel 18, 14 Apr 20 13:46 /dev/tty.lgusbserial1411
tty.lgusbmodem1411 (lg usb modem 1411) and tty.lgusbserial1411 (lg usb serial 1411) disappear and reappear when I unplug and plug in the phone's USB. tty.LGB470-LGPCSuite is always there and seems to reference the LG PC Suite software which is not compatible with my phone.
I can also connect to it via Bluetooth and transfer files via the "Bluetooth File Exchange" app.
minirc.dfl:
pu port /dev/tty.lgusbmodem1411
pu lock /usr/local/Cellar/minicom/2.7.1/var
pu escape-key Escape (Meta)
Additional Info
As reported by the ATI command, my LGB470 phone uses the Qualcomm QSC6270 "HEDGE (HSDPA/WCDMA and GSM/GPRS/EDGE)" chipset. I can not find documentation on the GSM modem/AT commands, however.

Related

Unable to communicate with SIM800 board on raspberry pi 4

I have connected a new Itead sim800 board to a Raspberry Pi 4 Model B and trying to handle incoming SMS.
I have disabled the serial login shell using the link and tried gammu and minicom(with /dev/ttyAMA0, /dev/serial0 & /dev/serial1 on baud rate 9600).
But the board doesn't seem to be responding.
Following is the result of gammu.
pi#tpk:~ $ sudo gammu getallsms
No response in specified timeout. Probably the phone is not connected.
pi#tpk:~ $
Following is the result of minicom:
pi#tpk:~ $ sudo minicom -D /dev/ttyAMA0 -b 9600
Welcome to minicom 2.7.1
OPTIONS: I18n
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyAMA0, 04:46:20
Press CTRL-A Z for help on special keys
and the console hangs without accepting any characters. The status line at the bottom shows that it's offline.
Following is the snap of the boards connected.
sim800 board on raspberry pi 4

Raspberry pi 3 Serial Communication

I want to connect an 5" HDMI display (26 header pins) to a Raspberry Pi 3. I also want to use UART0 (Tx=GPIO14, Rx=GPIO15).
So I remapped UART 0 to Tx=GPIO36 and RX=GPIO37 by using the command in config.txt file:
dtoverlay=uart0 ,txd0_pin36,rxdo_pin=37,pin_func=7 # alt 3
I also included the following commands in rc.local:
raspi-gpio set 14 ip
raspi-gpio set 15 ip
On entering raspi-gpio get command, I am getting TXD0 and RXD0 enabled at GPIO14, GPIO15 and GPIO36, GPIO37 respectively, but still serial communication is not working. Though it was working on GPIO14, GPIO15.
Now how to enable serial communication on GPIO36, GPIO37?

BeagleBone Black MRF24j40

I am trying to get a MRF24j40 on a BeagleBone Black to talk to an arduino with a mrf24j40. I have successfully communicated arduino to arduino but as of yet have not been able to receive the packets being sent out on the BBB.
The setup: I have GPIO_13 going to reset (pin 2), GPIO_14 going to wake (pin 3) and GPIO_29 going to interrupt (4). The 3.3v is going to vin on 10 and ground on pin 1. I am using SPI1 with the HDMI ports disabled. D0 is mapping to pin 7 (SDO) and D1 is mapping to pin 5 (SDI), P9.31 the clock goes to pin 6 and P9.28 goes to pin 8.
I have been able to log into the BBB via ssh. I then load the cape for the MRF24j40 using the echo to /sys/devices/bone_capemgr.9/slots
This appears to load the driver properly.
I have then been able to do:
iz listphy
iz: /lib/arm-linux-gnueabihf/libnl-genl-3.so.200: no version information available (required by iz)
iz: /lib/arm-linux-gnueabihf/libnl-3.so.200: no version information available (required by iz)
wpan-phy0 IEEE 802.15.4 PHY object
page: 0 channel: n/a
channels on page 0: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
iz add wpan-
iz: /lib/arm-linux-gnueabihf/libnl-genl-3.so.200: no version information available (required by iz)
iz: /lib/arm-linux-gnueabihf/libnl-3.so.200: no version information available (required by iz)
Registered new device ('wpan0') on phy wpan-phy0
I decided to set all my addresses to simple things on the arduino side in case there is some sort of endian problem so the pan id is 0, the address of the sender is 0 and it sends the data to 1, thus I try to set the beaglebone to pan id 0, address 1 with a destination address of 0.
root#beaglebone:~# iz set wpan0 0 1 12
iz: /lib/arm-linux-gnueabihf/libnl-genl-3.so.200: no version information available (required by iz)
iz: /lib/arm-linux-gnueabihf/libnl-3.so.200: no version information available (required by iz)
ifconfig wpan0 up
Then I run
izchat 0 1 0
I get nothing on the BBB side even though the other side is constantly transmitting... and when I type into izchat, I do not receive anything on the other side.
Any help here would be appreciated... I just want to see some data before I start coding. Like I said, this has been tested arduino to arduino and does not have problems.

Embedded Linux USB driver for SAM7 serial

I have a device using an Atmel processor running under Linux. To this device I want to connect a remote device using a AT91SAM7 processor. This remote device is configured to do a pseudo-serial over the USB, under Windows this works fine and shows up as "AT91 USB to Serial Converter (COM3)".
Under Linux the device appears in the /dev as following:
crw-rw---- 1 root root 253, 7 Aug 30 10:52 /dev/usbdev2.2_ep00
crw-rw---- 1 root root 253, 5 Aug 30 10:52 /dev/usbdev2.2_ep01
crw-rw---- 1 root root 253, 6 Aug 30 10:52 /dev/usbdev2.2_ep82
crw-rw---- 1 root root 253, 4 Aug 30 10:52 /dev/usbdev2.2_ep83
What must I do in order to communicate with the device? Some driver to bind into the kernel? Or does a loadable driver (.ko) exist?
Based on what yo wrote, the embedded board with the AT91SAM7 processor is correctly configured, since it works when you connect it to a windows host.
If it does not work under linux, probably it is due to the fact that it does not recognize the vendorid:productid values.
On the linux host check the output of lsusb:
ottavio#ottavio:~$ lsusb
Bus 004 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
ottavio#ottavio:~$
in this case, that a USB<->RS232 converter I have on my computer. You should have a line related to your board when you plug it.
Now, depending on your system you may need to user usbserial or ftdi_sio. So try first to load usbserial
modprobe usbserial vendor=0x067b product=0x2303
if this does not work try loading ftdi_sio
modprobe ftdi_sio vendor=0x067b product=0x2303
Pay attatention that if the modules are already loaded you need to rmmod them. Finally, in my example vendrid is 0x067b and product is 0x2303, you'll need to use the correct values.

Raspberry Pi sim900 Default Internet Access

I have set up a ITEAD sim900 GSM module to interface with raspberry pi. I believe I have established a gprs connection to AT&T though wvdial as I get these results.
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: AT+CGDCONT=1,"IP","Broadband"
AT+CGDCONT=1,"IP","Broadband"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu Aug 14 05:49:20 2014
--> Pid of pppd: 2794
I have been looking all over the internet for some answers to a few questions that I have, but I can't seem to find any. Any help with the following questions will be greatly appreciated! Thanks!
I have three questions, and some may be stupid as I am VERY new to this field.
Am I actually connected to AT&T's GPRS network?
How can I make this module (serial port /dev/ttyAMA0) my default internet connection? What I mean is I want all internet traffic routed through this modem(web surfing, email etc.). I am connected to the Raspberry via ssh so I have to have either ethernet or wifi active to access the computer--I am currently using ethernet. After I connect through wvdial in the way shown above, and disable all other internet sources I have no access. It seems to still be looking to the active ethernet port for data(I could be wrong).
For my project I need to have the sim900 modem as the internet access point, but I also need to be able to connect to a LAN via wifi that has no internet access. Is this possible?
Finally i got the ( raspberrypi + ppp + gprs/gsm-modem ) working.
Some notes before start:
Make sure the power supply you used for raspberrypi is exact 5V and it can provide at-least 2A current without voltage drop-out.The SIM900 power-source must be 3.3V 2A
Set the SIM900 baud rate to 115200 via: AT+IPR=115200
Check the modem serial peripheral via: $ screen /dev/ttyAMA0 115200 type AT<enter> it will echo: OK. Hit ctrl+a k y to exit.
/etc/ppp/options-mobile
ttyAMA0
115200
lock
crtscts
modem
passive
novj
defaultroute
replacedefaultroute
noipdefault
usepeerdns
noauth
hide-password
persist
holdoff 10
maxfail 0
debug
Create the /etc/ppp/peers directory:
$ mkdir /etc/ppp/peers
$ cd /etc/ppp/peers
/etc/ppp/peers/mobile-auth
file /etc/ppp/options-mobile
user "your_usr"
password "your_pass"
connect "/usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat"
/etc/ppp/peers/mobile-noauth
file /etc/ppp/options-mobile
connect "/usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat"
Create the /etc/ppp/chatscripts directory:
$ mkdir /etc/ppp/chatscripts
/etc/ppp/chatscripts/mobile-modem.chat
ABORT 'BUSY'
ABORT 'NO CARRIER'
ABORT 'VOICE'
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT 'DELAYED'
REPORT CONNECT
TIMEOUT 6
'' 'ATQ0'
'OK-AT-OK' 'ATZ'
TIMEOUT 3
'OK' #/etc/ppp/chatscripts/pin
'OK\d-AT-OK' 'ATI'
'OK' 'ATZ'
'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0'
'OK' #/etc/ppp/chatscripts/mode
'OK-AT-OK' #/etc/ppp/chatscripts/apn
'OK' 'ATDT*99***1#'
TIMEOUT 30
CONNECT ''
/etc/ppp/chatscripts/my-operator-apn
AT+CGDCONT=1,"IP","<apn-name>"
/etc/ppp/chatscripts/pin.CODE
AT+CPIN=1234
/etc/ppp/chatscripts/pin.NONE
AT
/etc/ppp/chatscripts/mode.3G-only
AT\^SYSCFG=14,2,3fffffff,0,1
/etc/ppp/chatscripts/mode.3G-pref
AT\^SYSCFG=2,2,3fffffff,0,1
/etc/ppp/chatscripts/mode.GPRS-only
AT\^SYSCFG=13,1,3fffffff,0,0
/etc/ppp/chatscripts/mode.GPRS-pref
AT\^SYSCFG=2,1,3fffffff,0,0
The SYSCFG line in the mode.* files is device-dependent, and likely Huawei-specific, So You may use the mode.NONE file if your modem is
SIM900.
*
/etc/ppp/chatscripts/mode.NONE
AT
Make some symbolic links:
$ ln -s /etc/ppp/chatscripts/my-operator-apn /etc/ppp/chatscripts/apn
$ ln -s /etc/ppp/chatscripts/mode.NONE /etc/ppp/chatscripts/mode
$ ln -s /etc/ppp/chatscripts/pin.NONE /etc/ppp/chatscripts/pin
If you have to enter credentials use mobile-auth
$ mv provider provider.example
$ ln -s /etc/ppp/peers/mobile-noauth /etc/ppp/peers/provider
Check syslog in another console:
$ tail -f /var/log/syslog | grep -Ei 'pppd|chat'
Finally issue the pon command to see the result:
$ pon
The base instruction : https://wiki.archlinux.org/index.php/3G_and_GPRS_modems_with_pppd

Resources