Popoto Acoustic Message Header
Every acoustic packet contains a header packet. Some acoustic packet types consist only of a header, while others contain a subsequent payload packet.
Header Packet Format
| Bits | Field | Purpose | Format |
|---|---|---|---|
0-7 | Message Type | Identifies packet type, such as data packet, packet with payload, ranging, or status. | 8-bit MessageID. 0: Data; 128: Range Response; 129: Range Request; 130: Status. |
8-15 | SenderID | ID of the transmitting modem. | 0x0 to 0xfe: modem ID; 0xff: broadcast. |
16-23 | ReceiverID | Intended ID of the destination receiver. | 0x0 to 0xfe: modem ID; 0xff: broadcast message. |
24-31 | TxPower | Transmitted scale factor as entered by the transmitting modem. | Transmit-power setting as a Q8 scale value. |
32-47 | PayloadInfo | If the message does not contain a payload, this field is 0. If a payload follows, the bits are assembled according to the payload info fields described below. | See Payload Structure. |
Payload Structure
If header bytes 4 and 5 are not zero, modulated payload data immediately follows the modulated header data. The payload is described by the 16 bits in the header's payload info field.
Header Byte 4
| Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
|---|---|---|---|---|---|---|---|
| Plen7 | Plen6 | Plen5 | Plen4 | Plen3 | Plen2 | Plen1 | Plen0 |
Header Byte 5
| Bit 15 | Bit 14 | Bit 13 | Bit 12 | Bit 11 | Bit 10 | Bit 9 | Bit 8 |
|---|---|---|---|---|---|---|---|
| Mod4 | Mod3 | Mod2 | Mod1 | Mod0 | Stream | Plen9 | Plen8 |
The payload length in bytes is set by the 10 bits of the Plen field. Although this field contains 10 bits, the payload size is capped by software to a maximum of 256 bytes.
Bits 11-15 of header byte 5 contain the modulation used for the payload. Popoto uses the following enumerated modulations.
Modulation Types
| Modulation Bitfield | Modulation Scheme | Data Rate |
|---|---|---|
0 | Frequency hopped FSK | 80 bps |
1 | Phase shift keying | 5120 bps |
2 | Phase shift keying | 2560 bps |
3 | Phase shift keying | 1280 bps |
4 | Phase shift keying | 640 bps |
5 | Phase shift keying | 10240 bps, uncoded |
Streaming Mode
When large files are transmitted, it is more efficient to transfer the file in streaming mode.
When streaming mode is invoked, bit 10 of header byte 5 is set to indicate streaming mode. In streaming mode, the payload length Plen indicates the number of 255-byte frames that follow before another header transmission. All 255-byte packet remainders are handled by the software automatically.