- Purchase T95 development board
- Download the SDK and guidance documents of T95
- Compile new firmware
- Merge Source code
- Firmware burning
- Program effect demonstration
Sample_Applications can get SDK by purchasing T95 development kit Link : Thundercomm T95
This article summarizes the compilation and debugging steps. For detailed steps, please refer to the document 《Thundercomm+TurboX+T95+Platform+IoT+SDK+User+Guide.pdf》
Python is used to compile the sample in SDK, please install Python 2.7.9 or more advanced.
LLVM is used to compile the sample in SDK
- Build app firework
SDK\Sample_Applications\io9205_led> .\build_dam_sample_app.bat
- Push app with QFLOG
SDK> python.exe .\QFLOG\src\QFLOGPackage\QFLOG.py -p <COMPORT> PUSH -f <FilePath>
- Enable log view
SDK> python.exe .\QFLOG\src\QFLOGPackage\QFLOG.py -p <COMPORT> VIEW_LOGS
Sample_Applications\io9205_track\src\demo\io9205_net.c
t95_dss_cb
static void
t95_dss_cb( qapi_DSS_Hndl_t hndl, /* Handle for which this event is associated */
void *user_data, /* Application-provided user data */
qapi_DSS_Net_Evt_t evt, /* Event identifier */
qapi_DSS_Evt_Payload_t *payload_ptr) /* Associated event information */
{
// ...
// Call t95_coap_init in "QAPI_DSS_EVT_NET_IS_CONN_E"
if (evt == QAPI_DSS_EVT_NET_IS_CONN_E)
{
// ...
ret = t95_coap_init();
if (ret != 0)
{
LOG_ERROR("*****t95_coap_init failed!***** ret = %d", ret);
}
}
// ...
}
Sample_Applications\io9205_track\src\demo\track_demo_module.c
dam_app_routine
void dam_app_routine(void)
{
// ...
while (1)
{
// ...
// Call upload_dev_info at "while (1) "
ret = upload_dev_info();
if (ret == 0)
{
LOG_INFO("upload_dev_info succeed\n");
qapi_Timer_Sleep(3, QAPI_TIMER_UNIT_SEC, true);
}
else
{
LOG_INFO("upload_dev_info failed\n");
qapi_Timer_Sleep(3, QAPI_TIMER_UNIT_SEC, true);
}
LOG_INFO("upload_dev_info end\n");
// ...
}
// ...
}
Sample_Applications\io9205_track\src\demo\io9205_net.c
upload_dev_info
int upload_dev_info(void)
{
LOG_INFO("=====upload_dev_info start.=====\n");
LOG_INFO("======================= upload_dev_info sos msg =======================\n");
#if 1
LOG_INFO("upload_dev_info alarm msg\n");
if (QAPI_ERROR == app_coap_send_tracker_alarm_message_func())
{
LOG_INFO("upload_dev_info alarm msg error\n");
return -1;
}
LOG_INFO("upload_dev_info loc msg\n");
if (QAPI_ERROR == app_coap_send_tracker_loc_message_func())
{
LOG_INFO("upload_dev_info loc msg error\n");
return -1;
}
#endif
LOG_INFO("======================= upload_dev_info sos msg end! =======================\n");
return 0;
}
-
- Import io9205_coap_control.h io9205_coap_control.c File path.
-
- Add a reference to io9205_coap_control.h in io9205_net.h and track_demo_module.h
Flash fireware for T95, turn on TurboX T95, start joint debugging:
-
- Wait 1-2 minutes for SIM card network registration after powered up
-
- Click the button2 on T95
-
- Log in to the website from server
-
- Check the reported data based on the "user guide"