SAKURA Internet IoT Communication Module Library for mbed

Dependents:   patlite_sakuraio sakuraio_lte_firmwareupdater shownet2017-iinebutton patlite_sakuraio_stack ... more

SAKURA Internet IoT Communication Module Library for mbed

Sakura Communication Module (with sakura.io) library for mbed.

Support

This library supports following products.

Reference

Please see the datasheet.

License

The MIT License (MIT)

Copyright (c) SAKURA Internet Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Committer:
chibiegg
Date:
Thu Sep 28 16:58:17 2017 +0900
Revision:
11:16e726ca39c6
Parent:
3:c54a1eba22c4
Child:
13:a9dbb86be232
Follow SakuraIOArduino v1.1.3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chibiegg 3:c54a1eba22c4 1 /* SAKURA Internet IoT Communication Module Library for mbed
chibiegg 11:16e726ca39c6 2 *
chibiegg 3:c54a1eba22c4 3 * The MIT License (MIT)
chibiegg 11:16e726ca39c6 4 *
chibiegg 3:c54a1eba22c4 5 * Copyright (c) SAKURA Internet Inc.
chibiegg 11:16e726ca39c6 6 *
chibiegg 3:c54a1eba22c4 7 * Permission is hereby granted, free of charge, to any person obtaining a copy
chibiegg 3:c54a1eba22c4 8 * of this software and associated documentation files (the "Software"),
chibiegg 3:c54a1eba22c4 9 * to deal in the Software without restriction, including without limitation
chibiegg 3:c54a1eba22c4 10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
chibiegg 3:c54a1eba22c4 11 * and/or sell copies of the Software, and to permit persons to whom the Software
chibiegg 3:c54a1eba22c4 12 * is furnished to do so, subject to the following conditions:
chibiegg 11:16e726ca39c6 13 *
chibiegg 3:c54a1eba22c4 14 * The above copyright notice and this permission notice shall be included
chibiegg 3:c54a1eba22c4 15 * in all copies or substantial portions of the Software.
chibiegg 11:16e726ca39c6 16 *
chibiegg 3:c54a1eba22c4 17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
chibiegg 3:c54a1eba22c4 18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
chibiegg 3:c54a1eba22c4 19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
chibiegg 3:c54a1eba22c4 20 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
chibiegg 3:c54a1eba22c4 21 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
chibiegg 3:c54a1eba22c4 22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
chibiegg 3:c54a1eba22c4 23 */
chibiegg 3:c54a1eba22c4 24
spiralray 0:8d34375d954c 25 // Common
chibiegg 11:16e726ca39c6 26 #define CMD_GET_CONNECTION_STATUS 0x01
chibiegg 11:16e726ca39c6 27 #define CMD_GET_SIGNAL_QUALITY 0x02
chibiegg 11:16e726ca39c6 28 #define CMD_GET_DATETIME 0x03
chibiegg 11:16e726ca39c6 29 #define CMD_ECHO_BACK 0x0f
spiralray 0:8d34375d954c 30
spiralray 0:8d34375d954c 31 // IO
chibiegg 11:16e726ca39c6 32 #define CMD_READ_ADC 0x10
spiralray 0:8d34375d954c 33
spiralray 0:8d34375d954c 34 // Transmit
chibiegg 11:16e726ca39c6 35 #define CMD_TX_ENQUEUE 0x20
chibiegg 11:16e726ca39c6 36 #define CMD_TX_SENDIMMED 0x21
chibiegg 11:16e726ca39c6 37 #define CMD_TX_LENGTH 0x22
chibiegg 11:16e726ca39c6 38 #define CMD_TX_CLEAR 0x23
chibiegg 11:16e726ca39c6 39 #define CMD_TX_SEND 0x24
chibiegg 11:16e726ca39c6 40 #define CMD_TX_STAT 0x25
spiralray 0:8d34375d954c 41
spiralray 0:8d34375d954c 42 // Receive
chibiegg 11:16e726ca39c6 43 #define CMD_RX_DEQUEUE 0x30
chibiegg 11:16e726ca39c6 44 #define CMD_RX_PEEK 0x31
chibiegg 11:16e726ca39c6 45 #define CMD_RX_LENGTH 0x32
chibiegg 11:16e726ca39c6 46 #define CMD_RX_CLEAR 0x33
spiralray 0:8d34375d954c 47
spiralray 0:8d34375d954c 48 // File Download
chibiegg 11:16e726ca39c6 49 #define CMD_START_FILE_DOWNLOAD 0x40
chibiegg 11:16e726ca39c6 50 #define CMD_GET_FILE_METADATA 0x41
chibiegg 11:16e726ca39c6 51 #define CMD_GET_FILE_DOWNLOAD_STATUS 0x42
chibiegg 11:16e726ca39c6 52 #define CMD_CANCEL_FILE_DOWNLOAD 0x43
chibiegg 11:16e726ca39c6 53 #define CMD_GET_FILE_DATA 0x44
spiralray 0:8d34375d954c 54
spiralray 0:8d34375d954c 55 // Operation
chibiegg 11:16e726ca39c6 56 #define CMD_GET_PRODUCT_ID 0xA0
chibiegg 11:16e726ca39c6 57 #define CMD_GET_UNIQUE_ID 0xA1
chibiegg 11:16e726ca39c6 58 #define CMD_GET_FIRMWARE_VERSION 0xA2
chibiegg 11:16e726ca39c6 59 #define CMD_UNLOCK 0xA8
chibiegg 11:16e726ca39c6 60 #define CMD_UPDATE_FIRMWARE 0xA9
chibiegg 11:16e726ca39c6 61 #define CMD_GET_UPDATE_FIRMWARE_STATUS 0xAA
chibiegg 11:16e726ca39c6 62 #define CMD_SOFTWARE_RESET 0xAF
spiralray 0:8d34375d954c 63
spiralray 0:8d34375d954c 64
spiralray 0:8d34375d954c 65 // Response
spiralray 0:8d34375d954c 66 #define CMD_ERROR_NONE 0x01
spiralray 0:8d34375d954c 67 #define CMD_ERROR_PARITY 0x02
spiralray 0:8d34375d954c 68 #define CMD_ERROR_MISSING 0x03
spiralray 0:8d34375d954c 69 #define CMD_ERROR_INVALID_SYNTAX 0x04
spiralray 0:8d34375d954c 70 #define CMD_ERROR_RUNTIME 0x05
spiralray 0:8d34375d954c 71 #define CMD_ERROR_LOCKED 0x06
spiralray 0:8d34375d954c 72 #define CMD_ERROR_BUSY 0x07
chibiegg 11:16e726ca39c6 73
chibiegg 11:16e726ca39c6 74
chibiegg 11:16e726ca39c6 75 // FileStatus
chibiegg 11:16e726ca39c6 76 #define FILE_STATUS_ERROR 0x01
chibiegg 11:16e726ca39c6 77 #define FILE_STATUS_INVALID_REQUEST 0x02
chibiegg 11:16e726ca39c6 78 #define FILE_STATUS_NOTFOUND 0x81
chibiegg 11:16e726ca39c6 79 #define FILE_STATUS_SERVER_ERROR 0x82
chibiegg 11:16e726ca39c6 80 #define FILE_STATUS_INVALID_DATA 0x83