nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
lwm2m_carrier.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  lwm2m_carrier_event_fota_start_t
 
struct  lwm2m_carrier_event_app_data_t
 
struct  lwm2m_carrier_event_deferred_t
 
struct  lwm2m_carrier_event_error_t
 
struct  lwm2m_carrier_event_t
 
struct  lwm2m_carrier_lg_uplus_config_t
 
struct  lwm2m_carrier_config_t
 

Macros

LwM2M carrier library events
#define LWM2M_CARRIER_EVENT_LTE_LINK_UP   1
 
#define LWM2M_CARRIER_EVENT_LTE_LINK_DOWN   2
 
#define LWM2M_CARRIER_EVENT_LTE_POWER_OFF   3
 
#define LWM2M_CARRIER_EVENT_BOOTSTRAPPED   4
 
#define LWM2M_CARRIER_EVENT_REGISTERED   5
 
#define LWM2M_CARRIER_EVENT_DEREGISTERED   6
 
#define LWM2M_CARRIER_EVENT_DEFERRED   7
 
#define LWM2M_CARRIER_EVENT_FOTA_START   8
 
#define LWM2M_CARRIER_EVENT_FOTA_SUCCESS   9
 
#define LWM2M_CARRIER_EVENT_REBOOT   10
 
#define LWM2M_CARRIER_EVENT_MODEM_DOMAIN   11
 
#define LWM2M_CARRIER_EVENT_APP_DATA   12
 
#define LWM2M_CARRIER_EVENT_MODEM_INIT   13
 
#define LWM2M_CARRIER_EVENT_MODEM_SHUTDOWN   14
 
#define LWM2M_CARRIER_EVENT_ERROR_CODE_RESET   15
 
#define LWM2M_CARRIER_EVENT_ERROR   20
 
LwM2M carrier library modem domain event types

#define LWM2M_CARRIER_MODEM_EVENT_ME_OVERHEATED   0
 
#define LWM2M_CARRIER_MODEM_EVENT_ME_BATTERY_LOW   1
 
#define LWM2M_CARRIER_MODEM_EVENT_RESET_LOOP   2
 
LwM2M carrier library app data event types
#define LWM2M_CARRIER_APP_DATA_EVENT_DATA_WRITE   0
 
#define LWM2M_CARRIER_APP_DATA_EVENT_OBSERVE_START   1
 
#define LWM2M_CARRIER_APP_DATA_EVENT_OBSERVE_STOP   2
 
LwM2M carrier library event deferred reasons
#define LWM2M_CARRIER_DEFERRED_NO_REASON   0
 
#define LWM2M_CARRIER_DEFERRED_PDN_ACTIVATE   1
 
#define LWM2M_CARRIER_DEFERRED_BOOTSTRAP_NO_ROUTE   2
 
#define LWM2M_CARRIER_DEFERRED_BOOTSTRAP_CONNECT   3
 
#define LWM2M_CARRIER_DEFERRED_BOOTSTRAP_SEQUENCE   4
 
#define LWM2M_CARRIER_DEFERRED_SERVER_NO_ROUTE   5
 
#define LWM2M_CARRIER_DEFERRED_SERVER_CONNECT   6
 
#define LWM2M_CARRIER_DEFERRED_SERVER_REGISTRATION   7
 
#define LWM2M_CARRIER_DEFERRED_SERVICE_UNAVAILABLE   8
 
#define LWM2M_CARRIER_DEFERRED_SIM_MSISDN   9
 
LwM2M carrier library event error types
#define LWM2M_CARRIER_ERROR_NO_ERROR   0
 
#define LWM2M_CARRIER_ERROR_LTE_LINK_UP_FAIL   1
 
#define LWM2M_CARRIER_ERROR_LTE_LINK_DOWN_FAIL   2
 
#define LWM2M_CARRIER_ERROR_BOOTSTRAP   3
 
#define LWM2M_CARRIER_ERROR_FOTA_FAIL   4
 
#define LWM2M_CARRIER_ERROR_CONFIGURATION   5
 
#define LWM2M_CARRIER_ERROR_INIT   6
 
#define LWM2M_CARRIER_ERROR_RUN   7
 
#define LWM2M_CARRIER_ERROR_CONNECT   8
 
LwM2M enabled carriers
#define LWM2M_CARRIER_GENERIC   0x00000001
 
