在stm32下位机上怎样获得app上数据透传的数据?
本帖最后由 Genius 于 2018-6-21 16:32 编辑#芯片stm32407
#使用的Mcu生成文件,数据点实现的数据透传
在app上我用的机智云的例程如下:
byte[] input1 = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 };
// byte[] input2 = { 11, 22, 33, 44, 55, 66, 77, 88, 99};
ConcurrentHashMap<String, Object> dataMap = new ConcurrentHashMap<String, Object>();
dataMap.put("kuozhan", input1);
device.write(dataMap, 0);
然后在stm32下位机上怎么的到这个透传数据?或者说下面的数据点里哪个是表示透传的?/** Event enumeration */
typedef enum
{
WIFI_SOFTAP = 0x00, ///< WiFi SOFTAP configuration event
WIFI_AIRLINK, ///< WiFi module AIRLINK configuration event
WIFI_STATION, ///< WiFi module STATION configuration event
WIFI_OPEN_BINDING, ///< The WiFi module opens the binding event
WIFI_CLOSE_BINDING, ///< The WiFi module closes the binding event
WIFI_CON_ROUTER, ///< The WiFi module is connected to a routing event
WIFI_DISCON_ROUTER, ///< The WiFi module has been disconnected from the routing event
WIFI_CON_M2M, ///< The WiFi module has a server M2M event
WIFI_DISCON_M2M, ///< The WiFi module has been disconnected from the server M2M event
WIFI_OPEN_TESTMODE, ///< The WiFi module turns on the test mode event
WIFI_CLOSE_TESTMODE, ///< The WiFi module turns off the test mode event
WIFI_CON_APP, ///< The WiFi module connects to the APP event
WIFI_DISCON_APP, ///< The WiFi module disconnects the APP event
WIFI_RSSI, ///< WiFi module RSSI event
WIFI_NTP, ///< Network time event
MODULE_INFO, ///< Module information event
TRANSPARENT_DATA, ///< Transparency events
EVENT_LEDonoff,
EVENT_main_password,
EVENT_TYPE_MAX ///< Enumerate the number of members to calculate (user accidentally deleted)
} EVENT_TYPE_T;
现在板子没有在手上,印象中是可以通过串口打印输出的方式看到APP下发的透传数据,在你的设备已经上线的情况下,你试试看行不行。 Seasonic 发表于 2018-6-20 22:41
现在板子没有在手上,印象中是可以通过串口打印输出的方式看到APP下发的透传数据,在你的设备已经上线的情 ...
那有没有接受这个透传数据的“”信号“”,在上位机传来这个透传数据时,单片机做出一些响应
页:
[1]