ARMmbed / mbed-os-example-pelion

Mbed OS example for Pelion Device Management
Apache License 2.0
14 stars 34 forks source link

C030-R412M timeouts when connecting to Pelion over cellular [BUG] #129

Closed gggekov closed 4 years ago

gggekov commented 4 years ago

Describe the bug The U-blox C030-R412M board doesn't connect to Pelion. I have a SIM card and a freshly formatted SD card. I'm using a Vodafone SIM card in the UK, APN is set to wap.vodafone.co.uk in mbed_app.json as indicated by Vodafone. I have attached an antenna.

Expected behavior The board should connect to Pelion.

Logs The serial output I'm getting is

Application ready
[INFO][FSST]: KV Dir: kvstore, exists(verified) - now closing it
Connect to network
[INFO][CELL]: New CellularContext  (0x2000e160)
[INFO][CELL]: CellularContext connect
[INFO][CELL]: Start connecting (timeout 1000 ms)
[INFO][CELL]: Modem ready
[INFO][CELL]: Setup SIM (timeout 1000 ms)
[INFO][CELL]: SIM is ready
[INFO][CELL]: RSSI unknown
[INFO][CELL]: Network registration (timeout 180000 ms)
[INFO][CELL]: Continue after 1 seconds
[INFO][CELL]: RSSI unknown
[INFO][CELL]: Network registration (timeout 180000 ms)
[INFO][CELL]: Continue after 2 seconds
[INFO][CELL]: RSSI unknown
[INFO][CELL]: Network registration (timeout 180000 ms)
[INFO][CELL]: Continue after 4 seconds
[INFO][CELL]: RSSI unknown
[INFO][CELL]: Network registration (timeout 180000 ms)
[INFO][CELL]: Continue after 8 seconds
[INFO][CELL]: RSSI unknown
[INFO][CELL]: Network registration (timeout 180000 ms)
[INFO][CELL]: Continue after 16 seconds
[INFO][CELL]: RSSI unknown
[INFO][CELL]: Network registration (timeout 180000 ms)
[INFO][CELL]: Continue after 32 seconds
[INFO][CELL]: Network registration (timeout 180000 ms)
[INFO][CELL]: Continue after 64 seconds
[INFO][CELL]: RSSI -89 dBm
[INFO][CELL]: Network registration (timeout 180000 ms)
[INFO][CELL]: Continue after 128 seconds
[INFO][CELL]: RSSI -51 dBm
[INFO][CELL]: Network registration (timeout 180000 ms)
[INFO][CELL]: Continue after 600 seconds

Host system (please complete the following information):

Device information: Have the latest mbed-os-example-pelion code(latest commit on 22nd of April). Using mbed-OS and client pointed in there.

How can I get the board connected to Pelion? Thank you. George

ciarmcom commented 4 years ago

Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers. Internal Jira reference: https://jira.arm.com/browse/IOTPART-9158

gggekov commented 4 years ago

Hi,

FYI, here are logs with full debug flag in mbed_app.json.

