Hey Manuel, I sent you an email about getting it running.
But in summary, here are the commands you’ll need to issue to get onto TTN (without my //comments)
at+pn=1 // Set Public Network to true
at+njm=0 // Set Network Join Mode to manual
at+fsb=7 // Set Frequency Sub Band to whatever your Conduit is set to. Mine is 7
at+ack=0 // Turn off acknowledgements (not supported by TTN yet)
at+na=12345678 // Pick a number. This is the node address and should be unique for each node.
at+nk=0,2B7E151628AED2A6ABF7158809CF4F3C // Set Network Key for TTN
at+nsk=2B7E151628AED2A6ABF7158809CF4F3C // Set Network Session Key for TTN
at+dsk=2B7E151628AED2A6ABF7158809CF4F3C // Set Data Session Key for TTN.
Hi Andrew!, thanks for the response, I will try to join the TTN, after my “hello world” happens,
I got another question please, will the mDot modem respond with any info when connected on serial monitor? like with an empty sketch can I just issue AT commands from serial monitor?
I also tried with just sending “AT” on the arduino “setup”, should I be able to see the response on the serial monitor?
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.print("AT");
}
void loop() {
// put your main code here, to run repeatedly:
}
So far Im not getting any response, how to print the responses?, Im missing the basic setup
If you’re using an Arduino Uno, then there is only one UART, which is shared between the USB port and the mDot. Easiest way to test functionality is to use a blank sketch (no Serial.begin) and just open the serial monitor (at 115200). If you type “AT”, you should get an “OK” back from the mDot.
Your sketch above should work - almost! Change the Serial.print to Serial.println. Also, the sketch will probably run before your serial monitor gets connected, so maybe put a delay at the start.
If you have an Arduino Leonardo, then it has separate UART for the USB port and the mDot. In which case you’ll need a sketch to pass characters back and forth between the two ports. Like this:
hey Andrew, thanks for the help,
serial monitor not happy yet to test,
yes im using arduino uno, I did
Easiest way to test functionality is to use a blank sketch (no Serial.begin) and just open the serial monitor (at 115200). If you type “AT”, you should get an “OK” back from the mDot
but no response yet from the serial monitor.
Thanks getting there I ordered the mDot programmer [devKit], so is easier to user, also 10 mdots to start having fun…
Will continue checking this arduino interface, Thanks!
what are the model numbers of the devices you got? I’m looking to make a simple node to get started, and I think the mDots are the way to go here in Sydney, for now!
Also where did you get the hardware from? i hear you might be setting up a Things Network gateway in the coming months too?! phenomenal work!
Hi Andrew, thanks ok so this is the status, OK showing on serial port using arduino, on mac
got DB9 serial to USB cable
only worked so far on windows, so with the UDK, and using terminal program, can send commands AT to the LoRa module,
now other question please,
Thanks for the commands…
at+pn=1 // Set Public Network to true
at+njm=0 // Set Network Join Mode to manual
at+fsb=7 // Set Frequency Sub Band to whatever your Conduit is set to. Mine is 7
at+ack=0 // Turn off acknowledgements (not supported by TTN yet)
at+na=12345678 // Pick a number. This is the node address and should be unique for each node.
at+nk=0,2B7E151628AED2A6ABF7158809CF4F3C // Set Network Key for TTN
at+nsk=2B7E151628AED2A6ABF7158809CF4F3C // Set Network Session Key for TTN
at+dsk=2B7E151628AED2A6ABF7158809CF4F3C // Set Data Session Key for TTN.
Then issue:
at+join
at+send=HelloWorld
here I dont know where i did set sub band,
at+fsb=7 // Set Frequency Sub Band to whatever your Conduit is set to. Mine is 7
where is this network key, session key, data session key?
at+nk=0,2B7E151628AED2A6ABF7158809CF4F3C // Set Network Key for TTN
at+nsk=2B7E151628AED2A6ABF7158809CF4F3C // Set Network Session Key for TTN
at+dsk=2B7E151628AED2A6ABF7158809CF4F3C // Set Data Session Key for TTN.
how to get the band and the keys?
where is this configured on the gateway?
Hey @maj Thanks a lot for the guidance!, I changed some things! now connected using DB9 cable, sending commands that way, next AT ardu and raspi, Chat soon… Thanks! :}
hey Manuel, have you got the LoRa gateway and network up and running in Sydney?
I’m keen to connect to others in Sydney who are interested in this space.
Cheers
Paul
FYI These commands are no longer valid since we now use the Australian band plan and also since TTN has moved to the new back end.
New commands to use on Multitech mDot’s are (for OTAA):
at+pn=1
at+njm=1
at+fsb=2
at+ack=0
at+ni=0,your_app_id
at+nk=0,your_app_key
at+join
at+send=HelloWorld
I have an Arduino Uno so I am using SoftwareSerial to talk to mDot.
mDot flashed with AT Command Firmware v 3.0.0
I can write to the mDot serial, connect to TTN - no problem with that.
But when I try to read data from the serial port it is scrambled and some parts are missing.
Result (sometimes it is different):
Q)5)MultiTech mDot
mFirmware : 3.0.0-mbed144
Library : 3.0.0-
I have tried changing the baud rate on the mDot to 9600 instead of the default one, in case SoftwareSerial does not support 115200, but it did not help either.
I know it is an old thread, but it seems to be popular.
What am I doing wrong? Does anyone have similar issues?
Thank you for the suggestion.
I have tried AltSoftSerial, the result was slightly better, but again not really reliable.
I ended up using an Arduino Mega and hardware serial instead.
Even with the Mega I had to lower the baud rate of the mDot to 19200.
But that works for me now.
At some point I might just replace the AT firmware and return just a few bytes (fixed length) for status codes.
Or, Is there a way to turn off all the messages in the factory AT firmware and just read the statuses e.g. OK, ERROR?
Seems strange that you still have problems, even with Hardware Serial. I run mDots mainly on Arduino Leonardos (so hardware serial) and have no problems at 115200 baud with AT firmware v2.x. I haven’t tried v3 yet.