m2mb API docs  37.00.003
m2mb API sets documentation
m2mb API documentation

This documentation provides detailed information on the m2mb programming API to be used on Telit's CatM1/nBIoT modules supporting AppZone.

Typical usage of API groups requires:

  • Initialization of the group with a m2mb_xxx_init() function, which usually allows to configure a callback function
  • Usage of its API set, possibly managing the events through the callback function events
  • lastly a deinit with a m2mb_xxx_deinit() function e.g.
#include "m2mb_types.h"
#include "m2mb_net.h"
M2MB_NET_HANDLE network_handle = NULL;
void Network_callback(M2MB_NET_HANDLE h, M2MB_NET_IND_E net_event, UINT16 resp_size, void *resp_struct,
void *myUserdata)
{
M2MB_RESULT_E retVal = M2MB_RESULT_SUCCESS;
switch (net_event)
{
case M2MB_NET_GET_REG_STATUS_INFO_RESP:
stat_info = (M2MB_NET_REG_STATUS_T*)resp_struct;
break;
case M2MB_NET_GET_SIGNAL_INFO_RESP:
signal_info = (M2MB_NET_GET_SIGNAL_INFO_RESP_T*)resp_struct;
break;
case M2MB_NET_GET_BER_RESP:
ber_info = (M2MB_NET_GET_BER_RESP_T*)resp_struct;
break;
default:
break;
}
}
void M2MB_main( int argc, char **argv )
{
if(M2MB_RESULT_SUCCESS == m2mb_net_init(&network_handle, Network_callback, myUserdata))
{
m2mb_net_get_signal_info(network_handle); /* this will return immediately and be managed on the network callback function*/
}
}
m2mb_net_get_signal_info
M2MB_RESULT_E m2mb_net_get_signal_info(M2MB_NET_HANDLE h)
m2mb_net_get_signal_info gets information about signal strength.
M2MB_NET_REG_STATUS_T
Definition: m2mb_net.h:196
M2MB_NET_GET_SIGNAL_INFO_RESP_T
Definition: m2mb_net.h:226
m2mb_net_init
M2MB_RESULT_E m2mb_net_init(M2MB_NET_HANDLE *h, m2mb_net_ind_callback callback, void *userdata)
m2mb_net_init initializes NET service for current client.
m2mb_types.h
M2MB base types (ver. 121626N)
M2MB_NET_GET_BER_RESP_T
Definition: m2mb_net.h:235
m2mb_net.h
Header file for m2mb_net APIs.