Unstructured Supplementary Service Data

group LWGSM_USSD

Unstructured Supplementary Service Data.

Functions

lwgsmr_t lwgsm_ussd_run(const char *code, char *resp, size_t resp_len, const lwgsm_api_cmd_evt_fn evt_fn, void *const evt_arg, const uint32_t blocking)

Run USSD command, such as *123# to get balance on SIM card.

Parameters
  • code[in] Code to run, such as *123#

  • resp[out] Pointer to array to save response

  • resp_len[in] Length of array, including string NULL termination

  • evt_fn[in] Callback function called when command has finished. Set to NULL when not used

  • evt_arg[in] Custom argument for event callback function

  • blocking[in] Status whether command should be blocking or not

Returns

lwgsmOK on success, member of lwgsmr_t enumeration otherwise