#define LWM2M_CARRIER_VERIZON   0x00000002
 
#define LWM2M_CARRIER_LG_UPLUS   0x00000008
 
#define LWM2M_CARRIER_T_MOBILE   0x00000010
 
#define LWM2M_CARRIER_SOFTBANK   0x00000020
 
#define LWM2M_CARRIER_BELL_CA   0x00000040
 
LwM2M Server binding
#define LWM2M_CARRIER_SERVER_BINDING_UDP   0x01
 
#define LWM2M_CARRIER_SERVER_BINDING_NONIP   0x02
 
PDN types
#define LWM2M_CARRIER_PDN_TYPE_IPV4V6   0
 
#define LWM2M_CARRIER_PDN_TYPE_IPV4   1
 
#define LWM2M_CARRIER_PDN_TYPE_IPV6   2
 
#define LWM2M_CARRIER_PDN_TYPE_NONIP   3
 
LG U+ Device Serial Number types
#define LWM2M_CARRIER_LG_UPLUS_DEVICE_SERIAL_NO_IMEI   0
 
#define LWM2M_CARRIER_LG_UPLUS_DEVICE_SERIAL_NO_2DID   1
 
LwM2M carrier library modem initialization results

Used to pass on the modem update result in lwm2m_carrier_on_modem_init().

#define LWM2M_CARRIER_MODEM_INIT_SUCCESS   0
 
#define LWM2M_CARRIER_MODEM_INIT_UPDATED   1
 
#define LWM2M_CARRIER_MODEM_INIT_UPDATE_FAILED   2
 
LwM2M carrier requests
#define LWM2M_CARRIER_REQUEST_REBOOT   0
 
#define LWM2M_CARRIER_REQUEST_LINK_UP   1
 
#define LWM2M_CARRIER_REQUEST_LINK_DOWN   2
 
#define LWM2M_CARRIER_REQUEST_REGISTER   3
 
#define LWM2M_CARRIER_REQUEST_DEREGISTER   4
 
LwM2M carrier library app data container objects

Used in lwm2m_carrier_app_data_set() and lwm2m_carrier_event_app_data_t to identify the application date object.

#define LWM2M_CARRIER_OBJECT_BINARY_APP_DATA_CONTAINER   19
 
#define LWM2M_CARRIER_OBJECT_APP_DATA_CONTAINER   10250
 
LwM2M device available power sources

Values for the OMA LwM2M Device object Available Power Sources resource (/3/0/6). Set using lwm2m_carrier_avail_power_sources_set().

#define LWM2M_CARRIER_POWER_SOURCE_DC   0
 
#define LWM2M_CARRIER_POWER_SOURCE_INTERNAL_BATTERY   1
 
#define LWM2M_CARRIER_POWER_SOURCE_EXTERNAL_BATTERY   2
 
#define LWM2M_CARRIER_POWER_SOURCE_ETHERNET   4
 
#define LWM2M_CARRIER_POWER_SOURCE_USB   5
 
#define LWM2M_CARRIER_POWER_SOURCE_AC   6
 
#define LWM2M_CARRIER_POWER_SOURCE_SOLAR   7
 
LwM2M device error codes

Values for the OMA LwM2M Device object Error Code resource (/3/0/11).

Set using lwm2m_carrier_error_code_add() and cleared using lwm2m_carrier_error_code_remove().

#define LWM2M_CARRIER_ERROR_CODE_NO_ERROR   0
 
#define LWM2M_CARRIER_ERROR_CODE_LOW_CHARGE   1
 
#define LWM2M_CARRIER_ERROR_CODE_EXTERNAL_SUPPLY_OFF   2
 
#define LWM2M_CARRIER_ERROR_CODE_GPS_FAILURE   3
 
#define LWM2M_CARRIER_ERROR_CODE_LOW_SIGNAL   4
 
#define LWM2M_CARRIER_ERROR_CODE_OUT_OF_MEMORY   5
 
#define LWM2M_CARRIER_ERROR_CODE_SMS_FAILURE   6
 
#define LWM2M_CARRIER_ERROR_CODE_IP_CONNECTIVITY_FAILURE   7
 
#define LWM2M_CARRIER_ERROR_CODE_PERIPHERAL_MALFUNCTION   8
 
