BitPipe Serial API V1 Rev1.9
BitPipe Serial API V1 Rev1.9
Rev 1.9
2017-04-28
Table of Contents
Table of Contents .......................................................................................................................................... 2
1. Revision History .................................................................................................................................... 5
2. Serial Protocol Definition ...................................................................................................................... 7
2.1. Concepts and Definitions .............................................................................................................. 7
Messages............................................................................................................................................... 7
Endpoints .............................................................................................................................................. 7
Requests and Replies ............................................................................................................................ 7
2.2. Implementation Details ................................................................................................................ 7
Message Buffer Size .............................................................................................................................. 7
Tips ........................................................................................................................................................ 8
2.3. Configuration ................................................................................................................................ 8
2.4. Reliability....................................................................................................................................... 8
2.5. Message Format............................................................................................................................ 8
2.6. Message Encoding ........................................................................................................................ 9
Reserved Values .................................................................................................................................... 9
Endianness ............................................................................................................................................ 9
CRC Calculation ..................................................................................................................................... 9
3. Messages ............................................................................................................................................. 11
3.1. System (0x00-0x0F) ..................................................................................................................... 11
0x00 - Error Report ............................................................................................................................. 11
0x01 - Set Maximum Message Payload Size ....................................................................................... 14
0x02 - Set UART Speed ........................................................................................................................ 16
3.2. Device Information (0x10-0x1F) ................................................................................................. 17
0x10 - Get Hardware Version .............................................................................................................. 17
0x11 - Get Firmware Version .............................................................................................................. 18
0x12 - Get Product Name.................................................................................................................... 19
0x13 - Get VIN and VIO Voltage .......................................................................................................... 20
0x14 - Get Junction Temperature ....................................................................................................... 21
0x15 - Set Low Power Mode ............................................................................................................... 22
0x18 - Get Latest Firmware Version.................................................................................................... 23
0x19 - Update Firmware ..................................................................................................................... 25
0x1A - Get Autonomous Mode Configuration .................................................................................... 27
0x1B - Set Autonomous Mode Configuration ..................................................................................... 29
1. Revision History
Revision Date Comments
0.9 2016-06-13 Pre Release
0.9.1 2016-07-15 Added SMS Feature
0.9.2 2016-07-20 Get FW Version: Added
bootloader version.
0.9.3 2016-08-08 HTTP API added
0.9.4 2016-08-09 Removed TCP CLOSE and TCP
CLOSE NOTIFY messages and
renamed them to IP
CONNECTION CLOSE and IP
CONNECTION CLOSE NOTIFY,
respectively.
0.9.5 2016-08-16 MQTT API added.
0.9.6 2016-08-23 Augmented Host Maximum
message size to 260. This allows
the host to receive various "* Rx
Notify" messages with 255 bytes
of user data payload.
(Because of the static message
parts).
1.0 2016-08-30 Official Release of API V1
1.1 2016-09-15 Modified POWER-ON RADIO by
introducing a back-off
mechanism.
1.2 2016-09-23 Added 2 new error reports
regarding VIN supervision loop.
1.3 2016-09-26 Limited the possible values for
Autonomous Mode & MQTT
keep-alive intra-interval values.
1.4 2016-10-20 Adding error status 4 for all
message replies that can return it.
1.5 2016-10-28 Fix SET UART SPEED message
definition (aligned with current
implementation).
1.6 2016-11-18 Added a comment in the MQTT
PUBLISH message concerning the
usage of QOS and Retain Ind
parameters.
1.7 2016-11-24 Added error codes to GET LATEST
FW VERSION and UPDATE
FIRMWARE, when sim card status
is invalid.
Messages
Information is traded in units called messages. This protocol defines messages as a sequence of bytes,
formatted in a specific way.
Endpoints
Endpoints are entities that take part in the messaging system described herein. Since this protocol is
point-to-point, only 2 entities, or endpoints, are defined: The Host and the BitPipe.
The Host refers to the endpoint (e.g.: PC, Microcontroller, etc) using or controlling the BitPipe.
The term remote endpoint refers to the other endpoint, where a message is often "sent to" or "received
from". This is context-dependent and may refer to either the Host or BitPipe.
Requests are primarily used to instruct the remote endpoint to perform some action. They are also used
to inform the remote endpoint of a new condition or event.
Replies are messages sent following the processing of a request from an endpoint.
Not all request messages have corresponding replies.
Some messages are of fixed size; these messages are guaranteed to be handled appropriately by the
BitPipe.
Other messages are of variable size, for example TCP read and TCP write messages. These messages
convey payload data of an arbitrary size. Your implementation should make sure that once the message
is serialized to be sent on the UART, it does not exceed the aforementioned limit.
Tips
For an easy time integrating the BitPipe, the following tips should be heeded:
Implement retry-send mechanism for requests that are not replied to (Using the same sequence
number).
After sending a request, never assume the next message received from the BitPipe is the reply you
were expecting. It might be something else. This protocol allows for both endpoints to send
messages asynchronously.
2.3. Configuration
The UART interface must be initially configured with the following parameters:
8 data bits;
No parity;
1 stop bit;
No HW flow control.
See the Set UART Speed operation to change the baud rate.
2.4. Reliability
When a request message is sent from the BitPipe to the Host, the BitPipe will expect a reply message
from the Host, as acknowledgement.
Resources in the BitPipe might be held until such a reply is received from the Host.
A retry mechanism will trigger a re-emit of the request (with the same sequence number) to the Host,
after a 1000 milliseconds timeout. This mechanism will be triggered a maximum of 2 times. After this,
the BitPipe will drop the request and any information associated with it.
The Command Identifier is used to interpret the information found in the data payload.
The Message Sequence Number is used to prevent duplicate messages from being processed. This
number should be incremented by 1 for each new message sent.
Reserved Values
Value Signification
0x7E Start-of-frame character
0xCE End-of-frame character
0x9E Escape character
If any byte between Start-of-frame and End-of-frame is equal to one of the above reserved values, that
byte needs to be escaped for transmission. This escape character must then be discarded at reception
and must not be used to compute the CRC.
Endianness
Multi-byte integers (UINT16, UINT32) are always transmitted in big endian.
CRC Calculation
The CRC is calculated on every single byte, excluding Escape character, from command to last bytes of
data inclusively. The algorithm used for CRC calculation is a CRC-16-CCITT with a seed value of 0xFFFF,
polynomial as 0x1021 and no final xor. Here is the source code in C:
Table 1 CRC16
return crc;
}
3. Messages
3.1. System (0x00-0x0F)
The reception of this message does not need to be acknowledged, so no reply message is defined.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Error Report 0x00
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 FACILITY Error facility: [0x00 - 0xFF]
0: Communication Facility;
1: Boot Facility;
2: HW Facility.
5 ERROR NUM Error number, depending on facility. [0x00 - 0xFF]
[6, 7] CRC CRC [0x0000 -
0xFFFF]
8 EOF End-of-frame 0xCE
By default, the BitPipe will try to maximize the user data throughput by sending messages to the Host as
big as possible.
When the Host is limited in available resources, use this request to limit the size of messages sent from
the BitPipe to the Host.
This operation is only required once. The BitPipe will memorize the configuration in non-volatile storage.
Note: When configuring a small maximum message payload size, the BitPipe will need to send more
messages to transfer a user data payload.
Note 2: Message payload excludes message header (SOF, CMD, ID, STATUS) and excludes footer (CRC 1,
CRC2, EOF).
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set Maximum Message Payload Size 0x01
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4,5] SIZE Maximum Message Size [48-260]
[6, 7] CRC CRC [0x0000 -
0xFFFF]
8 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set Maximum Message Payload Size 0x01
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0-2]
1: Error; Message malformed.
2: Error; Invalid parameter value.
3 7 MSG TYPE REPLY 1
www.briowireless.com Copyright 2016 Briowireless inc.
14
BitPipe Serial API V1
This operation is only required once. The BitPipe will memorize the configuration in non-volatile storage.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set UART Speed 0x02
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 SPEED New UART Speed: [0-2]
0: 115200 bits per second (Factory default).
1: 9600 bits per second.
2: 460800 bits per second.
[5, 6] CRC CRC [0x0000 -
0xFFFF]
7 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set UART Speed 0x02
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0-2]
1: Error; Message malformed.
2: Error; Invalid parameter value.
3 7 MSG TYPE REPLY 1
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Hardware version 0x10
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Hardware version 0x10
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success 0
1: Error; Message malformed.
3 7 MSG TYPE REPLY 1
4 LEN Length, in bytes, of the hardware version. [0-24]
[5-...] HW Hardware version ASCII
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
For example, if the BitPipe Radio is offline, the Radio FW version will be blank.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Firmware version 0x11
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Firmware version 0x11
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0, 3]
1: Error; Message malformed.
3 7 MSG TYPE REPLY 1
[4,5] BOOT VER BitPipe Bootloader Version: [0x0000-
MSB: Major version 0xFFFF]
LSB: Minor version
6 BP API BitPipe API version [0x00 - 0xFF]
VERSION
7 BP FW LEN Length, in bytes, of the BitPipe firmware version. [0-24]
[8-X] BITPIPE FW BitPipe Firmware version. ASCII
[X+1] RADIO FW LEN Length, in bytes, of the Radio firmware version. [0-16]
[X+2..N-3] RADIO FW Radio Firmware version. ASCII
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Product Name 0x12
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Product Name 0x12
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success 0
1: Error; Message malformed.
3 7 MSG TYPE REPLY 1
4 LEN Length, in bytes, of the product name. [0-16]
[5-...] PROD NAME Product Name ASCII
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get VIN and VIO Voltage 0x13
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get VIN and VIO Voltage 0x13
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0,1]
1: Error; Message malformed.
3 7 MSG TYPE REPLY 1
[4, 5] VIN Voltage, in millivolts: [0-65535]
Normal values are from 3400 to 18000.
[6, 7] VIO Voltage, in millivolts: [0-65535]
Normal values are 2500 or 3300.
[8, 9] CRC CRC [0x0000 -
0xFFFF]
10 EOF End-of-frame 0xCE
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Junction Temperature 0x14
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Junction Temperature 0x14
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0,1]
1: Error; Message malformed.
3 7 MSG TYPE REPLY 1
4 TEMP Temperature, in Celcius degrees. 0
[5, 6] CRC CRC [0x0000 -
0xFFFF]
7 EOF End-of-frame 0xCE
Note: Power-off the radio before initiating the Low Power Mode.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set Low Power Mode 0x15
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set Low Power Mode 0x15
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0,1,10]
1: Error; Message malformed.
10: Error; Cannot enter Low Power Mode: The radio
is currently powered-on.
3 7 MSG TYPE REPLY 1
[4,5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
The version string is returned in the reply. You may compare it to the actual BitPipe firmware version
using the Get Firmware Version operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Latest Firmware Version 0x18
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Latest Firmware Version 0x18
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0,1,3-5,10-13]
1: Error; Message malformed.
3: Info; BitPipe is busy. Try again later.
4: Error; Failed to retrieve update URL from storage.
5: Info; BitPipe wireless device is offline. Cannot
complete request.
10: Error; No internet resources available (BitPipe
Internal).
11: Error; APN not configured.
12: Error; Cannot initiate internet session.
13: Error; Cannot retrieve version.
14; Error; Sim card status is invalid.
3 7 MSG TYPE REPLY 1
The special target firmware version "latest" is always valid and points to the latest firmware version for
your BitPipe hardware.
This operation doesn't check if the target firmware version is already installed, and will not prevent
updating to the same actual version.
Note: The reception of a reply with a status code of SUCCESS indicates that the target firmware version
was verified, and that the update has started. It generally takes approximately 2-5 minutes to update
the firmware, depending on network availability and conditions.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Update Firmware 0x19
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 LEN Length, in bytes, of the firmware version string to [0-8]
update to.
[5..N-3] FW The target firmware version. ASCII
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Update Firmware 0x19
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success; Update has started. [0-5,10-13]
1: Error; Message malformed.
2: Error; Invalid parameter value.
www.briowireless.com Copyright 2016 Briowireless inc.
25
BitPipe Serial API V1
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Autonomous Mode Configuration 0x1A
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Autonomous Mode Configuration 0x1A
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0,1,10]
1: Error; Message malformed.
10: Error; Autonomous configuration is not set.
3 7 MSG TYPE REPLY 1
4 0 SECURE Specifies whether SSL/TLS is used at the transport [0,1]
layer:
0: TLS/SSL is not used.
1: TLS/SSL is used.
4 [1-7] Unused. 0
[5,6] KA IVAL MQTT Keep-Alive interval, in seconds. [0, 300-1200]
0 indicates that there is no keep-alive exchanged.
[7,8] PORT MQTT TCP Port. [1-65535]
9 HOST LEN MQTT host name length. [0-64]
10..N HOST MQTT host name. ASCII
N+1 USER LEN MQTT authentication user name length. [0-24]
N+2..M USER MQTT authentication user name. ASCII
M+1 PASSWORD MQTT authentication password length. [0-24]
LEN
www.briowireless.com Copyright 2016 Briowireless inc.
27
BitPipe Serial API V1
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set Autonomous Mode Configuration 0x1B
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 0 SECURE Specifies whether SSL/TLS is used at the transport [0,1]
layer:
0: TLS/SSL is not used.
1: TLS/SSL is used.
4 [1-7] Unused. 0
[5,6] KA IVAL MQTT Keep-Alive interval, in seconds. [0, 300-1200]
0 indicates that there will not be any keep-alive
exchanged.
[7,8] PORT MQTT TCP Port. [1-65535]
9 HOST LEN MQTT host name length. [0-64]
10..N HOST MQTT host name. ASCII
N+1 USER LEN MQTT authentication user name length. [0-24]
N+2..M USER MQTT authentication user name. ASCII
M+1 PASSWORD MQTT authentication password length. [0-24]
LEN
M+2..O PASSWORD MQTT authentication password. ASCII
O+1 GLOBAL PFX MQTT global topic prefix length. [0-12]
LEN
O+2..P GLOBAL PFX MQTT global topic prefix. ASCII
[P+1,P+2] CRC CRC [0x0000 -
0xFFFF]
P+3 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set Autonomous Mode Configuration 0x1B
www.briowireless.com Copyright 2016 Briowireless inc.
29
BitPipe Serial API V1
If desired, a built-in back-off mechanism is featured in the BitPipe to help reduce power consumption in
battery solutions. The back-off basically refuses the Power-On Radio request when too many recent
requests were successful. This effectively postpones the power-up of the Radio, contributing to battery
power saving. When enabled, the following built-in rules are applied:
1. You may issue a Power-On Radio request only after 5 minutes have passed since the last successful
Power-On Radio request;
2. You may not issue a Power-On Radio request more than 6 times in the last hour.
It is important to note that these rules apply to successful Power-On Radio requests; when a request
fails, that attempt is not accounted in the back-off mechanism. When the request is denied because of
the back-off mechanism, the status code of the reply will indicate this (see below).
A Radio Start Notification message will follow a successful Power-On Radio operation.
Note: If Radio is already powered on, the request is ignored and the reply will indicate that the Radio is
already powered on.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Power-On Radio 0x20
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 [0 - 6] PWR METHOD The power-on method: [0x19, 0x25]
0x19: Power-on using the DC-to-DC converter.
0x25: Power-on directly, bypassing the DC-to-DC
converter.
www.briowireless.com Copyright 2016 Briowireless inc.
31
BitPipe Serial API V1
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Power-On Radio 0x20
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0 ,1,2, 10-12]
1: Error; Message malformed.
2: Error; Invalid parameter value.
10: Error; Radio is already powered-on.
11: Error; Input voltage (VIN) is incompatible with
requested power-on method.
12: Error; Back-off mechanism is enabled (see
above) and this request is denied because it goes
against the back-off rules.
3 7 MSG TYPE REPLY 1
[4,5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Graceful: (Recommended) The radio disconnects from the mobile network, and shuts-down cleanly.
Hard: The radio power is immediately cut. This method should be avoided, as it does not inform
mobile network of disconnection, which is not considered good practice.
Note: If Radio is already powered off, the request is ignored and the reply will indicate that the Radio is
already powered off.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Power-Off Radio 0x21
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 METHOD Power-Off method: [0, 1]
0: Graceful: Performs radio power-off procedure,
followed by power-off of the radio. This method
may fail if the radio is busy.
1: Hard: Power-off of the radio.
[5, 6] CRC CRC [0x0000 -
0xFFFF]
7 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Power-Off Radio 0x21
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0-4, 10]
1: Error; Message malformed.
3: Info; BitPipe is busy. Try again later. (Graceful
method only)
4: Error; BitPipe wireless device command timeout.
The reception of this notification does not need to be acknowledged, so no reply message is defined.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Radio Start Notification 0x22
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 NOTIF Reason for this notification: [0-2]
REASON 0: Radio is started and ready, as part of a previous
Power-On Radio operation.
1: Radio failed to start (A timeout occurred), as part
of a previous Power-On Radio operation.
2: Radio has unexpectedly rebooted, and is now
ready again.
5 SIM STATUS SIM card status: [0-3]
0: SIM access granted.
1: SIM access denied: PIN required.
2: SIM access denied: PUK required.
3: No SIM card detected.
[6, 7] CRC CRC [0x0000 -
0xFFFF]
8 EOF End-of-frame 0xCE
Note: The SIM card status be considered valid only when radio status is powered-on and ready.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Radio Status 0x23
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Radio Status 0x23
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0,1]
1: Error; Message malformed.
3 7 MSG TYPE REPLY 1
4 RADIO STATUS Radio status: [0-2]
0: Radio is powered on, but not yet ready.
1: Radio is powered on, and ready.
2: Radio is powered off.
5 SIM STATUS SIM card status: [0-3]
0: SIM access granted.
1: SIM access denied: PIN required.
2: SIM access denied: PUK required.
3: No SIM card detected.
[6,7] CRC CRC [0x0000 -
0xFFFF]
8 EOF End-of-frame 0xCE
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get IMEI 0x24
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get IMEI 0x24
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0,1,3,4,5]
1: Error; Message malformed.
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
5: Info; BitPipe wireless device is offline. Cannot
complete request.
3 7 MSG TYPE REPLY 1
[4-18] IMEI International Mobile Equipment Identity ASCII
[19, 20] CRC CRC [0x0000 -
0xFFFF]
21 EOF End-of-frame 0xCE
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get ICCID 0x25
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get ICCID 0x25
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0,1,3,4,5,10]
1: Error; Message malformed.
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
5: Info; BitPipe wireless device is offline. Cannot
complete request.
10: Error; No SIM card present.
3 7 MSG TYPE REPLY 1
[4-23] ICCID Integrated Circuit Card Identifier ASCII
[24, 25] CRC CRC [0x0000 -
0xFFFF]
26 EOF End-of-frame 0xCE
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get IMSI 0x26
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get IMSI 0x26
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0, 1, 3, 4, 5,
1: Error; Message malformed. 10-12]
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
5: Info; BitPipe wireless device is offline. Cannot
complete request.
10: Error; No SIM card present.
11: Error; SIM access denied: PIN required.
12: Error; SIM access denied: PUK required.
3 7 MSG TYPE REPLY 1
[4-18] IMSI International Mobile Subscriber Identifier ASCII
[19, 20] CRC CRC [0x0000 -
0xFFFF]
21 EOF End-of-frame 0xCE
Important Note: The phone number will only be returned if your mobile operator has provisioned this
information in the SIM card. This is outside the BitPipe control.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Own Phone Number 0x27
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Own Phone Number 0x27
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0, 1, 3, 4, 5,
1: Error; Message malformed. 10-12]
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
5: Info; BitPipe wireless device is offline. Cannot
complete request.
10: Error; No SIM card present.
11: Error; SIM access denied: PIN required.
12: Error; SIM access denied: PUK required.
3 7 MSG TYPE REPLY 1
4 LEN Length, in bytes, of the phone number. [0-25]
[5-...] OWN PHONE Phone Number ASCII
[N-2, N-1] CRC CRC [0x0000 -
www.briowireless.com Copyright 2016 Briowireless inc.
40
BitPipe Serial API V1
0xFFFF]
N EOF End-of-frame 0xCE
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get APN Configuration 0x28
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get APN Configuration 0x28
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0, 1, 3, 4, 10]
1: Error; Message malformed.
3: Info; BitPipe is busy. Try again later.
4: Error; Failed to retrieve information from storage.
10: Error; APN not configured.
3 7 MSG TYPE REPLY 1
4 HOST LEN Length, in bytes of the APN hostname. [0-64]
5...X HOST APN hostname. ASCII
X+1 USER NAME Length, in bytes, of the APN user name, for [0-24]
LEN authentication.
X+2...Y USER NAME The APN user name. ASCII
Y+1 PASSWORD Length, in bytes, of the APN password, for [0-24]
LEN authentication.
Y+2...N-3 PASSWORD The APN password. ASCII
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set APN Configuration 0x29
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 HOST LEN Length, in bytes of the APN hostname. [0-64]
5...X HOST APN hostname. ASCII
X+1 USER NAME Length, in bytes, of the APN user name, for [0-24]
LEN authentication.
X+2...Y USER NAME The APN user name. ASCII
Y+1 PASSWORD Length, in bytes, of the APN password, for [0-24]
LEN authentication.
Y+2...N-3 PASSWORD The APN password. ASCII
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set APN Configruation 0x29
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0-4]
1: Error; Message malformed.
2: Error; Invalid parameter value.
3: Info; BitPipe is busy. Try again later.
4: Error; Could Not Store APN Info in Non-Volatile
Memory.
3 7 MSG TYPE REPLY 1
Warning: Providing an invalid PIN three times in a row may lock your SIM card. If this happens, the SIM
PIN Unlock Key(SIM PUK) will be required.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set SIM Access Configuration 0x2A
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 HOST LEN Length, in bytes, of the SIM PIN or SIM PUK. [0-20]
5...N-3 SIM PIN SIM PIN - or - SIM PUK. ASCII
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Set SIM Access Configuration 0x2A
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success; PIN was validated and stored. [0-4,10-13]
1: Error; Message malformed.
2: Error; Invalid parameter value.
3: Info; BitPipe is busy. Try again later.
4: Error; Failed to save information to storage.
10: Error; No SIM card present.
11: Error; Invalid SIM PIN, retry with another PIN.
12: Error; Invalid SIM PIN/PUK. PUK is now required.
13: Error; SIM status is OK: no PIN required.
3 7 MSG TYPE REPLY 1
www.briowireless.com Copyright 2016 Briowireless inc.
45
BitPipe Serial API V1
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Mobile Connection Status 0x2B
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Mobile Connection Status 0x2B
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0,1,3,4,5,10-
1: Error; Message malformed. 12]
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
5: Info; BitPipe wireless device is offline. Cannot
complete request.
10: Error; No SIM card present.
11: Error; SIM access denied: PIN required. BitPipe
cannot connect to mobile network.
12: Error; SIM access denied: PUK required. BitPipe
cannot connect to mobile network.
3 7 MSG TYPE REPLY 1
4 CONNECTED Connected Indicator: [0-3]
IND 0: Not connected.
1: Camping on a mobile cell; not registered.
www.briowireless.com Copyright 2016 Briowireless inc.
47
BitPipe Serial API V1
The reception of this notification does not need to be acknowledged, so no reply message is defined.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Mobile Connection Status Change Notify 0x2C
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 CONNECTED Connected Indicator: [0-3]
IND 0: Not connected.
1: Camping on a mobile cell; not registered.
2: Registered on home mobile network.
3: Registered on foreign mobile network.
5 LINK Access Technology: [0-3]
TECHNOLOGY 0: Unknown
1: 2G
2: 3G
3: LTE (4G)
[6, 7] NET LAC Network Location Area Code (16-bit value) [0x0000-
0xFFFF]
[8-11] NET CELL ID Network Cell Identifier (32-bit value) [0x00000000-
0xFFFFFFFF]
[12,13] CRC CRC [0x0000 -
0xFFFF]
14 EOF End-of-frame 0xCE
No Reply Defined
The reliability of the time depends on the BitPipe being connected to the mobile network. The returned
time may be invalid until an initial connection to the mobile network is established.
Note: This depends on your mobile operator's support of NITZ time update. If your mobile operator
doesn't support NITZ, the returned time and date will be unreliable.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Mobile Date and Time 0x2D
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD Get Mobile Date and Time 0x2D
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0, 1, 3, 4, 5]
1: Error; Message malformed.
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
5: Info; BitPipe wireless device is offline. Cannot
complete request.
3 7 MSG TYPE REPLY 1
4 YEAR Current date year, minus 2000. [0 - 255]
Example: 16 = year 2016
5 MONTH Current date month, zero-based. [0 - 11]
Example: 1 = February.
www.briowireless.com Copyright 2016 Briowireless inc.
50
BitPipe Serial API V1
It is possible to enable security at the transport layer using SSL/TLS protocols. The supported security
protocol versions depend on the actual BitPipe product.
Refer to product datasheet for more information on this topic.
There are a limited number of concurrent TCP connections supported. This also depends on the actual
BitPipe product.
Refer to product datasheet for more information on this topic.
The reply message will indicate if connection was successfully initiated through the status code, and if
not, it will describe the error condition.
When a connection is successfully initiated, the reply message will contain a TCP Connection Identifier
that will be used for subsequent TCP operations.
Following a successful connection initiation, the TCP Connection Established Notify or IP Connection
Close Notify message will be sent to the Host to indicate the end result of the actual connection.
When initiating a connection to an unreachable host, the IP Connection Close Notify message with
reason Host Unreachable will be sent after a timeout of 3 minutes. Closing the IP connection before this
timeout has expired is permitted, but internal resources will not be freed before the timeout expires.
Trying to re-initiate a TCP connection while the timeout hasn't expired will result in an error.
Starting with Firmware FW1.1, this timeout has been reduced to 60 seconds.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD TCP Initiate Connection 0x80
2 ID Packet ID [0x00 - 0xFF]
3 [0-6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 0 SECURE Security: [0, 1]
0: Non-Secure.
1: Secure (i.e.: SSL/TLS). Security level will be
negotiated between client and server.
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD TCP Initiate Connection 0x80
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Connection In Progress [0-5, 10-16]
1: Error; Message Malformed
2: Error; Invalid parameter value.
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
5: Info; BitPipe wireless device is offline. Cannot
complete request.
10: Error; No TCP connection available for
connection class requested.
11: Error; APN not configured.
12: Error; SIM card status is invalid.
13: Error; Transport-layer security was requested,
but is unavailable.
14: Error; TCP keep-alive not supported.
15: Error; No link or bearer available.
16: Error; Generic.
3 7 MSG TYPE REPLY 1
4 TCP CONN TCP Connection Identifier. [0x00 - 0xFF]
ID
www.briowireless.com Copyright 2016 Briowireless inc.
55
BitPipe Serial API V1
The reception of this notification does not need to be acknowledged, so no reply message is defined.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD TCP Connection Established Notify 0x81
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 TCP CONN TCP Connection Identifier. [0x00 - 0xFF]
ID
[5, 6] CRC CRC [0x0000 -
0xFFFF]
7 EOF End-of-frame 0xCE
The byte array is not immediately sent on the network. Because of the non-negligible overhead of
Internet protocols (TCP+IP+Ethernet headers), this mechanism allows you to append your data payload
into a buffer on the BitPipe. This way, you maximize your data payload .vs. Internet headers ratio.
Sending this request with a 0-length byte array will clear the BitPipe send buffer, erasing any previously
appended data.
Trigger the actual sending of the buffered data using the TCP Write Send operation.
Prerequisite: You need a valid TCP Connection Identifier, obtained by a successful TCP Initiate
Connection operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD TCP Write Append 0x82
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 TCP CONN TCP Connection Identifier. [0x00 - 0xFF]
ID
5 DATA LEN Length, in bytes, of the following data buffer. [0-253]
Sending a data buffer of 0 bytes will CLEAR the
BitPipe send buffer.
6...N-3 Data [0x00 - 0xFF]
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD TCP Write Append 0x82
www.briowireless.com Copyright 2016 Briowireless inc.
58
BitPipe Serial API V1
The reply to this request is sent when the whole send buffer has been transmitted to the remote
endpoint, or earlier, if an I/O error occurs.
Upon an I/O error, the connection may be closed. If this is the case, a IP Connection Close Notify
message will be emitted from the BitPipe.
If the connection remains valid, you may re-issue this operation again to complete transmission of the
send buffer.
Once the operation is successful, the BitPipe send buffer is cleared. You may continue appending data
using the TCP Write Append operation.
Note: The send buffer used by this operation is the same send buffer as the SMS Message Append /
Send operation. If SMS data is presently in the BitPipe send buffer, an error will be indicated in the
status of the reply message.
Prerequisites: (1) You need a valid TCP Connection Identifier, obtained by a successful TCP Initiate
Connection operation.
(2) You need to have appended data in the BitPipe send buffer using the TCP Write Append operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD TCP Write Send 0x83
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 TCP CONN TCP Connection Identifier. [0x00 - 0xFF]
ID
[5, 6] CRC CRC [0x0000 -
0xFFFF]
7 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
The request is sent by the BitPipe and MUST be acknowledged by the Host (using the reply message).
The TCP data will be dropped by the BitPipe after the 3rd try without acknowledge.
Prerequisite: You need a valid TCP Connection Identifier, obtained by a successful TCP Initiate
Connection operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD TCP Rx Notify 0x84
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 TCP CONN TCP Connection Identifier. [0x00 - 0xFF]
ID
5 LEN Length, in bytes, of the following data buffer. [0x00 - 0xFF]
[6..N-3] DATA Received data. [0x00 - 0xFF]
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD TCP Rx Notify 0x84
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success 0
3 7 MSG TYPE REPLY 1
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
It is possible to enable security at the transport layer using SSL/TLS protocols (i.e.: HTTPS).
There are a limited number of concurrent HTTP connections supported. This also depends on the actual
BitPipe product.
Refer to product datasheet for more information on this topic.
The reply message will indicate if connection was successfully initiated through the status code, and if
not, it will describe the error condition.
When a connection is successfully initiated, the reply message will contain an HTTP Connection
Identifier that will be used for subsequent HTTP operations.
Following a successful connection initiation, the HTTP POST Write Ready Notify, HTTP Rx Notify, or IP
Connection Close Notify message will be sent to the Host to indicate the HTTP protocol state.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD HTTP Initiate Connection 0x85
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 0 SECURE Security: [0, 1]
0: Non-Secure; uses HTTP.
1: Secure (i.e.: SSL/TLS); uses HTTPS. Security level
will be negotiated between client and server.
4 [1,2] HTTP Method: [0-2]
0: GET
1: POST
2: HEAD
4 [3-7] FUTURE Unused 0
5 HOST LEN Length, in bytes of the host to connect to (or IP [0-96*]12
address).
6..K HOST Host name to connect to (or IP address, in decimal ASCII
dotted notation).
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD HTTP Initiate Connection 0x85
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Connection In Progress [0-5, 10-14]
1: Error; Message Malformed
2: Error; Invalid parameter value.
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
www.briowireless.com Copyright 2016 Briowireless inc.
64
BitPipe Serial API V1
The reception of this notification does not need to be acknowledged, so no reply message is defined.
Note: This message is only sent to the Host when an HTTP Initiate Connection was requested using
HTTP method 'POST'.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD HTTP POST Write Ready Notify 0x86
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 HTTP CONN HTTP Connection Identifier. [0x00 - 0xFF]
ID
[5, 6] CRC CRC [0x0000 -
0xFFFF]
7 EOF End-of-frame 0xCE
The Write Operation parameter allows to perform 3 different but related operations:
Write (append) to buffer: Allows to transfer the data from the Host and cache it on the BitPipe in a
temporary buffer. This buffer size is 1400 bytes;
Write (append) to buffer and send: Same as above, but also writes it on the HTTP connection to the
server, flushing all the buffer;
Write (append) to buffer, send and mark as complete: Same as above, but also informs the server
that the entire POST request data is complete and can be processed;
When sending to the HTTP server, always wait for the HTTP POST Write Ready Notify message before
attempting another send.
After the entire HTTP POST data is transferred ("Write to buffer, send and mark as complete" Write
Option), the HTTP server may send you back data, or close the connection.
Upon an I/O error, the connection may be closed. If this is the case, a IP Connection Close Notify
message will be emitted from the BitPipe.
Prerequisites: (1) You need a valid HTTP Connection Identifier, obtained by a successful HTTP Initiate
Connection operation, with method HTTP POST.
(2) You need to have been notified via HTTP POST Write Ready Notify message that the connection is in
the correct state.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD HTTP POST Write 0x87
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 HTTP CONN HTTP Connection Identifier. [0x00 - 0xFF]
ID
5 OPER Write Operation: [0-3]
www.briowireless.com Copyright 2016 Briowireless inc.
67
BitPipe Serial API V1
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD HTTP POST Write 0x87
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0-4, 10-13]
1: Error; Message malformed.
2: Error; Invalid Parameter Value
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
10: Error; Invalid HTTP connection identifier.
11: Error; Cannot append to write buffer: Internal
buffer is full.
12: Error; Cannot write: Not ready to send. Retry
later.
13: Error; I/O error while writing.
3 7 MSG TYPE REPLY 1
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
The request is sent by the BitPipe and MUST be acknowledged by the Host (using the reply message).
The HTTP data will be dropped by the BitPipe after the 3rd try without acknowledge.
Prerequisite: You need a valid HTTP Connection Identifier, obtained by a successful HTTP Initiate
Connection operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD HTTP Rx Notify 0x88
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 HTTP CONN HTTP Connection Identifier. [0x00 - 0xFF]
ID
5 LEN Length, in bytes, of the following data buffer. [0x00 - 0xFF]
[6..N-3] DATA Received data. [0x00 - 0xFF]
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD HTTP Rx Notify 0x88
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success 0
3 7 MSG TYPE REPLY 1
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
After a successful IP Connection Close, the Internet Connection Identifier cannot be subsequently used
with another IP SOCKET command.
Prerequisite: You need a valid (TCP/HTTP) Connection Identifier, obtained by a successful TCP Initiate
Connection or HTTP Initiate Connection operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD IP Connection Close 0x8E
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 INET CONN Internet Connection Identifier. [0x00 - 0xFF]
ID
[5, 6] CRC CRC [0x0000 -
0xFFFF]
7 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD IP Connection Close 0x8E
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0, 1, 3, 4, 10]
1: Error; Message malformed.
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
10: Error; Invalid Internet connection identifier
3 7 MSG TYPE REPLY 1
[4, 5] CRC CRC [0x0000 -
www.briowireless.com Copyright 2016 Briowireless inc.
70
BitPipe Serial API V1
0xFFFF]
6 EOF End-of-frame 0xCE
The INET Connection Identifier cannot be subsequently used with another TCP or HTTP command.
The reception of this notification does not need to be acknowledged, so no reply message is defined.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD IP Connection Close Notify 0x8F
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 INET CONN Internet Connection Identifier. [0x00 - 0xFF]
ID
5 REASON Reason Code: [0-5, 254]
0: Remote Internet endpoint has closed the
connection.
1: Error; SIM deactivated; Bad APN information; Not
registered on the network.
2: Error; Host not found.
3: Error; Host unreachable.
4: Error; Host has reset connection (invalid port/port
not listening).
5: Error; Resource not found (HTTP 404).
254: Error; Generic socket error.
[6, 7] CRC CRC [0x0000 -
0xFFFF]
8 EOF End-of-frame 0xCE
For more information about the MQTT protocol, please refer to http://docs.oasis-
open.org/mqtt/mqtt/v3.1.1/csprd01/mqtt-v3.1.1-csprd01.html
There are a limited number of concurrent MQTT connections supported. This also depends on the actual
BitPipe product.
Refer to product datasheet for more information on this topic.
The reply message will indicate if connection was successfully initiated through the status code, and if
not, it will describe the error condition.
When a connection is successfully initiated, the reply message will contain an MQTT Connection
Identifier that will be used for subsequent MQTT operations.
Following a successful connection initiation, the MQTT Connection Established Notify or MQTT
Disconnect Notify message will be sent to the Host to indicate the MQTT protocol state.
When initiating a connection to an unreachable host, the IP Connection Close Notify message with
reason Host Unreachable will be sent after a timeout of 3 minutes. Closing the IP connection before this
timeout has expired is permitted, but internal resources will not be freed before the timeout expires.
Trying to re-initiate a TCP connection while the timeout hasn't expired will result in an error.
Starting with Firmware FW1.1, this timeout has been reduced to 60 seconds.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Initiate Connection 0x90
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 0 SECURE Security: [0, 1]
0: Non-Secure.
www.briowireless.com Copyright 2016 Briowireless inc.
73
BitPipe Serial API V1
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Initiate Connection 0x90
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Connection In Progress [0-5, 10-14]
1: Error; Message Malformed
2: Error; Invalid parameter value.
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
www.briowireless.com Copyright 2016 Briowireless inc.
74
BitPipe Serial API V1
This notification means that the network connection was established successfully and that the MQTT
CONNECT phase was successful.
The reception of this notification does not need to be acknowledged, so no reply message is defined.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Connection Established Notify 0x91
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 MQTT CONN MQTT Connection Identifier. [0x00 - 0xFF]
ID
[5, 6] CRC CRC [0x0000 -
0xFFFF]
7 EOF End-of-frame 0xCE
To subscribe to only one topic, you should set Topic 2 Len and Topic 3 Len value to 0. To subscribe to
more than 3 topics, you will need to use this operation more than once.
Upon an I/O error, the connection may be closed. If this is the case, a MQTT Connection Close Notify
message will be emitted from the BitPipe.
Prerequisite: You need a valid MQTT Connection Identifier, obtained by a successful MQTT Initiate
Connection operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Subscribe Topic 0x92
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 MQTT CONN MQTT Connection Identifier. [0x00 - 0xFF]
ID
5 [0, 1] SUBS QOS 1 QOS requested for subscription of topic #1: [0, 1]
0: QOS 0;
1: QOS 1;
2,3: Reserved.
5 [2, 3] SUBS QOS 2 QOS requested for subscription of topic #2: [0, 1]
0: QOS 0;
1: QOS 1;
2,3: Reserved.
5 [4, 5] SUBS QOS 3 QOS requested for subscription of topic #3: [0, 1]
0: QOS 0;
1: QOS 1;
2,3: Reserved.
6 TOPIC 1 LEN Length of the topic #1 to subscribe to. [0-255]1
[7..K] TOPIC 1 The topic #1 to subscribe to. ASCII
K+1 TOPIC 2 LEN Length of the topic #2 to subscribe to. [0-255]1
[K+2..L] TOPIC 2 The topic #2 to subscribe to. ASCII
L+1 TOPIC 3 LEN Length of the topic #3 to subscribe to. [0-255]1
www.briowireless.com Copyright 2016 Briowireless inc.
77
BitPipe Serial API V1
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Subscribe Topic 0x92
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0-4, 10-13]
1: Error; Message malformed.
2: Error; Invalid Parameter Value
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
10: Error; Invalid MQTT connection identifier.
11: Error; Cannot subscribe: Underlying TCP
connection is not ready.
12: Error; I/O error while writing to the underlying
TCP connection.
13: MQTT protocol error; Subscription not
successful.
3 7 MSG TYPE REPLY 1
4 SUBSCRIPTION Bitfield indicating the subscription status of each [0x00-0x07]
STATUS topic. A value of 0 indicates a failure; a value of 1
indicates success.
Bit 0: Subscription status of topic #1;
Bit 1: Subscription status of topic #2;
Bit 2: Subscription status of topic #3.
[5, 6] CRC CRC [0x0000 -
0xFFFF]
7 EOF End-of-frame 0xCE
To unsubscribe from only one topic, you should set Topic 2 Len and Topic 3 Len value to 0. To
unsubscribe from more than 3 topics, you will need to use this operation more than once.
Upon an I/O error, the connection may be closed. If this is the case, a MQTT Connection Close Notify
message will be emitted from the BitPipe.
Prerequisite: You need a valid MQTT Connection Identifier, obtained by a successful MQTT Initiate
Connection operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT UnSubscribe Topic 0x93
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 MQTT CONN MQTT Connection Identifier. [0x00 - 0xFF]
ID
5 TOPIC 1 LEN Length of the topic #1 to unsubscribe from. [0-255]1
[6..K] TOPIC 1 The topic #1 to unsubscribe from. ASCII
K+1 TOPIC 2 LEN Length of the topic #2 to unsubscribe from. [0-255]1
[K+2..L] TOPIC 2 The topic #2 to unsubscribe from. ASCII
L+1 TOPIC 3 LEN Length of the topic #3 to unsubscribe from. [0-255]1
[L+2..N-3] TOPIC 3 The topic #3 to unsubscribe from. ASCII
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
1
: The entire message payload MUST not be over the internal BitPipe communications buffer size of 256
bytes.
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
To send large payloads, it is possible to chain multiple MQTT Publish operations, by controlling the Send
Indicator parameter. When doing this, do not repeat the topic in subsequent operations, as a non-zero
topic length is interpreted as a new MQTT Publication (i..e: Clears previous message payload).
The published message topic length plus payload length cannot be over 1000 bytes.
The message parameters QOS and Retain Indicator are taken into account on the last message, i.e.:
when the Send Indicator is set.
Upon an I/O error, the connection may be closed. If this is the case, a MQTT Connection Close Notify
message will be emitted from the BitPipe.
Prerequisite: You need a valid MQTT Connection Identifier, obtained by a successful MQTT Initiate
Connection operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Publish 0x94
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 MQTT CONN MQTT Connection Identifier. [0x00 - 0xFF]
ID
5 [0,1] QOS Message QOS: [0, 1]
0: QOS 0;
1: QOS 1;
2,3: Reserved.
5 2 RETAIN IND Retain Indicator: [0, 1]
0: Message is not retained;
1: Message is retained.
5 [3-6] NOT USED Not used. 0
5 7 SEND IND Send Indicator: [0, 1]
0: Message payload not complete; do not send now;
1: Message payload complete; send MQTT Publish
www.briowireless.com Copyright 2016 Briowireless inc.
81
BitPipe Serial API V1
message.
6 TOPIC LEN Length of the topic. [0-128]
0: Indicates a continuation of the previous MQTT
Publish operation.
Non-zero: Indicates the start of a new MQTT Publish
operation.
7.. TOPIC The topic of the MQTT Publish message. ASCII
MSG CHUNK Length, in bytes, of the message payload chunk. [0-255]1
LEN
[..N-3] MSG CHUNK Message payload chunk. BINARY
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
1
: The entire message payload MUST not be over the internal BitPipe communications buffer size of 256
bytes.
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Publish 0x94
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0-4, 10-14]
1: Error; Message malformed.
2: Error; Invalid Parameter Value
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
10: Error; Invalid MQTT connection identifier.
11: Error; Cannot publish: Underlying TCP
connection is not ready.
12: Error; I/O error while writing to the underlying
TCP connection.
13: MQTT protocol error; Publish not successful.
14: Error; Cannot append to write buffer: Internal
buffer is full.
3 7 MSG TYPE REPLY 1
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
The request is sent by the BitPipe and MUST be acknowledged by the Host (using the reply message).
The MQTT message data will be dropped by the BitPipe after the 3rd try without acknowledge.
Several instances of this operation can be chained by the BitPipe when the message payload is too long.
Check the Complete Indicator to see if more message data payload will be incoming. The message topic
is only sent on the first instance
Note: Since the topic is sent in the first instance of this message, it MUST fit within the Host maximum
payload size. If the topic length is greater than the Host maximum payload size, it will be truncated.
Prerequisite: You need a valid MQTT Connection Identifier, obtained by a successful MQTT Initiate
Connection operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Publication Rx Notify 0x95
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 MQTT CONN MQTT Connection Identifier. [0x00 - 0xFF]
ID
5 [0, 1] QOS Message QOS: [0, 1]
0: QOS 0;
1: QOS 1;
2,3: Reserved.
5 2 RETAIN IND Retain Indicator: [0, 1]
0: Message is not retained;
1: Message is retained.
5 [3-6] UNUSED Not used. 0
5 7 COMPLETE Message payload complete indicator: [0, 1]
IND 0: Message not yet complete (more message chunk
are coming);
1: Message is complete.
6 TOPIC LEN Length, in bytes, of the message topic: [0-255]
www.briowireless.com Copyright 2016 Briowireless inc.
83
BitPipe Serial API V1
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Publication Rx Notify 0x95
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success 0
3 7 MSG TYPE REPLY 1
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
After a successful MQTT Disconnect, the MQTT Connection Identifier cannot be subsequently used with
another MQTT operation.
Prerequisite: You need a valid MQTT Connection Identifier, obtained by a successful TCP Initiate
Connection or HTTP Initiate Connection operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Disconnect 0x9E
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 MQTT CONN MQTT Connection Identifier. [0x00 - 0xFF]
ID
[5, 6] CRC CRC [0x0000 -
0xFFFF]
7 EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Disconnect 0x9E
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success [0, 1, 3, 4, 10]
1: Error; Message malformed.
3: Info; BitPipe is busy. Try again later.
4: Error; BitPipe wireless device command timeout.
Usually due to transient state, e.g.: bad network
coverage.
10: Error; Invalid MQTT connection identifier
3 7 MSG TYPE REPLY 1
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
www.briowireless.com Copyright 2016 Briowireless inc.
85
BitPipe Serial API V1
The MQTT Connection Identifier cannot be subsequently used with another MQTT operation.
The reception of this notification does not need to be acknowledged, so no reply message is defined.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD MQTT Disconnect Notify 0x9F
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 MQTT CONN MQTT Connection Identifier. [0x00 - 0xFF]
ID
5 REASON Reason Code: [0, 1, 254]
0: MQTT broker has closed the connection.
1: MQTT CONNECT has failed.
...
254: Error; Generic socket error.
[6, 7] CRC CRC [0x0000 -
0xFFFF]
8 EOF End-of-frame 0xCE
If options and a recipient have been previously configured and don't need to be changed, this operation
can be skipped. However, this information is stored in volatile memory; it doesn't carry across reboots.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD SMS Setup Transmission 0xD0
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 0 CONCAT Concatenated SMS (i.e.: Large SMS) support: [0,1]
SUPPORT 0: Disabled;
1: Enabled.
4 [1,2] ENCODING SMS Encoding used: [0-2]
0: 7 bits, ASCII - (Max 160 characters / SMS);
1: 8 bits, binary - (Max 140 characters / SMS);
2: 16 bits, UCS2 - (Max 70 characters / SMS);
4 [3-7] RESERVED Reserved for future use 0
5 Phone number Number of digits in the phone number. [0-25]
length
[6 - ...] Phone number Phone number of SMS ASCII (digits)
The format is international, without any leading '+'
character.
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD SMS Setup Transmission 0xD0
2 ID Packet ID [0x00 - 0xFF]
www.briowireless.com Copyright 2016 Briowireless inc.
87
BitPipe Serial API V1
Sending this request with a 0-length message part, along with Send Indicator value of 0, will clear the
BitPipe send buffer, erasing any previously appended SMS data.
Sending this request with a 0-length message part, along with Send Indicator value of 1, will re-send the
last message.
When appending with 16-bit encoding, make sure to transfer the characters in big endian.
When appending with 7-bit encoding, transfer the characters in 8-bit binary: The 7-bit encoding will take
place in the BitPipe. Hence, ASCII can be transferred directly.
Note: The send buffer used by this operation is the same send buffer as the TCP Write Append
operation. If TCP data is presently in the BitPipe send buffer, an error will be indicated in the status of
the reply message
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD SMS Message Append / Send 0xD1
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 Send Indicator Specifies if the SMS message should be sent after [0, 1]
this data:
0: More data will follow.
1: No more data will follow. Send the message.
5 Msg Length Length of the following SMS message part. [0x00-0xFF]
[6 - ...] Message SMS message part (8-bit binary) [0x00-0xFF]
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
www.briowireless.com Copyright 2016 Briowireless inc.
89
BitPipe Serial API V1
The request is sent by the BitPipe and MUST be acknowledged by the Host (using the reply message).
The SMS information will be dropped by the BitPipe after the 3rd try without acknowledge.
The Host should also expect following SMS Message Part Notify message(s) following this operation.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD SMS Message Reception Notify 0xD4
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 ENCODING SMS Encoding used: [0-2]
0: 7 bits;
1: 8 bits;
2: 16 bits;
Note: 7-bit characters are expanded to 8-bit
characters during reception in the BitPipe.
5 YEAR Date year, minus 2000, at which the service center [0 - 255]
received the SMS.
Example: 16 = year 2016
6 MONTH Current date month, zero-based, at which the [0 - 11]
service center received the SMS.
Example: 1 = February.
7 DAY Date day, zero based, at which the service center [0 - 30]
received the SMS.
8 HOUR Time, in 24 hours format, at which the service [0 - 23]
center received the SMS.
Example: 22 = 10PM
9 MINUTE Time minute, at which the service center received [0 - 59]
the SMS.
10 SECOND Time second, at which the service center received [0 - 59]
the SMS.
11 [0 - 6] TZ INFO Timezone information, at which the service center [0-127]
received the SMS.
Specifies the number of quarter-hours added or
www.briowireless.com Copyright 2016 Briowireless inc.
91
BitPipe Serial API V1
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD SMS Message Reception Notify 0xD4
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success 0
3 7 MSG TYPE REPLY 1
[4, 5] CRC CRC [0x0000 -
0xFFFF]
6 EOF End-of-frame 0xCE
The data must be interpreted as indicated by the SMS encoding specified in the SMS Message
Reception Notify message. Please note that 7-bit characters are transformed into 8-bit characters
during reception, so there is no transformation necessary when 7-bit encoding is used by the sender. For
16-bit encoding, the bytes need to be swapped because they will have been transmitted in big endian.
The request is sent by the BitPipe and MUST be acknowledged by the Host (using the reply message).
The SMS message data will be dropped by the BitPipe after the 3rd try without acknowledge.
Request
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD SMS Message Part Notify 0xD5
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS Unused 0
3 7 MSG TYPE REQUEST 0
4 Last Part Ind Last part indicator: [0, 1]
0: More data will follow.
1: No more data will follow.
5 SMS data Length, in bytes, of the following SMS data. [0x00 - 0xFF]
length
[6 - ...] SMS data SMS message data (8-bit binary). [0x00 - 0xFF]
[N-2, N-1] CRC CRC [0x0000 -
0xFFFF]
N EOF End-of-frame 0xCE
Reply
Byte # Bit # Name Description Value
0 SOF Start-of-frame 0x7E
1 CMD SMS Message Part Notify 0xD5
2 ID Packet ID [0x00 - 0xFF]
3 [0 - 6] STATUS 0: Success 0
3 7 MSG TYPE REPLY 1
Align center