Configuring a Multitech mDot Box for use on TTN

I got the files from the local supplier I bought the hardware from (after I requested it). I’ve messaged you my email address, I can send you the files.

To change frequencies on an mDot Box (or a regular mDot) to AU915,

Install this firmware http://multitech.net/downloads/mdot-firmware-no-cmd-interface-switch-to-AU915.bin. Wait a few seconds for the device to boot and the firmware to do its magic.

Then install whatever firmware you like, provided it’s based on libmDot 2.0 or later.

I’m having trouble getting this working… I have the config below:

AT&V
Firmware: 2.1.2
Library : 2.0.16-mbed126
Device ID: 00:80:00:00:00:XX:XX:XX
Frequency Band: US915
Frequency Sub Band: 2
Public Network: on
Network Address: 00000000
Network ID: 70:b3:d5:7e:d0:XX:XX:XX
Network ID Passphrase:
Network Key: ce.d8.c1.a8.5c.6e.59.25.f6.72.e5.4c.XX.XX.XX.XX
Network Key Passphrase: 70B3D57ED0XXXXXX
Network Session Key: 00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00
Data Session Key: 00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00
Network Join Mode: OTA
Tx Data Rate: DR0
Tx Power: 20
Log Level: 6
Maximum Size: 242
Minimum Size: 11
Maximum Power: 20
Minimum Power: 2
Data: 0

OK

I’m not sure where (or how to generate) the key needed for the “AT+NK=” setting. Any pointers?

This is available from your TTN console when you register the device using ABP.

I’ve tried all of these… Do I need to format the string a certain way or something?

Thanks greatly, everyone, for sharing your work on the mDot Box and TTN.

I was able to connect to TTN easily following the clues here. I used the following:

at&f
at+fsb=2
at+pn=1
at+njm=1
at+nk=0,7B1964C03064F3795E4243XXXXXXXXXX
at+ni=0,70B3D5XXXXXXXXXX
at&w

Where:
nk is your TTN App Key
ni is your TTN Application EUI

These are both formatted in standard hex, just as they appear at the bottom of your device overview page under “example code”.

Note that the Device ID is pre-set at factory, no need to adjust that.

My config looks like this, then:

at&v
Firmware:               2.1.2
Library :               2.0.16-mbed126
Device ID:              00:80:00:00:00:xx:xx:xx
Frequency Band:         US915
Frequency Sub Band:     2
Public Network:         on
Network Address:        00000000
Network ID:             70:b3:d5:xx:xx:xx:xx:xx
Network ID Passphrase:
Network Key:            7b.19.64.c0.30.64.f3.79.5e.42.43.xx.xx.xx.xx.xx
Network Key Passphrase:
Network Session Key:    00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00
Data Session Key:       00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00
Network Join Mode:      OTA
Tx Data Rate:           DR0
Tx Power:               20
Log Level:              6
Maximum Size:           242
Minimum Size:           11
Maximum Power:          20
Minimum Power:          2
Data:                   0

OK

Now I just need to see if I can get the data to come up in survey mode. right now, my payload is incomprehensible.

I would love to get this to send GPS data to TTN, and then use it with TTN Mapper.

2 Likes

I asked about data format over on slack, and got an answer. Here’s the application payload format to decode temperature, lat and long at TTN:

function Decoder(bytes, port) {
 // Decode an uplink message from a buffer
 // (array) of bytes to an object of fields.
 
/*
Datenformat für Modus Survey GPS

Byte 0 is 0
Byte 1 is temperature in Celsius
Byte 2 is 0
Byte 3-6 is GPS Latitude
Byte 7-10 is GPS Longitude
Bytes 10+ is padding with 0
*/  

 var boardtemp = bytes[1];
 var lat = ((bytes[3] << 24) | (bytes[4] << 16) | (bytes[5] << 8 ) | bytes[6])  / 2147483648*90; // 2^31 * 90
 var long = ((bytes[7] << 24) | (bytes[8] << 16) | (bytes[9] << 8 ) | bytes[10]) / 2147483648*180; // 2^31 * 180

  boardtemp = 1.8 * boardtemp + 32; //

 // if (port === 1) decoded.led = bytes[0];

return {
   boardtemp: boardtemp,
   lat: lat,
   long: long,
   };
}

There is also a TTN application that will read your box and post to ttn mapper @Verkehrsrot can help with that.

4 Likes

it didnt work it gave me this error?
json: unsupported value: NaN

9 months later ! :roll_eyes:

you dont want me to create new topic and told me to search topics i did haha , i just started on mdotbox

1 Like

Check out:
https://console.thethingsnetwork.org/applications/multitech_mdot_box

Mine’s working fine.

I have configurated Mtdot box 868 but it say ‘no gps lock’,what can I do to get you to give me the gps values?

thanks

Wait or take it outside to get a view of the sky if you’ve not already done that.