LwM2M device battery status

Values for the OMA LwM2M Device object Battery Status resource (/3/0/20).

Set using lwm2m_carrier_battery_status_set().

Note
The battery status resource is only relevant if lwm2m_carrier_power_source_values has been set to LWM2M_CARRIER_POWER_SOURCE_INTERNAL_BATTERY.
#define LWM2M_CARRIER_BATTERY_STATUS_NORMAL   0
 
#define LWM2M_CARRIER_BATTERY_STATUS_CHARGING   1
 
#define LWM2M_CARRIER_BATTERY_STATUS_CHARGE_COMPLETE   2
 
#define LWM2M_CARRIER_BATTERY_STATUS_DAMAGED   3
 
#define LWM2M_CARRIER_BATTERY_STATUS_LOW_BATTERY   4
 
#define LWM2M_CARRIER_BATTERY_STATUS_NOT_INSTALLED   5
 
#define LWM2M_CARRIER_BATTERY_STATUS_UNKNOWN   6
 
LwM2M portfolio identity types

Resource instance identifiers (y) for the OMA LwM2M Portfolio object Identity resource (/16/x/0/y).

Used in lwm2m_carrier_identity_read() and lwm2m_carrier_identity_write().

#define LWM2M_CARRIER_IDENTITY_ID   0
 
#define LWM2M_CARRIER_IDENTITY_MANUFACTURER   1
 
#define LWM2M_CARRIER_IDENTITY_MODEL   2
 
#define LWM2M_CARRIER_IDENTITY_SW_VERSION   3
 

Typedefs

typedef uint32_t lwm2m_carrier_event_modem_domain_t
 

Functions

int lwm2m_carrier_event_handler (const lwm2m_carrier_event_t *event)
 
int lwm2m_carrier_main (const lwm2m_carrier_config_t *config)
 
void lwm2m_carrier_on_modem_init (int result)
 
void lwm2m_carrier_on_modem_cfun (int mode)
 
void lwm2m_carrier_on_modem_shutdown (void)
 
int lwm2m_carrier_request (int request)
 
int lwm2m_carrier_data_send (const uint16_t *path, uint8_t path_len)
 
int lwm2m_carrier_custom_init (lwm2m_carrier_config_t *config)
 
void lwm2m_carrier_time_read (int32_t *utc_time, int *utc_offset, const char **tz)
 
int32_t lwm2m_carrier_utc_time_read (void)
 
int lwm2m_carrier_utc_offset_read (void)
 
char * lwm2m_carrier_timezone_read (void)
 
int lwm2m_carrier_utc_time_write (int32_t time)
 
int lwm2m_carrier_utc_offset_write (int offset)
 
int lwm2m_carrier_timezone_write (const char *tz)
 
int lwm2m_carrier_avail_power_sources_set (const uint8_t *power_sources, uint8_t power_source_count)
 
int lwm2m_carrier_power_source_voltage_set (uint8_t power_source, int32_t value)
 
int lwm2m_carrier_power_source_current_set (uint8_t power_source, int32_t value)
 
int lwm2m_carrier_battery_level_set (uint8_t battery_level)
 
int lwm2m_carrier_battery_status_set (int32_t battery_status)
 
int lwm2m_carrier_error_code_add (int32_t error)
 
int lwm2m_carrier_error_code_remove (int32_t error)
 
int lwm2m_carrier_memory_total_set (uint32_t memory_total)
 
int lwm2m_carrier_memory_free_read (void)
 
int lwm2m_carrier_identity_read (uint16_t instance_id, uint16_t identity_type, char *buffer, uint16_t *buffer_len)
 
int lwm2m_carrier_identity_write (uint16_t instance_id, uint16_t identity_type, const char *value)
 
int lwm2m_carrier_portfolio_instance_create (uint16_t instance_id)
 
int lwm2m_carrier_location_set (double latitude, double longitude, float altitude, uint32_t timestamp, float uncertainty)
 
int lwm2m_carrier_velocity_set (int heading, float speed_h, float speed_v, float uncertainty_h, float uncertainty_v)
 
int lwm2m_carrier_app_data_set (const uint16_t *path, uint16_t path_len, const uint8_t *buffer, size_t buffer_len)
 
int lwm2m_carrier_log_data_set (const uint8_t *buffer, size_t buffer_len)