Reputation: 329
I am currently sending data from STM32 to a mobile app using BLE. I use a specific characteristic for the data, which starts with a header containing a CMD. This CMD indicates the type of data being sent. I have only three commands so far. Now, I am unsure about the best practices for sending data back from the app to the STM32:
typedef enum {
BLE_P_TYPE_NONE = 0x00,
// STM32 -> PC
BLE_P_TYPE_GW_INFO = 0x01,
BLE_P_TYPE_NODES_INFO = 0x02,
// PC -> STM32
BLE_P_TYPE_START_PAIR = 0x80,
BLE_P_TYPE_STOP_PAIR = 0x81,
BLE_P_TYPE_DELETE_NODE = 0x82,
BLE_P_TYPE_NODE_CONTROL = 0x83,
} eBLELinkCharPacketType;
Thank you for your advice!
Upvotes: 1
Views: 50