Application ready
[INFO][FSST]: KV Dir: kvstore, exists(verified) - now closing it
Connect to network
[INFO][CELL]: New CellularContext  (0x2000e160)
[INFO][CELL]: CellularContext connect
[DBG ][CELL]: callback: 4106, err: 0, data: 4096
[INFO][CELL]: Start connecting (timeout 1000 ms)
[DBG ][CELL]: AT error -3012
[DBG ][CELL]: AT error -3012
[DBG ][CELL]: Init => Power
[DBG ][CELL]: callback: 4106, err: 0, data: 4096
[INFO][CELL]: Modem power ON (timeout 1000 ms)
[DBG ][CELL]: Power => Device ready
[DBG ][CELL]: callback: 4106, err: 0, data: 4096
[DBG ][CELL]: Device was not ready, calling soft_power_on()
[DBG ][CELL]: AT flush
[DBG ][CELL]: AT error -3012
[DBG ][CELL]: AT error -3012
[DBG ][CELL]: Device ready: retry 0/10
[DBG ][CELL]: callback: CellularStateRetryEvent, err: 0, data: 4096, retrycount: 0
[INFO][CELL]: Continue after 1 seconds
[DBG ][CELL]: callback: 4106, err: 0, data: 4096
[DBG ][CELL]: Device was not ready, calling soft_power_on()
[WARN][CELL]: URC already added with prefix: +CGEV: NW DEACT
[WARN][CELL]: URC already added with prefix: +CGEV: ME DEACT
[WARN][CELL]: URC already added with prefix: +CGEV: NW PDN D
[WARN][CELL]: URC already added with prefix: +CGEV: ME PDN D
[DBG ][CELL]: AT flush
[DBG ][CELL]: AT error -3012
[DBG ][CELL]: AT error -3012
[DBG ][CELL]: Device ready: retry 1/10
[DBG ][CELL]: callback: CellularStateRetryEvent, err: 0, data: 4096, retrycount: 1
[INFO][CELL]: Continue after 2 seconds
[DBG ][CELL]: callback: 4106, err: 0, data: 4096
[DBG ][CELL]: Device was not ready, calling soft_power_on()
[WARN][CELL]: URC already added with prefix: +CGEV: NW DEACT
[WARN][CELL]: URC already added with prefix: +CGEV: ME DEACT
[WARN][CELL]: URC already added with prefix: +CGEV: NW PDN D
[WARN][CELL]: URC already added with prefix: +CGEV: ME PDN D
[DBG ][CELL]: AT flush
[INFO][CELL]: Modem ready
[DBG ][CELL]: callback: 4096, err: 0, data: 4096
[DBG ][CELL]: Device ready => SIM pin
[DBG ][CELL]: callback: 4106, err: 0, data: 4097
[INFO][CELL]: Setup SIM (timeout 1000 ms)
[DBG ][CELL]: AT flush
[INFO][CELL]: SIM is ready
[DBG ][CELL]: callback: 4097, err: 0, data: 0
[DBG ][CELL]: Automatic network registration
[DBG ][CELL]: STM: set_registration: 0, plmn: NULL
[DBG ][CELL]: SIM pin => Signal quality
[DBG ][CELL]: callback: 4104, err: 0, data: -1
[DBG ][CELL]: Signal quality => Registering network
[DBG ][CELL]: callback: 4104, err: 0, data: -1
[INFO][CELL]: RSSI unknown
[DBG ][CELL]: callback: 4106, err: 0, data: 4098
[DBG ][CELL]: +CGREG: RegistrationUnknown, LAC -1, cell -1, RAT unknown
[INFO][CELL]: Network registration (timeout 180000 ms)
[DBG ][CELL]: callback: 4106, err: 0, data: 4098
[DBG ][CELL]: Automatic network registration
[DBG ][CELL]: Registering network: retry 0/10
[DBG ][CELL]: callback: CellularStateRetryEvent, err: 0, data: 4098, retrycount: 0
[INFO][CELL]: Continue after 1 seconds
[DBG ][CELL]: callback: 4104, err: 0, data: 4098
[INFO][CELL]: RSSI unknown
[DBG ][CELL]: callback: 4106, err: 0, data: 4098
[DBG ][CELL]: +CGREG: RegistrationUnknown, LAC -1, cell -1, RAT unknown
[INFO][CELL]: Network registration (timeout 180000 ms)
[DBG ][CELL]: callback: 4106, err: 0, data: 4098
[DBG ][CELL]: Registering network: retry 1/10
[DBG ][CELL]: callback: CellularStateRetryEvent, err: 0, data: 4098, retrycount: 1
[INFO][CELL]: Continue after 2 seconds
[DBG ][CELL]: callback: 4104, err: 0, data: 4098
[INFO][CELL]: RSSI unknown
[DBG ][CELL]: callback: 4106, err: 0, data: 4098
[DBG ][CELL]: +CGREG: RegistrationUnknown, LAC -1, cell -1, RAT unknown
[INFO][CELL]: Network registration (timeout 180000 ms)
[DBG ][CELL]: callback: 4106, err: 0, data: 4098
[DBG ][CELL]: Registering network: retry 2/10
[DBG ][CELL]: callback: CellularStateRetryEvent, err: 0, data: 4098, retrycount: 2
[INFO][CELL]: Continue after 4 seconds
[DBG ][CELL]: AT OoB readable 1, len 0
[DBG ][CELL]: +CREG: SearchingNetwork, LAC -1, cell -1, RAT unknown
[DBG ][CELL]: callback: 4098, err: 0, data: 2
[DBG ][CELL]: creg event, discard...
[DBG ][CELL]: +CGREG: SearchingNetwork, LAC -1, cell -1, RAT unknown
[DBG ][CELL]: AT OoB done

How shall I proceed to connect the board to Pelion?

teetak01 commented 4 years ago

Hi @gggekov, first you would need to get the cellular stack connecting somewhere.

@MarceloSalazar

MarceloSalazar commented 4 years ago

That's correct. You first need to get the IP address. It's probably worth trying other examples such as https://github.com/ARMmbed/mbed-os-example-cellular

teetak01 commented 4 years ago

@gggekov have you verified with example-cellular that the board works?

gggekov commented 4 years ago

Hi @teetak01 I couldn't get an IP address with mbed-os-example-cellular so I decided to use a different board instead. Feel free to close the issue.

phlegx commented 2 years ago

Hi @gggekov! Please check the MNO profile of the Ublox cellular chip with AT+UMNOPROF?. If the result is 0 try to set it to 19 or 100.

Set MNO profile with Ublox m-center:

AT+CFUN=4
AT+UMNOPROF=100
AT+CFUN=15

Also check the radio access technology (RAT) used and set the right RAT (e.g. AT+URAT=9,8).

AT+CFUN=4
AT+URAT=9,8
AT+CFUN=15