-
Notifications
You must be signed in to change notification settings - Fork 5
Packet Types
LoRa Sync Word: 0x73
Modulation Setting | Value |
---|---|
Bandwidth | 125KHz |
Spreading Factor | 8 |
Coding Rate | 7 |
Preamble Length | 8 |
LARPS makes use of the RadioHead library, which implements a different sync word as well as addressing system. Spreading factor is set to 8, although we may switch to 12 at some point. More testing needs to be done for range vs. speed. The sync word is set to the RadioHead default for now.
Packets are binary safe and contain binary numbers. Callsigns make use of ASCII. Any unused values, including empty callsign space, should be designated as 0x00 (NULL). Any numerical value should be represented in binary.
There are multiple types of addressing permitted within LARPS. These types are: Unicast and Beacon. Unicast is a message intended for a specific recipient. Beacon is a notification for any station in range.
Version | Len | Src | Dest | Relay | Count | TTL | Options | Type | Data | CRC |
---|---|---|---|---|---|---|---|---|---|---|
1 | 1 | 12 | 12 | 12 | 1 | 1 | 1 | 1 | 0-211 | 2 |
Verison
Indicates the packet version. This is version 1, so 0x01 will be used.
Len
Complete length of the packet in bytes.
Src
Source callsign of the packet
Dest
Destination callsign of the packet.
Special Callsign | Meaning |
---|---|
* | Wildcard, a beacon to any station |
FINDBBS | Search for bulletin board |
FINDSTATIONS | Search for nearby stations |
Relay
Indicates the station digitpeting the packet. Packet originators should leave this blank.
Count
This is the packet count, designated by the originator. It is important to keep this value intact when digipeting, as it allows other stations to identify if they have already digipeted the packet. This prevents routing loops.
TTL
Time to live is decremented on each digipete. This prevents routing loops. While a value of 0-255 is supported, we recommend setting this to 7 when originating a packet, and enforcing the max value of 7 when digipeting. If a packet is received with a 0, it should not be digipeted.
Options
Option is a bitmap of options.
Bit | Option Description |
---|---|
7 | ACK Requested |
6 | Do not digipete |
0-5 | Reserved for future use |
ACK Requested is used when positive verification is required that a packet was received. This should only be utilized in unicast mode. Any ACK Requested with the wildcard destination should never be ACK'ed.
Do not Digipete is used when the originator does not want a packet digipeted.
0-5 are reserved for future use.
Type
Type indicates the packet type. This dictates what is contained in the actual data and how it will be parsed. The types are extensive, so this will be addressed later in the document.
Data
Data is a variable length field. It can range from 0 to 211 bytes, depending on the type.
CRC
CRC is a 16 bit CRC, which is used to detect errors in the packet. If a CRC is invalid, it should be rejected and ignored.
A variety of packet types are supported with LARPS. Since LARPS is an Open Protocol, additional types can be added by the community. However, since protocol integrity is extremely important, non-specified protocol types should not be supported until community consensus.
Packet Type List
Value | Packet Type | Description | Status |
---|---|---|---|
0x00 | Reserved | Reserved | Active |
0x01 | ACK | Packet Acknowledgement | Active |
0x02 | Position Update | GPS position update | Active |
0x03 | Weather Update | Weather station data | Active |
0x04 | Bulletin | News bulletin | Active |
0x05 | Emergency Alert | Emergency Alert Message | Active |
0x06 | Repeater Status | Repeater information | Active |
0x07 | Repeater Directory Digest | Directory of local repeaters | Active |
0x08 | Text Message | Text message between stations | Active |
0x09 | Chatroom Message | Chatroom message | Active |
0x0A | Chatroom Directory | Directory of chatrooms | Active |
0x0B | Broadcast Message | Message to all stations | Active |
0x0C | Beacon | Propagation beacon | Active |
0x0D | Search Request | Search for BBS | Active |
0x0E | Search Response | Response for BBS search | Active |
0x0F | Active Session | Transparent Connection | Active |
0x10 | Last Seen Stations | Digest of recent stations | Active |
0x11 | Control Message | Repeater control messages | Active |
0x12 | Block | Banish or block a callsign | Active |
0x13 | Game Session | Game session | Active |
0x14 | Time | Current time packet | Active |
0x15 | Image | Image transport | Active |
0x16 | Battery | Battery voltage update | Active |
0x00 - Reserved
Not used
0x01 - ACK
This is transmitted in response when the "ACK Requested" option is selected. It should only be transmitted for unicast messages to avoid broadcast storms.
0x02 - Position Update
This message is used to provide position updates, such as GPS locations of any station.
Data format in text:
[time in UTC],[latitude],[longitude],[altitude],[speed],[direction],[station type]
Station types:
ascii value | station type description |
---|---|
0 | handheld |
1 | pedestrian |
2 | car |
3 | truck |
4 | van |
5 | emergency vehicle |
6 | ambulance |
7 | fire truck |
8 | command vehicle |
9 | officer |
10 | aircraft |
11 | boat |
12 | quadcopter UAV |
13 | fixed wing UAV |
14 | balloon |
15 | float |
16 | landmark |
17 | road closed |
18 | accident |
19 | hazard |
20 | Perimeter Marker |
21-255 | reserved for future use |
0x03 - Weather Update
Weather updates are still in the definition process, but should utilize METAR format
0x04 - Bulletin
Bulletins are free text fields. No advise on formatting at this time. Bulletins can be used (and not limited to) the following:
- Amateur radio items for sale
- Local nets
- Swapmeets
- Club Meetings
- Any other announcements
0x05 - Emergency Alert
Emergency alerts are free text fields. They should only be utilized in emergencies. They can also be used to announce weather advisories, watches and warnings.
0x06 - Repeater Status
Used for local repeater advertisements.
0x07 - Repeater Directory Digest
An assembled list of local repeater advertisements, transmitted ideally from a digipeter with broad coverage area.
0x08 - Text Message
Free text field for text message between stations.
0x09 - Chatroom Message
Chatroom message for a designated chatroom. The format is text based and is as follows:
#[channel name]:[free form text]
Messages sent directly between stations should just use the text message packet.
0x0A - Chatroom Directory
This lists the various chatrooms that are currently being utilized. This directory is ideally analyzed and summerized by a digipeter with a broad coverage area.
The format is a comma delimited just of channels
0x0B - Broadcast Message
TBD.
0x0C - Beacon
Used for propagation beacon packets. This is a free form text field.
0x0D - Search Request
This packet is used to search for nearby BBS stations. BBS stations that wish to identify themselves will listen for this packet type and respond with Search Response (*0x0E).
0x0E - Search Repsonse
This packet is transmitted from BBSes in reply to the Search Request. The following text format is to be used:
[BBS callsign],[Frequency],[Description]
0x0F - Active Session
This packet is used for transparent connections between stations, typically between a BBS and a client. It is also advised that while a connection request can be made on the default LARPS channel, the connection should continue on an alternate frequency.
The first byte in the data field designates the type of transparent connection packet that is being utilized. The remainder of the field can be used for free form text, binary safe, between the two stations.
Value | Data Type | Description |
---|---|---|
0x00 | Reserved | Reserved |
0x01 | Connect Request | Request a connection to the remote station |
0x02 | Connect Accepted | Accept connection, contains frequency in Hz in ASCII number |
0x03 | Connect Rejected | Connection rejected, free form text for reason |
0x04 | Ping | Keep alive message, used after frequency switching, with text to reply with |
0x05 | Pong | Response to ping, free form text containing what was pinged with |
0x06 | Frequency | Force frequency change, contains frequency in Hz in ASCII number |
0x07 | Text | Free form text that is used during the session, binary safe |
0x08 | Disconnection | Either station can send a disconnection message, disconnecting the session |
Values 0x09-0xFF are reserved.
0x10 - Last Seen Stations
Digest from a digipeter with a broad coverage area. Contains a comma delimited list of recently heard stations.
0x11 - Control Message
TBD. Used to control remote digipeters, voice repeaters, and other stations.
0x12 - Block
Optional message used to prune misbehaving stations participating within the mesh network. Data field contains the callsign in question.
0x13 - Game Session
This packet type is used for a variety of experimental games. Simple turn-based games, drawing applications, and other applications are being evaluated. This packet type will eventually have a structure that will allow discovery of players, start and stop of game sessions, registered games in a game id, as well as free form data fields for the specific application.
0x14 - Time
This packet contains the time in epoch UTC
0x15 - Image
This packet type contains the higher layer protocol which manages reliable image transmission.
0x16 - Battery
This packet type provides battery voltage in ASCII numeric format, which may contain a floating point.