mDot AT Command Quick Start
It only takes a few simple AT commands to get your mDot communicating using the factory installed AT firmware. If you've flashed other firmware into your mDot, you can always restore the factory firmware by following the instructions here.
Setup¶
Make sure your mDot is properly seated in the UDK as described here. There AT firmware uses two serial ports on the mDot:
- the external 9-pin serial connector is used for the AT interface
- the virtual serial port on the ST-LINK USB connector is used for logging
Connect the 9-pin serial connector on the UDK to your PC and connect your favorite terminal emulator to the new COM port or serial device that represents the AT interface. The default baud for the AT interface on the mDot is 115k.
You can see if you have things set up correctly by issuing an "AT" on the terminal. You should get an "OK" back.
AT
OK
Configuring¶
To configure your mDot to communicate with a MultiConnect Conduit gateway, you only need to set a couple of parameters.
Set your network ID and network key to match your gateway's configuration.
AT+NI=1,<your gateway's network id>
Set Network Name: <your gateway's network id>
OK
AT+NK=1,<your gateway's network key>
Set Network Passphrase: <your gateway's network key>
OK
If you have a mDot operating in the 915 frequency band (US), you'll also need to configure your frequency sub band to match your gateway. Available sub bands are 1 - 8.
AT+FSB=<your gateway's frequency sub band>
OK
ACKs are off by default. If you want the gateway to acknowledge your packets, turn ACKs on. The numeric parameter to AT+ACK is the number of times the mDot will try sending the packet without receiving an ACK before giving up and reporting an error.
AT+ACK=1
OK
Now is a good time to save your configuration so you don't have to go through these steps every time you power cycle your mDot. AT&W writes your configuration to non-volatile memory on the mDot.
AT&W
OK
Configuring for Public Network¶
Set mDot to Public Mode
AT+PN=1
Configure Frequency Sub-band (1:902.3-903.7, 2:903.9-905.3,..., 8:913.5-914.9)
AT+FSB=1
- Set your App EUI and App Key
AT+NI=0,<APP-EUI>
Set Network ID: <APP-EUI>
OK
AT+NK=0,<APP-KEY>
Set Network Key: <APP-KEY>
OK
AT&W writes your configuration to non-volatile memory on the mDot.
AT&W
OK
Connecting & Sending Data¶
Join your Conduit's LoRa network so you can send and receive packets.
AT+JOIN
Successfully joined network
OK
Send some data to the gateway!
AT+SEND hello world!
OK
If ACKs are enabled, getting an "OK" means the gateway acknowledged the packet. If ACKs are not enabled, getting an "OK" means the mDot successfully transmitted the packet.
What Next?¶
For more details and full AT command documentation, take a look at: