LWM2M and Legato 15.09

I am trying to figure out how to send LWM2M data to airvantage. I use a WP8548 with FW
SWI9X15Y_07.04.01.01 r29947 CARMD-EV-FRMWR1 2015/10/01 17:45:03
Legato v 15.09.

The modem communicates with the server. After enabling it with AT+WDSC=3,1. And I can from the server side make sure that basic data is transmitted(Network tech, signal strenght, traffic etc). But I can get my custom data to the server. I have done the following.

Updated aded and cdef file with assets and the bindings.
CDEF

[code]sources:
{
AcalWs.c
}
requires:
{
api:
{
le_avdata.api
}
}

assets:
{
AcalAsset =
{
variables:
{
int gpio_select
int blinky_interval
}
}
}[/code]
ADEF

[code]version: 1.0.0
maxFileSystemBytes: 512K
executables:
{
AcalWs = ( AcalWsComponent )
}

processes:
{
envVars:
{
LE_LOG_LEVEL = DEBUG
}
run:
{
( AcalWs )
}
maxCoreDumpFileBytes: 512K
maxFileBytes: 512K

}

bindings:
{
AcalWs.AcalWsComponent.le_avdata → avcService.le_avdata

}

[/code]
My code create the asset and try to send the data.

LE_INFO("Create asset");
asset = le_avdata_Create( "AcalAsset" );

LE_INFO("Register data callback");
gpio_select_event_handler = le_avdata_AddFieldEventHandler( asset, "gpio_select", gpio_select_event_handler_func, NULL);
LE_INFO("Send data to AirVantage");
le_avdata_SetInt( asset, "gpio_select", gpio );
le_avdata_SetInt( asset, "blinky_interval", blinky_interval );

On the server side I have created installed the application model

<?xml version="1.0" encoding="UTF-8"?> <app:application xmlns:app="http://www.sierrawireless.com/airvantage/application/1.0" name="AcalWs" type="AcalWs" revision="1.0"> <application-manager use="LWM2M_SW"/> <capabilities> <communication use="legato"/> <data> <encoding type="LWM2M"> <asset default-label="AcalAsset" id="AcalAsset"> <variable default-label="gpio_select" path="0" type="int"/> <variable default-label="blinky_interval" path="1" type="int"/> </asset> </encoding> </data> </capabilities> <binaries> <binary file="AcalWs.update"/> </binaries> </app:application>

The log looks like this

