13-07-2024 08:31 AM
Hi all.
I have a D-Link DWM-222 4G LTE USB adapter plugged into my Raspberry Pi - and I was using it to send and receive SMS messages, using the gammu & wvdial packages. This all worked well overseas. I've come back to the UK, and gammu won't connect to the network :
$ gammu networkinfo
Network state : requesting network
Packet network state : requesting network
GPRS : detached
Taking the SIM card out, and putting it into my phone, I can call/send/receive SMS just fine. Put it back into the DWM-222 and it doesn't seem to connect to the network.
Here's a full trace of the gammu error logs when I try to make a call:
[Gammu - 1.42.0]
[Connection - "at"]
[Connection index - 0]
[Model type - "at"]
[Device - "/dev/ttyUSB1"]
[Running on - Linux, kernel 5.15.0-1055-raspi (#58-Ubuntu SMP PREEMPT Sat May 4 03:50:14 UTC 2024)]
[Module - "A2D|iPAQ|at|M20|S25|MC35|TC35|C35i|S65|S300|5110|5130|5190|5210|6110|6130|6150|6190|6210|6250|6310|6310i|6510|7110|8210|8250|8290|8310|8390|8850|8855|8890|8910|9110|9210"]
Locking device
Serial device: DTR is up, RTS is up, CAR is up, CTS is up
Setting speed to 115200
Escaping SMS mode
Sending simple AT command to wake up some devices
1 "AT"
2 "OK"
Checking line: OK
AT reply state: 1
Enabling echo
1 "ATE1"
2 "OK"
Checking line: OK
AT reply state: 1
Trying Motorola mode switch
1 "AT+MODE=2"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
Seems not to be supported
Enabling CME errors
1 "AT+CMEE=1"
2 "OK"
Checking line: OK
AT reply state: 1
1 "AT+CSCS?"
2 "+CSCS: "GSM""
3 "OK"
Checking line: OK
AT reply state: 1
1 "AT+CSCS=?"
2 "+CSCS: ("IRA","GSM","UCS2")"
3 "OK"
Checking line: OK
AT reply state: 1
Chosen GSM as normal charset
Chosen UCS2 as unicode charset
Getting model
1 "AT+CGMM"
2 "LTE WIRELESS MODEM"
3 "OK"
Checking line: OK
AT reply state: 1
Unknown model, but it should still work
[Model name: `LTE WIRELESS MODEM']
[Model data: `']
[Model data: `unknown']
1 "AT+CGMI"
2 "OK"
Checking line: OK
AT reply state: 1
Manufacturer info received
[Manufacturer: OK]
Checking for OBEX support
1 "AT+CPROT=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
Checking for SYNCML/OBEX support
1 "AT+SYNCML=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
1 "AT$TSSPCSW=?"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
1 "AT+CHUP=?"
2 "OK"
Checking line: OK
AT reply state: 1
Getting firmware versions
1 "AT+CGMR"
2 "M1.1.2_EA32_A1.1.7"
3 "OK"
Checking line: OK
AT reply state: 1
Received firmware version: "M1.1.2_EA32_A1.1.7"
Number version is "1.123212"
Set AT phone power on
1 "AT+CFUN=1"
2 "OK"
Checking line: OK
AT reply state: 1
[Connected]
Entering GSM_GetSMSStatus
Getting available SMS memories
1 "AT+CPMS=?"
2 "+CPMS: ("ME","MT","SM","SR"),("ME","MT","SM","SR"),("ME","MT","SM","SR")"
3 "OK"
Checking line: OK
AT reply state: 1
Available SMS memories received: read: ME : ok, SM : ok, SR : ok save: ME : ok, SM : ok, SR : ok, Motorola = no
Getting SIM SMS status
1 "AT+CPMS="SM","SM""
2 "+CPMS: 0,20,0,20,0,5"
3 "OK"
Checking line: OK
AT reply state: 1
SMS status received
Parsing +CPMS: 0,20,0,20,0,5 with +CPMS: @i, @i, @0
Parsed int 0
Parsed int 20
Used : 0
Size : 20
Getting phone SMS status
1 "AT+CPMS="ME","ME""
2 "+CPMS: 0,254,0,254,0,5"
3 "OK"
Checking line: OK
AT reply state: 1
SMS status received
Parsing +CPMS: 0,254,0,254,0,5 with +CPMS: @i, @i, @0
Parsed int 0
Parsed int 254
Used : 0
Size : 254
Leaving GSM_GetSMSStatus
Entering GSM_SetIncomingSMS
Leaving GSM_SetIncomingSMS
Entering GSM_SetIncomingCall
1 "AT+CCWA=0"
2 "OK"
Checking line: OK
AT reply state: 1
Disabling incoming call notification
Leaving GSM_SetIncomingCall
Entering GSM_SetIncomingCB
Leaving GSM_SetIncomingCB
Entering GSM_SetIncomingUSSD
Terminating possible incoming USSD
1 "AT+CUSD=2"
2 "ERROR"
Checking line: ERROR
AT reply state: 3
Disabling incoming USSD
1 "AT+CUSD=0"
2 "OK"
Checking line: OK
AT reply state: 1
Leaving GSM_SetIncomingUSSD
[Terminating]
[Closing]
I've updated my `/etc/wvdial.conf` file with the APN settings I found in the community (thanks everyone for posting these), so I have now:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
ISDN = 0
; New PPPD = yes
Modem = /dev/ttyUSB1
Baud = 9600
Username = eesecure
Password = secure
Dial Command = ATDT
Does anyone know how I can get it to connect to the GPRS network? I'm really only after SMS receipt. More would be great, but not required.
I'm figuring it must be GPRS settings, as it worked fine overseas when connecting to their cell towers, but won't work here in the UK.
Thanks in advance.
Solved! See the answer below or view the solution in context.
18-07-2024 10:32 AM
Hi again!
TL;DR - Solved by moving the 4G modem to a place with better signal.
I tried swapping it out to another SIM card I also know worked. And encountered the same issues. I gave up for the night, and woke up to find that the SMS texts did arrive, after 3hrs40mins odd - in the middle of the night. So I put the EE SIM back in and sent another text, and left everything alone.
That took another couple of hours - but it did eventually arrive. So I tried relocating the whole Raspberry Pi/4G modem to a different location in the house, where I knew the cell tower reception was stronger, and everything started working exactly as expected.
Apologies for the entire red-herring thread!
13-07-2024 12:12 PM
Hi there @fychan
Thanks for coming here 🙂
Does any other SIM card work for texts?
Has the EE SIM card worked for texts on this device in the past?
Leanne.
14-07-2024 07:13 AM
Hi 🙂
Not sure if other SIMs work on it - I don't have any others to hand at the moment.
But yes, the EE SIM card worked for texts to this device when I was using it overseas last month. All the same settings, and config, Which is what made me think it was likely a GPRS / network setting (reinforced by Gammu saying it's detatched and waiting for network) - when the same setup worked fine connected to another cell network.
The SIM works fine in my phone, when out of the device, so it's not a signal strength/lack of coverage issue either.
Thanks,.
14-07-2024 08:47 AM
Hi there @fychan
Thanks for coming back to me.
If the SIM card works in a mobile device for texts this is all set up for text messages, it may be worth contacting the manufacturer of the device to see if they can suggest anything for you to try.
Leanne.
14-07-2024 08:52 AM
But it was working in the manufacturers device overseas. It was all working, and then it stopped when I came home.
So it's not an incompatibility with the device. Only the device on the network in UK, which strongly suggests it's a network interaction issue.
14-07-2024 10:07 AM
Hi @fychan
If you would like to check everything is set up correctly for you at our end, please call our tech guides on 07953 966 150 and they will be happy to help 🙂
Leanne.
18-07-2024 10:32 AM
Hi again!
TL;DR - Solved by moving the 4G modem to a place with better signal.
I tried swapping it out to another SIM card I also know worked. And encountered the same issues. I gave up for the night, and woke up to find that the SMS texts did arrive, after 3hrs40mins odd - in the middle of the night. So I put the EE SIM back in and sent another text, and left everything alone.
That took another couple of hours - but it did eventually arrive. So I tried relocating the whole Raspberry Pi/4G modem to a different location in the house, where I knew the cell tower reception was stronger, and everything started working exactly as expected.
Apologies for the entire red-herring thread!