Bug: Gemalto cellular driver fails for EMS31-US modem

23 Oct 2019

Hi, I'm bouncing back and forth between a target with a Gemalto EMS31-US modem and one with a Gemalto ELS61-US modem. When the ELS61 is sent the command "AT^SISS=0,"conId",0<cr>", it responds with "<cr><ln>OK<cr><ln>". However, when the EMS31 is sent the same command, it responds with "<cr><ln>+CME ERROR: 50<cr><ln>". Error 50 indicates "Incorrect parameter", according to its AT spec.

The source of this command is the file "mbed-os\features\cellular\framework\targets\GEMALTO\CINTERION\GEMALTO_CINTERION_CellularStack.cpp":

"#define CONNECTION_PROFILE_ID 0"

...

nsapi_error_t GEMALTO_CINTERION_CellularStack::socket_open_defer(CellularSocket *socket, const SocketAddress *address)

{

int connection_profile_id = CONNECTION_PROFILE_ID;

...

_at.at_cmd_discard("^SISS", "=", "%d%s%d", internet_service_id, "conId", connection_profile_id);

The problem is that "conId" must be followed by a number between 1 and 8 inclusive for the EMS31, whereas the ELS61 accepts a number between 0 and 5 inclusive there (according to their AT specs).

This could be fixed in a couple of ways. 1. (more work for the driver author, less work for users): Since the driver already detects which Gemalto modem it's actually connected to at run-time, it could use that knowledge to set the variable connection_profile_id dynamically rather than to a #defined constant. 2. (less work for the driver author, more work for users): Put a conditional compilation directive around the #define, so that it can be overridden by EMS31 users in their project files:

  1. ifndef CONNECTION_PROFILE_ID
  2. define CONNECTION_PROFILE_ID 0
  3. endif ifndef CONNECTION_PROFILE_ID

Thanks

Jack

28 Oct 2019

Hi Jack,

Regarding a defect or bug, please raise issue on our GitHub project here.

https://github.com/ARMmbed/mbed-os

Thanks, Desmond