Oct 16 07:40:33 swi-mdm9x15 user.info Legato: INFO | AcalWs[7939]/AcalWsComponent T=main | AcalWs.c init_airvantage() 101 | Create asset Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | AcalWs[7939]/<invalid> T=main | le_avdata_client.c le_avdata_Create() 628 | Sending message to server and waiting for response : 10 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_appInfo_client.c le_appInfo_GetName() 571 | Sending message to server and waiting for response : 8 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.info Legato: INFO | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_CreateInstanceByName() 1835 | Creating asset instance for AcalWs/AcalAsset Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_CreateReadTxn() 434 | Sending message to server and waiting for response : 20 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_IsEmpty() 1473 | Sending message to server and waiting for response : 5 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GoToFirstChild() 817 | Sending message to server and waiting for response : 4 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetNodeName() 1138 | Sending message to server and waiting for response : 9 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c CreateAssetDataFromModelByName() 931 | assetId=0 Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetString() 1697 | Sending message to server and waiting for response : 14 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c CreateAssetDataFromModelByName() 935 | strBuf=Application Object Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c CreateAssetDataFromModelByName() 936 | assetNamePtr=AcalAsset Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GoToNextSibling() 893 | Sending message to server and waiting for response : 4 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetNodeName() 1138 | Sending message to server and waiting for response : 9 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c CreateAssetDataFromModelByName() 931 | assetId=1 Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetString() 1697 | Sending message to server and waiting for response : 14 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c CreateAssetDataFromModelByName() 935 | strBuf=Process Object Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c CreateAssetDataFromModelByName() 936 | assetNamePtr=AcalAsset Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GoToNextSibling() 893 | Sending message to server and waiting for response : 4 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetNodeName() 1138 | Sending message to server and waiting for response : 9 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c CreateAssetDataFromModelByName() 931 | assetId=1000 Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetString() 1697 | Sending message to server and waiting for response : 14 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c CreateAssetDataFromModelByName() 935 | strBuf=AcalAsset Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c CreateAssetDataFromModelByName() 936 | assetNamePtr=AcalAsset Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_CancelTxn() 624 | Sending message to server and waiting for response : 4 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.info Legato: INFO | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_CreateInstanceById() 1710 | Creating asset instance for AcalWs/1000 Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_CreateReadTxn() 434 | Sending message to server and waiting for response : 25 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_IsEmpty() 1473 | Sending message to server and waiting for response : 5 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GoToNode() 689 | Sending message to server and waiting for response : 11 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_IsEmpty() 1473 | Sending message to server and waiting for response : 5 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GoToFirstChild() 817 | Sending message to server and waiting for response : 4 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetNodeName() 1138 | Sending message to server and waiting for response : 9 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetString() 1697 | Sending message to server and waiting for response : 14 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetString() 1697 | Sending message to server and waiting for response : 18 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetString() 1697 | Sending message to server and waiting for response : 16 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetNodeType() 1061 | Sending message to server and waiting for response : 12 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c CreateFieldFromModel() 487 | No default for name=gpio_select Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GoToNextSibling() 893 | Sending message to server and waiting for response : 4 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetNodeName() 1138 | Sending message to server and waiting for response : 9 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetString() 1697 | Sending message to server and waiting for response : 14 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetString() 1697 | Sending message to server and waiting for response : 18 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetString() 1697 | Sending message to server and waiting for response : 16 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GetNodeType() 1061 | Sending message to server and waiting for response : 12 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c CreateFieldFromModel() 487 | No default for name=blinky_interval Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_GoToNextSibling() 893 | Sending message to server and waiting for response : 4 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_cfg_client.c le_cfg_CancelTxn() 624 | Sending message to server and waiting for response : 4 bytes sent Oct 16 07:40:33 swi-mdm9x15 user.info Legato: INFO | avcDaemon[573]/avcDaemon T=main | lwm2m.c AssetActionHandler() 379 | /AcalWs/1000/0 created. Oct 16 07:40:33 swi-mdm9x15 user.info Legato: INFO | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_CreateInstanceById() 1806 | Finished creating instance 0 for AcalWs/1000 Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | avData.c le_avdata_Create() 332 | instanceId=0 Oct 16 07:40:33 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_avdata_server.c Handle_le_avdata_Create() 557 | Sending response to client session 0x26674 : 4 bytes sent Oct 16 07:40:40 swi-mdm9x15 user.warn Legato: -WRN- | appCtrl[8269]/framework T=unknown | mem.c InitPool() 276 | Memory pool name 'framework.hashMap_refPathIteratorMap' is truncated to 'framework.hashMap_refPathIterat' Oct 16 07:40:40 swi-mdm9x15 user.warn Legato: -WRN- | appCtrl[8269]/framework T=main | mem.c InitPool() 276 | Memory pool name 'framework.hashMap_refEventHandlers' is truncated to 'framework.hashMap_refEventHandl' Oct 16 07:40:40 swi-mdm9x15 user.warn Legato: -WRN- | appCtrl[8269]/framework T=main | mem.c InitPool() 276 | Memory pool name 'framework.hashMap_refHandlersRef' is truncated to 'framework.hashMap_refHandlersRe' Oct 16 07:40:40 swi-mdm9x15 user.warn Legato: -WRN- | appCtrl[8269]/framework T=main | mem.c InitPool() 276 | Memory pool name 'framework.hashMap_MessagingServices' is truncated to 'framework.hashMap_MessagingServ' Oct 16 07:40:40 swi-mdm9x15 user.warn Legato: -WRN- | appCtrl[8269]/framework T=main | mem.c InitPool() 276 | Memory pool name 'framework.msgs-LogControlProtocol' is truncated to 'framework.msgs-LogControlProtoc' Oct 16 07:40:40 swi-mdm9x15 user.warn Legato: -WRN- | appCtrl[8269]/framework T=main | mem.c InitPool() 276 | Memory pool name 'framework.hashMap_refle_cfg_ClientHandler' is truncated to 'framework.hashMap_refle_cfg_Cli' Oct 16 07:40:40 swi-mdm9x15 user.warn Legato: -WRN- | appCtrl[8269]/framework T=main | mem.c InitPool() 276 | Memory pool name 'framework.msgs-9dc5b2438c9592bf35478c68b2' is truncated to 'framework.msgs-9dc5b2438c9592bf' Oct 16 07:40:40 swi-mdm9x15 user.warn Legato: -WRN- | appCtrl[8269]/framework T=main | mem.c InitPool() 276 | Memory pool name 'framework.hashMap_refle_appInfo_ClientHan' is truncated to 'framework.hashMap_refle_appInfo' Oct 16 07:40:40 swi-mdm9x15 user.warn Legato: -WRN- | appCtrl[8269]/framework T=main | mem.c InitPool() 276 | Memory pool name 'framework.msgs-2208f55cb1d01d5f75b2e75500' is truncated to 'framework.msgs-2208f55cb1d01d5f' Oct 16 07:40:40 swi-mdm9x15 user.err Legato: =ERR= | appCtrl[8269]/framework T=main | cgroups.c OpenCgrpFile() 167 | Could not open file '/sys/fs/cgroup/freezer/smsInboxService/tasks'. No such file or directory. Oct 16 07:40:40 swi-mdm9x15 user.err Legato: =ERR= | appCtrl[8269]/framework T=main | cgroups.c OpenCgrpFile() 167 | Could not open file '/sys/fs/cgroup/freezer/voiceCallService/tasks'. No such file or directory. Oct 16 07:40:43 swi-mdm9x15 user.info Legato: INFO | AcalWs[7939]/AcalWsComponent T=main | AcalWs.c init_airvantage() 108 | Send data to AirVantage Oct 16 07:40:43 swi-mdm9x15 user.debug Legato: DBUG | AcalWs[7939]/<invalid> T=main | le_avdata_client.c le_avdata_SetInt() 811 | Sending message to server and waiting for response : 20 bytes sent Oct 16 07:40:43 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_avdata_server.c Handle_le_avdata_SetInt() 683 | Sending response to client session 0x26674 : 0 bytes sent Oct 16 07:40:48 swi-mdm9x15 user.info Legato: INFO | avcDaemon[573]/avcDaemon T=main | lwm2m.c RegUpdateTimerHandler() 342 | RegUpdate timer expired; reporting REG_UPDATE Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3747 | tempStr=</legato/0/0>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3723 | tempStr=</le_avsysinfo/1>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3747 | tempStr=</lwm2m/9/0>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3747 | tempStr=</lwm2m/9/1>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3747 | tempStr=</le_iotBoard/0/0>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3723 | tempStr=</le_lwm2mControl/0>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3747 | tempStr=</le_AcalWs/1000/0>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3747 | tempStr=</le_iotBoard/1/0>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3723 | tempStr=</le_avsysinfo/0>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3747 | tempStr=</le_AcalWs/1/0>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3747 | tempStr=</le_AcalWs/0/0>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/avcDaemon T=main | assetData.c assetData_GetAssetList() 3723 | tempStr=</le_lwm2mControl/1>, Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | AcalWs[7939]/<invalid> T=main | le_avdata_client.c le_avdata_SetInt() 811 | Sending message to server and waiting for response : 24 bytes sent Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/le_pa T=main | swiQmi.c swiQmi_OEMCheckResponseCode() 722 | QMI_LWM2M_REG_UPDATE_REQ_V01 sent to Modem Oct 16 07:40:48 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon[573]/<invalid> T=main | le_avdata_server.c Handle_le_avdata_SetInt() 683 | Sending response to client session 0x26674 : 0 bytes sent

But non of my own data received in the server. If I look in the timeline everytime minute the device connects to the server but there is no data.

Can anyone give me some advise?

This issue has been solved.

First of all I used the auto generated manifest.app.

But most important was that it was necessary to use a report on the server side. The data was not sent automatically with LWM2M. This was a big difference compared to other protocols. Also to be able to create report it was necessary to create an “instance” on the server side.