Bluetooth Low Energy based Firmware Over The Air with Mbed. Mbed part is a external processor of the IoT devices and communicate with a Bluetooth module. The Bluetooth module have to support BLE and implement BLE FOTA profile designed by ours. BLE FOTA profile specification is available from our GIT hub wiki(https://github.com/sevencore/BLEFOTA).
Dependencies: mbed
Fork of mbed_fota by
Bluetooth Low Energy based Firmware Over The Air with Mbed. Mbed part is a external processor of the IoT devices and communicate with a Bluetooth module. The Bluetooth module have to support BLE and implement BLE FOTA profile designed by ours. BLE FOTA profile specification is available from our GIT hub wiki.
ext_fota/SerialManager.h@5:e11b23f9aacc, 2015-07-13 (annotated)
- Committer:
- dudnwjs
- Date:
- Mon Jul 13 06:32:05 2015 +0000
- Revision:
- 5:e11b23f9aacc
- Parent:
- 2:dba344c91bce
- Child:
- 6:8dd20294b2aa
Fota Service Add complete
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dudnwjs | 2:dba344c91bce | 1 | #ifndef SERIALMANAGER_H |
dudnwjs | 2:dba344c91bce | 2 | #define SERIALMANAGER_H |
dudnwjs | 2:dba344c91bce | 3 | |
dudnwjs | 2:dba344c91bce | 4 | #include "mbed.h" |
dudnwjs | 2:dba344c91bce | 5 | |
dudnwjs | 2:dba344c91bce | 6 | namespace sevencore_fota{ |
dudnwjs | 2:dba344c91bce | 7 | |
dudnwjs | 2:dba344c91bce | 8 | class SerialManager |
dudnwjs | 2:dba344c91bce | 9 | { |
dudnwjs | 2:dba344c91bce | 10 | public: |
dudnwjs | 2:dba344c91bce | 11 | SerialManager(Serial *_device); |
dudnwjs | 2:dba344c91bce | 12 | SerialManager(Serial *_device,Serial *_hostpc); |
dudnwjs | 2:dba344c91bce | 13 | ~SerialManager(void); |
dudnwjs | 2:dba344c91bce | 14 | int SendToSerial(uint8_t *data,unsigned short size); |
dudnwjs | 2:dba344c91bce | 15 | int ReceiveToSerial(unsigned char *receive_msg); |
dudnwjs | 5:e11b23f9aacc | 16 | void ReceiveToSerialTest(void); |
dudnwjs | 2:dba344c91bce | 17 | |
dudnwjs | 2:dba344c91bce | 18 | private: |
dudnwjs | 2:dba344c91bce | 19 | void PrintSerialManager(void); |
dudnwjs | 2:dba344c91bce | 20 | |
dudnwjs | 2:dba344c91bce | 21 | bool print_flag; |
dudnwjs | 2:dba344c91bce | 22 | Serial *device; |
dudnwjs | 2:dba344c91bce | 23 | Serial *hostpc; |
dudnwjs | 2:dba344c91bce | 24 | uint8_t FE_MSG_PACKET_TYPE; |
dudnwjs | 2:dba344c91bce | 25 | int MAX_PACKET_LENGTH; |
dudnwjs | 2:dba344c91bce | 26 | unsigned char bReceiveState; |
dudnwjs | 2:dba344c91bce | 27 | unsigned short wDataLength; |
dudnwjs | 2:dba344c91bce | 28 | unsigned short wReceivePos; |
dudnwjs | 2:dba344c91bce | 29 | unsigned char bHdrBytesRead; |
dudnwjs | 2:dba344c91bce | 30 | unsigned char bReceiveElementArr[512]; |
dudnwjs | 2:dba344c91bce | 31 | |
dudnwjs | 2:dba344c91bce | 32 | }; |
dudnwjs | 2:dba344c91bce | 33 | |
dudnwjs | 2:dba344c91bce | 34 | }//namespace |
dudnwjs | 2:dba344c91bce | 35 | |
dudnwjs | 2:dba344c91bce | 36 | #endif//SERIALMANAGER_H |