Skip to content

Commit cd3af52

Browse files
committed
Add the virtual circuit documentation
1 parent 327b486 commit cd3af52

File tree

4 files changed

+360
-11
lines changed

4 files changed

+360
-11
lines changed

docs/at_commands.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Below is a brief list of commands:
1111
|+++ | Enter command mode |
1212
|AT | Reports OK |
1313
|AT? | Display help text |
14+
|ATA | Get the current VC status |
1415
|ATB | Break the link |
16+
|ATC | Establish VC connection for data |
1517
|ATD | Display the debug settings |
1618
|ATF | Restore factory settings |
1719
|ATG | Generate new netID and encryption key |
@@ -23,6 +25,7 @@ Below is a brief list of commands:
2325
|ATR | Display radio settings |
2426
|ATS | Display the serial settings |
2527
|ATT | Enter training mode |
28+
|ATV | Display virtual circuit settings |
2629
|ATW | Save current settings to NVM |
2730
|ATZ | Reboot the radio |
2831
|AT-Param=xxx| Set parameter's value to xxx by name (Param)|
@@ -70,7 +73,7 @@ A table of the subset of the common Radio Link Parameters is available [here](im
7073
| AT-MaxResends | Attempts before dropping packet
7174
| AT-NetID | Network ID
7275
| AT-NumberOfChannels | Divide available spectrum by this amount
73-
| AT-OperatingMode | Multipoint or P2P
76+
| AT-OperatingMode | Multipoint, P2P, or VC
7477
| AT-OverHeadtime | Additional ms before ACK timeout occurs
7578
| AT-PreambleLength | Set LoRa preamble length
7679
| AT-SelectLedUse | Define LED behavior
@@ -118,7 +121,7 @@ A table of the subset of the common Radio Link Parameters is available [here](im
118121

119122
* **FrequencyMin/FrequencyMax** - These are the lower and upper bounds for the allowed transmission frequencies in megahertz. By default, this is 902.0 to 928.0.
120123

121-
* **HeartbeatTimeout** - Heartbeats are transmitted on a regular basis by the server and in point-to-point mode by the clients. This parameter specifies the time in milliseconds during which a HEARTBEAT frame should be transmitted. If a HEARTBEAT frame is not received within three (3) times this interval then the point-to-point link is broken. The default heartbeatTimeout is 5000 milliseconds (5 seconds).
124+
* **HeartbeatTimeout** - Heartbeats are transmitted on a regular basis by the server and in point-to-point and virtual circuit modes by the clients. This parameter specifies the time in milliseconds during which a HEARTBEAT frame should be transmitted. If a HEARTBEAT frame is not received within three (3) times this interval then the point-to-point or virtual circuit link is broken. The default heartbeatTimeout is 5000 milliseconds (5 seconds).
122125

123126
* **MaxDwellTime** - The number of milliseconds of transmission allowed on a given frequency before hopping intra-packet. The default is 400ms to be compliant with FCC Part 15.247. This means the radio will change its frequency to the next channel in the hop table during the packet transmission. Note this is the maximum dwell time; depending on the air speed setting the radio may have a hopping period that is shorter than the dwell time.
124127

@@ -128,19 +131,21 @@ A table of the subset of the common Radio Link Parameters is available [here](im
128131

129132
* **NumberOfChannels** - The available spectrum (default is 902MHz to 928MHz) is divided by this number of channels to create the channel spacing and allowed frequency list (aka the ‘hop table’). The default is 50 channels to meet FCC Part 15.247 compliance and may be changed to meet local regulations.
130133

131-
* **OperatingMode** - The radios can operate in one of two different modes: Multipoint and Point-To-Point. See [Operating Modes](http://docs.sparkfun.com/SparkFun_LoRaSerial/operating_modes/) for more information.
134+
* **OperatingMode** - The radios can operate in one of three different modes: Multipoint, Point-To-Point and Virtual Circuit. See [Operating Modes](http://docs.sparkfun.com/SparkFun_LoRaSerial/operating_modes/) for more information.
132135

133136
+ MODE_MULTIPOINT (0) - A single server with multiple clients. All radios may broadcast to all other radios, but data is not guaranteed to be received by the other radios. This mode is great when real-time transmission is necessary and the application can tolerate some loss of data.
134137

135138
+ MODE_POINT_TO_POINT (1, default) - Communications between two LoRaSerial radios with guaranteed delivery of frames or the link breaks.
136139

140+
+ MODE_VIRTUAL_CIRCUIT (2) - A single server with multiple clients that supports multipoint communications with guaranteed delivery or the link breaks. This mode uses a special protocol over the serial link to be able to specify the destination radio for transmission and the receive radio for reception. More information is available [here](http://docs.sparkfun.com/SparkFun_LoRaSerial/operating_modes/#virtual-circuits).
141+
137142
* **OverheadTime** - The number of milliseconds to add to ACK and datagram times before ACK timeout occurs. The default is 10 milliseconds.
138143

139144
* **PreambleLength** - The number of sync words to send at the start of a packet. Note that two LoRa radios with the same settings but different preamble lengths have been shown to intermittently receive packets from each other. Therefore, using a unique preamble length does *not* guarantee exclusivity. Allowed values: 6 to 65535.
140145

141146
* **SelectLedUse** - Select how to display information on the LEDs. See [LED States](http://docs.sparkfun.com/SparkFun_LoRaSerial/led_states/) for more information.
142147

143-
* **Server** - Enable (1) or disable (0) the server mode for training and for multipoint operation. The default is client mode (0). The radio designated as Server synchronizes the network. A server is required for Multipoint and Training modes.
148+
* **Server** - Enable (1) or disable (0) the server mode for training and for multipoint or virtual circuit operation. The default is client mode (0). The radio designated as Server synchronizes the network. A server is required for Multipoint, Virtual Circuit and Training modes.
144149

145150
* **SpreadFactor** - The spread factor used during LoRa transmissions. It is recommended to use the airspeed setting unless you are very aware of the consequences. This setting is overwritten if the AirSpeed setting is changed. In general, a higher spread factor provides a longer range, but a lower overall data rate. Allowed spread factors: 6 to 12 (inclusive).
146151

@@ -198,8 +203,9 @@ A table of the subset of the common Radio Link Parameters is available [here](im
198203
| ATI8 | Display system unique ID
199204
| ATI9 | Display the maximum datagram size
200205
| ATI10 | Display radio metrics
201-
| ATI13 | Display the SX1276 registers
202-
| ATI14 | Dump the radioTxBuffer
206+
| ATI30 | Return myVc value
207+
| ATI31 | Display the VC details
208+
| ATI32 | Dump the NVM unique ID table
203209

204210
* **ATI0** - List all available AT commands.
205211

@@ -217,23 +223,25 @@ A table of the subset of the common Radio Link Parameters is available [here](im
217223

218224
* **ATI7** - Displays the current channel number. For example: "29".
219225

220-
* **ATI8** - Displays the unique 32-character, 16-byte, 128-bit value marked into the SAMD21 microcontroller. For example: "5BCEDAE13630595020312E32102317FF".
226+
* **ATI8** - Displays the unique 32-character, 16-byte, 128-bit value marked into the SAMD21 microcontroller. Used during Virtual Circuit mode to assign destination IDs. For example: "5BCEDAE13630595020312E32102317FF".
221227

222228
* **ATI9** - Displays the maximum number of bytes that can be transmitted. Different radio settings will use fewer or a greater number of bytes for overhead. For example: "249".
223229

224230
* **ATI10** - Displays a large number of metrics related to the radio link including datagrams sent, link uptime, ACK counts, buffer states, etc.
225231

226-
* **ATI13** - Displays the contents of all the registers in the SX1276 LoRa transceiver.
232+
* **ATI30** - Displays the assigned simplified Virtual Circuit ID assigned by the server. For example, "myVc: 3".
233+
234+
* **ATI31** - Displays the Virtual Circuit state of this radio as it relates to the network.
227235

228-
* **ATI14** - Displays the contents of the current transmit buffer.
236+
* **ATI32** - Displays a list of all the unique IDs of the known clients used in Virtual Circuit mode.
229237

230238
## Remote Training
231239

232240
Currently, only one remote command is supported - **RTT**. Issuing this command to the local radio when the link is up will cause the remote radio to drop from the link and enter training mode. The remote radio will wait in this mode until training is completed, a local **ATZ** command is entered into the remote device, or the Train button is pressed on the remote device.
233241

234242
This command is generally used to remotely configure a radio. First, the **RTT** command is issued, the local radio is configured (including enabling Server), then the **ATT** is issued to push the local radio into training. Because the local radio is the server, its settings are set to the remote radio. The remote radio will reset and start with these newly issued settings. The local radio needs to reset with an **ATZ** command and the link should be re-established with new settings. Below is a command script to achieve this remote configuration. We assume the radios are currently linked at the start of the script.
235243

236-
*Note:* RTT is only supported in P2P mode.
244+
*Note:* RTT is only supported in P2P and VC modes.
237245

238246
+++
239247
RTT

0 commit comments

Comments
 (0)