ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.63k stars 2.96k forks source link

Can't initialize NB-IoT SIM with Ublox SARA-N211 #8199

Closed henningray closed 5 years ago

henningray commented 5 years ago

Description

Hello, I'm having trouble initializing a NB-IoT Sim card with my Ublox SARA-N211 (Firmware 6.57) via an OnboardCellularInterface. I can power up the modem successfully but in PPPCellularInterface::initialize_sim_card() I keep getting AT Error messages:

AT> AT+CPIN? AT? +CPIN: %*15[^ ] %n AT< AT! ERROR AT(Aborted)

Also, after the device tries to reconnect I receive

AT< +UFOTAS: 0,1

even though I am not sending a UFOTAS command. I am using Mbed OS 5.9.0 with GCC_ARM toolchain.

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug

adbridge commented 5 years ago

Internal Jira reference: https://jira.arm.com/browse/IOTCELL-1419

tho068 commented 5 years ago

Having the exact same issue. Just bought the C030-N211 devkit, and it is not working with my Telenor nbiot sim card. I suspect I need a firmware update for the nbiot modem, but this is nowhere to be found.

jarvte commented 5 years ago

Hi, Sorry for the delay!

PPPCellularInterface and OnboardCellularInterface are deprecated API's. You should use cellular framework: https://github.com/ARMmbed/mbed-os/tree/mbed-os-5.9/features/cellular

There is also mbed-os version 5.10 already available.

You can check from https://github.com/ARMmbed/mbed-os/blob/mbed-os-5.9/features/cellular/easy_cellular/EasyCellularConnection.cpp how Cellular API's are used to connect or use EasyCellularConnection class for easy connection like in example application: https://github.com/ARMmbed/mbed-os-example-cellular

Supported modules are in https://github.com/ARMmbed/mbed-os/tree/master/features/cellular/framework/targets

Br, Teppo

henningray commented 5 years ago

The main problem for me (and possibly for @tho068 ) was that the OnboardCellularInterface (and also EasyCellularConnection) uses several AT commands that are not supported on the SARA N2XX like the above AT+CPIN or AT+CGREG. So you either have to manually remove or replace them in the code or use the UbloxATCellularInterfaceN2xx: https://os.mbed.com/teams/ublox/code/example-ublox-cellular-interface/

tho068 commented 5 years ago

Yeah. That is true, so I ended up creating my own very small lib which worked perfectly.

— Med vennlig hilsen

Thomas Holden MSc, computer science

  1. okt. 2018 kl. 16:50 skrev henningray notifications@github.com<mailto:notifications@github.com>:

The main problem for me (and possibly for @tho068https://github.com/tho068 ) was that the OnboardCellularInterface (and also EasyCellularConnection) uses several AT commands that are not supported on the SARA N2XX like the above AT+CPIN or AT+CGREG. So you either have to manually remove or replace them in the code or use the UbloxATCellularInterfaceN2xx: https://os.mbed.com/teams/ublox/code/example-ublox-cellular-interface/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ARMmbed/mbed-os/issues/8199#issuecomment-428980517, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AG6I-B74yJjAqzDOjnPCzJidwJf-W6pUks5uj1q_gaJpZM4WyBz_.

jarvte commented 5 years ago

New cellular implementation folder https://github.com/ARMmbed/mbed-os/tree/mbed-os-5.10/features/cellular/framework/AT implements 3GPP AT commands. If target (SARA N2XX) differs from those then it needs a target to folder https://github.com/ARMmbed/mbed-os/tree/mbed-os-5.10/features/cellular/framework/targets where module/modem specific commands can be overridden.

You also need to specify target in mbed_app.json if it's not already in https://github.com/ARMmbed/mbed-os/blob/mbed-os-5.10/features/cellular/framework/common/CellularTargets.h