資源簡介
包含M5310的開發文檔資料(AT指令集、設計參考手冊、M5310通信流程示例等)、開發工具、onenet開發代碼例程等。
代碼片段和文件信息
#include?
#include?
#include?
#include?
#include?
typedef?enum
{
MIPL_DEBUG_LEVEL_NONE?=?0
MIPL_DEBUG_LEVEL_RXL
MIPL_DEBUG_LEVEL_RXL_RXD
MIPL_DEBUG_LEVEL_TXL_TXD
}?MIPL_DEBUG_LEVEL_E;
typedef?unsigned?char?uint8;
typedef?unsigned?short?uint16;
typedef?unsigned?uint32;
typedef?struct
{
uint8?boot;
uint8?encrypt;
MIPL_DEBUG_LEVEL_E?debug;
uint16?port;
uint32?keep_alive;
size_t?uri_len;
char*?uri;
size_t?ep_len;
char*?ep;
uint8?block1; //COAP?option?BLOCK1(PUT?or?POST)0-6.?2^(4+n)??bytes
uint8?block2; //COAP?option?BLOCK2(GET)0-6.?2^(4+n)??bytes
uint8?block2th; //max?size?to?trigger?block-wise?operation0-2.?2^(8+n)?bytes
}?MIPL_T;
void?usage(?const?char?*name?)
{
printf(?“Usage:?%s?[OPTION]\r\n“?name?);
printf(?“Launch?a?client.\r\n“?);
printf(?“version:?v1.2\r\n“?);
printf(?“Options:\r\n“?);
printf(?“-b?BOOT\t\tSet?the?bootstrap?mode?of?the?client.Default:?0\r\n“?);
printf(?“-d?DEBUG\tSet?the?debug?mode?of?the?client.Default:?0\r\n“?);
printf(?“-e?ENCRYPT\tSet?the?encrypt?of?the?client.\r\n“?);
printf(?“-i?URI\t\tSet?the?coap?uri?of?the?server?to?connect?to.?For?example:?coap://localhost:5683\r\n“?);
printf(?“-n?NAME\t\tSet?the?endpoint?name[imei;imsi]?of?the?client.\r\n“?);
printf(?“-p?PORT\t\tSet?the?local?port?of?the?client?to?bind?to.?Default:?srand\r\n“?);
printf(?“-t?TIME\t\tSet?the?lifetime?of?the?client.?Default:?300\r\n“?);
printf(?“-u?BLOCK1\tSet?COAP?option?BLOCK1(PUT?or?POST)0-6.?Default?5(512B)2^(4+n)\r\n“);
printf(?“-g?BLOCK2\tSet?COAP?option?BLOCK2(GET)0-6.?Default?5(512B)2^(4+n)\r\n“);
printf(?“-x?BLOCK2TH\tSet?max?size?to?trigger?block-wise?operation0-2.?Default?2(1024B)2^(8+n)\r\n“);
printf(?“\r\n“?);
}
void?output_buffer(unsigned?char?*buffer?int?lengthint?index?int?flag)
{
int?i?=?0;
while?(?i? {
printf(?“%02X“?buffer[i++]?);
}
printf(“%d%d\r\n“indexflag);
}
/*****************************************************************
???????0???????????????1???????????????2???????????????3?
0?1?2?3?4?5?6?7?0?1?2?3?4?5?6?7?0?1?2?3?4?5?6?7?0?1?2?3?4?5?6?7?
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|?boot?|?encrypt|?????debug?????|??????????local_port?????????|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|??????????????????????????life_time??????????????????????????|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|???????????host_len????????????|?????????????host????????????|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|??????????ep_name_len??????????|??????ep_name(imei;imsi)?????|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|??coap_block1??|??coap_block2??|????block2th???|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*****************************************************************/
void?mipl_generate(char?*buf?size_t?buflen
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-12-13?14:27??onenet?m5310+stm32f103\
?????目錄???????????0??2017-12-21?18:08??onenet?m5310+stm32f103\M5310文檔資料\
?????文件?????3460868??2017-12-21?18:08??onenet?m5310+stm32f103\M5310文檔資料\M5310?AT?Command?B657SP2-v2.4-B8-0929.pdf
?????文件??????256125??2017-06-09?10:01??onenet?m5310+stm32f103\M5310文檔資料\M5310參考設計V1.0.pdf
?????文件?????2434147??2017-06-09?10:01??onenet?m5310+stm32f103\M5310文檔資料\M5310硬件設計手冊_V1.0.pdf
?????目錄???????????0??2017-12-21?18:15??onenet?m5310+stm32f103\M5310的使用例程\
?????文件?????2725968??2017-12-21?18:15??onenet?m5310+stm32f103\M5310的使用例程\M5310通信流程示例v2.2.0930.pdf
?????文件??????188473??2017-11-17?17:29??onenet?m5310+stm32f103\M5310的使用例程\OneNET_config_v1.2.exe
?????文件???????18516??2017-11-20?10:46??onenet?m5310+stm32f103\M5310的使用例程\README.docx
?????文件????????6596??2017-11-17?17:29??onenet?m5310+stm32f103\M5310的使用例程\miplconf_generate_v1.2.c
?????文件??????976750??2017-11-20?14:45??onenet?m5310+stm32f103\NB_IOT開發板V2.1.PDF
?????文件??????782976??2017-11-21?12:29??onenet?m5310+stm32f103\OneNET-NB開發板V2.1硬件使用手冊.pdf
?????目錄???????????0??2017-12-22?12:00??onenet?m5310+stm32f103\OneNET_M5310_COAP\
?????文件?????1089536??2017-04-11?17:28??onenet?m5310+stm32f103\OneNET_M5310_COAP\COAP.IAB
?????文件???????10968??2017-04-11?17:28??onenet?m5310+stm32f103\OneNET_M5310_COAP\COAP.IAD
?????文件??????290816??2017-03-31?16:14??onenet?m5310+stm32f103\OneNET_M5310_COAP\COAP.IMB
?????文件????????3168??2017-04-06?23:37??onenet?m5310+stm32f103\OneNET_M5310_COAP\COAP.IMD
?????文件?????????548??2017-11-29?22:31??onenet?m5310+stm32f103\OneNET_M5310_COAP\COAP.PFI
?????文件?????????776??2017-11-29?22:31??onenet?m5310+stm32f103\OneNET_M5310_COAP\COAP.PO
?????文件???????51992??2017-11-21?09:16??onenet?m5310+stm32f103\OneNET_M5310_COAP\COAP.PR
?????文件??????289944??2017-04-09?21:52??onenet?m5310+stm32f103\OneNET_M5310_COAP\COAP.PRI
?????文件?????2121960??2017-04-18?16:39??onenet?m5310+stm32f103\OneNET_M5310_COAP\COAP.PS
?????文件????????6316??2017-11-29?20:04??onenet?m5310+stm32f103\OneNET_M5310_COAP\COAP.SearchResults
?????文件??????100189??2017-11-29?22:33??onenet?m5310+stm32f103\OneNET_M5310_COAP\COAP.WK3
?????目錄???????????0??2017-12-13?14:25??onenet?m5310+stm32f103\OneNET_M5310_COAP\Hal\
?????文件???????12669??2017-11-16?14:58??onenet?m5310+stm32f103\OneNET_M5310_COAP\Hal\BH1750.c
?????文件????????1709??2017-09-27?16:59??onenet?m5310+stm32f103\OneNET_M5310_COAP\Hal\BH1750.h
?????文件????????4160??2017-11-23?16:04??onenet?m5310+stm32f103\OneNET_M5310_COAP\Hal\BMP180.c
?????文件?????????670??2017-09-27?17:00??onenet?m5310+stm32f103\OneNET_M5310_COAP\Hal\BMP180.h
?????文件????????7063??2017-09-29?15:31??onenet?m5310+stm32f103\OneNET_M5310_COAP\Hal\OLED.c
?????文件?????????739??2017-09-29?14:11??onenet?m5310+stm32f103\OneNET_M5310_COAP\Hal\OLED.h
............此處省略498個文件信息
評論
共有 條評論