Files
BLV_C1F_Module/BasicCode/Drive/MQTT/aLiYun.h

78 lines
2.0 KiB
C
Raw Normal View History

#ifndef _ALIYUN_H
#define _ALIYUN_H
#include "mqtt.h"
#define ALIYUN_DOMAIN ".iot-as-mqtt.cn-shanghai.aliyuncs.com" //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD>׺
#define ALIYUN_CLIENT_ID "|securemode=3,signmethod=hmacsha1|" //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ClientID<49>̶<EFBFBD><CCB6><EFBFBD>׺
#define ALIYUN_CLIENT_ID2 "|securemode=3,signmethod=hmacsha1,timestamp=789|"
#define CLIENT_ID_KEY "clientId"
#define DEVICE_NAME_KEY "deviceName"
#define PRODUCTKEY_KEY "productKey"
#define NET485_PRODUCTKEY "a12hZXRHLLY"
#define NET485_DEVICE_NAME "NET485_1"
#define NET485_DEVICE_SECRET "804be6c043218f8c6a70175278aeca78"
#define NET485_DEVICE2_NAME "NET485_2"
#define NET485_DEVICE2_SECRET "590301f6291563957d96a329df8a6254"
#define NET485_PUBLISH "/a12hZXRHLLY/NET485_1/user/post"
#define NET485_SUBLISH "/a12hZXRHLLY/NET485_1/user/get"
#define NET485_PUBLISH2 "/a12hZXRHLLY/NET485_2/user/post"
#define NET485_SUBLISH2 "/a12hZXRHLLY/NET485_2/user/get"
#define FRG_PRODUCTKEY "a1STn6qUB4r"
#define FRG_DEVICE_NAME "34D0B8108D15"
#define FRG_DEVICE_SECRET "xlRTX2JSU10Bqp9ldgf4gP79euLGVDxT"
#define FRG_PUBLISH_ALIY "user/update"
#define FRG_PUBLISH "/a1STn6qUB4r/34D0B8108D15/user/update"
#define FRG_SUBLISH "/a1STn6qUB4r/34D0B8108D15/user/get"
#define DEF_PRODUCTKEY "a1STn6qUB4r"
#define DEF_ALIY_PUBLISH "user/update"
#define DEF_ALIY_SUBLISH "user/get"
#define DEF_ALIY_KEEPALIVE 120
#pragma pack(1)
typedef struct
{
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>*/
UINT8 productKey[12]; //productKey
UINT8 deviceName[65]; //<2F><EFBFBD><E8B1B8>
UINT8 deviceSecret[33]; //<2F><EFBFBD><E8B1B8>Կ
UINT8 publish[65]; //<2F><><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>MQTT<54><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7>׺<EFBFBD><D7BA><EFBFBD>ɳ<EFBFBD><C9B3><EFBFBD>ƴ<EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD>mqtt<74><74>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>ַ<EFBFBD><D6B7>
UINT8 sublish[65]; //<2F><><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6>ĵ<EFBFBD>ַ
/*MQTT<54><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
MQTT_DATA mqtt_data;
}ALIYUN_INFO;
#pragma pack()
UINT8 ALiYun_Machine_Init(MQTT_INFO* Mqtt_info, char* ProductKey, char* deviceName, char* DeviceSecret, char* sublish, int keepAliveInterval);
UINT8 ALIYUN_Flash_Parameter_Init(MQTT_INFO* Mqtt_info);
#endif