Skip to main content

General Configure for -KN & -KS Models (LTE CAT-1)

1. The use of this guideline

This configure instruction is for Dragino NB-IoT models with -KN or -KS suffix, for example S31B-KS. These models use the same NB-IoT Module EG800-NGFF and has the same software structure. The have the same configure instruction to different IoT servers. Use can follow the instruction here to see how to configure to connect to those servers.

2. Attach Network

2.1 General Configure to attach network

To attache end nodes to CAT-M1 Network, You need to:

  1. Get a CAT-M1 SIM card from Service Provider. (Not the same as the SIM card we use in mobile phone)
  2. Power Off End Node ( See below for the power off/on position)
  3. Insert the SIM card to Sensor. ( See below for direction)
  4. Power On End Node
  5. Configure APN in the sensor (AT+APN=<APN>), example AT+APN=iot.1nce.net

image-20240602220856-1.png

image-20230808205045-1.png

After doing above, the end nodes should be able to attach to NB-IoT network .

The -KN and -KS models support CAT-M1, with below frequency band: multiple frequency bands of

--CAT-M1: B1/B2/B3/B4/B5/B8/B12/B13/B18/B19/B20/B25/B26/B27/B28/B66/B85.

Make sure you use a the CAT-M1 SIM card.

SIM ProviderAT+APN=NB-IoT CoverageLTE-M CoverageComments
1NCEiot.1nce.netCoverage Reference Link Austria, Belgium, Bulgaria, China, Croatia, Czech Republic, Denmark, Estonia, Finland, Germany, Great Britain, Greece, Hungary, Ireland,Italy, Latvia, Malta, Netherlands, Norway, Portugal, Puerto Rico, Russia, Slovak,Republic, Slovenia, Spain, Sweden, Switzerland, Taiwan, USA, US Virgin IslandsArgentina, Austria, Australia, Belgium, Canada, Denmark,Estonia, Finland, France, Germany, Great Britain, Hungary, Ireland, Japan,Jersey, Korea, Repiblic of, Latvia, Luxembourg, Mexico, Netherlands, New Zealand, Norway, Poland, Puerto Rico, Romania, Spain, Sweden, Switzerland,Taiwan, USA, US Virgin Islands.UK: Band20
China MobileNo need configureChina Mainland, HongKong
China TelecomctnbChina Mainland

2.2 Speed Up Network Attach time

EG800-NGFF supports multi bands in CAT-M1. It will search one by one and try to attach, this will take a lot of time and even cause attach fail and show Signal Strenght:99. User can lock the band to specify band for its operator to make this faster.

note

Before using the NB module command, users need to power on the NB module. Run the AT+QSW command to turn on and off the NB module. Remember to shut down after using the NB module command, otherwise it will consume power.

Attache to 1NCE card for Australia use:

AT+COPS=1,2,"50501",8
AT+QCFG="band",0,0x7FFFFFFFFFFFFFFF,1

After connection is successful, user can use AT+QENG="servingcell" to check which band is actually in used.

AT+QENG="servingcell"
+QENG: "servingcell","NOCONN","eMTC","FDD",505,01,90D2C0B,258,9410,28,5,5,901A,-112,-17,-80,10,27

See bands used for different provider: NB-IoT Deployment , Bands, Operator list

2.2.1 Configure Frequency Band

AT+QCFG="band"[,<bandval>,<ltebandval>[,<effect>]]

<bandval>:

0 No change
0x1 EGSM900
0x2 DCS1800
0x4 GSM850
0x8 PCS1900
0000FFFF Full frequency bands

<ltebandval>:

0 No change
0x1 LTE B1
0x2 LTE B2
0x4 LTE B3
0x8 LTE B4
0x10 LTE B5
0x40 LTE B7
0x80 LTE B8
0x80000 LTE B20
0x4000000 LTE B27
0x8000000 LTE B28
0x200000000 LTE B34
0x2000000000 LTE B38
0x4000000000 LTE B39
0x8000000000 LTE B40
0x10000000000 LTE B41
0x20000000000000000 LTE B66
0x7FFFFFFFFFFFFFFF Full frequency bands

For example, setting the LTE-M network frequency band to 8.

AT+QCFG="band",0,0x80,1

When searching for all bands, the value of this command is set to:

AT+QCFG="band",0,0x7FFFFFFFFFFFFFFF,1

2.2.2 AT command to set frequency band and network category

AT+QBAND=0,0 //<bandval>,<ltebandval>

Example :

Taking the use of 1nce cards in the United States as an example.

AT+APN=iot.1nce.net //set APN
AT+QBAND=0,0x4 //GSM/WCDMA: No change; CAT1: Set frequency band B3

Setting the above commands in the United States will greatly reduce the network search time of the NB module.

3. Configure to connect to different servers

3.1 General UDP Connection

The NB-IoT Sensor can send packet to server use UDP protocol.

3.1.1 Simulate UDP Connection by PC tool

We can use PC tool to simulate UDP connection to make sure server works ok.

image-20230802112413-1.png

3.1.2 Configure NB-IoT Sensor

3.1.2.1 AT Commands

AT Commands:

  • AT+PRO=2,0 // Set to use UDP protocol to uplink ,Payload Type select Hex payload

  • AT+SERVADDR=8.135.10.183,56477 // Set UDP server address and port

1766124219137-590.png

1766124938906-520.png

3.2 General MQTT Connection

The NB-IoT Sensor can send packet to server use MQTT protocol.

Below are the commands.

AT Commands:

  • AT+PRO=3,0 // Set to use MQTT protocol to uplink, Payload Type select Hex payload.

  • AT+SERVADDR=8.217.91.207,1883 // Set MQTT server address and port

  • AT+CLIENT=CLIENT // Set up the CLIENT of MQTT

  • AT+UNAME=UNAME // Set the username of MQTT

  • AT+PWD=PWD // Set the password of MQTT

  • AT+PUBTOPIC=NSE01_PUB // Set the sending topic of MQTT

  • AT+SUBTOPIC=NSE01_SUB // Set the subscription topic of MQTT

1766199058685-444.png

1766199070026-964.png

Notice: MQTT protocol has a much higher power consumption compare with UDP/CoAP protocol. Please check the power analyze document and adjust the uplink period to a suitable interval.

3.3 ThingSpeak (via MQTT)

3.3.1 Get MQTT Credentials

ThingSpeak connection uses MQTT Connection. So we need to get MQTT Credentials first. You need to point MQTT Devices to ThingSpeak Channel as well.

1766199444666-517.png

1766199742251-469.png

3.3.2 Simulate with MQTT.fx

3.3.2.1 Establish MQTT Connection

After we got MQTT Credentials, we can first simulate with PC tool MQTT.fx tool to see if the Credentials and settings are fine.

1766200013833-809.png

  • Broker Address: mqtt3.thingspeak.com

  • Broker Port: 1883

  • Client ID: <Your ThingSpeak MQTT ClientID>

  • User Name: <Your ThingSpeak MQTT User Name>

  • Password: <Your ThingSpeak MQTT Password>

3.3.2.2 Publish Data to ThingSpeak Channel

1766200340164-181.png

1766200438723-963.png

In MQTT.fx, we can publish below info:

  • Topic: channels/YOUR_CHANNEL_ID/publish

  • Payload: field1=63&field2=67&status=MQTTPUBLISH

Where 63 and 67 are the value to be published to field1 & field2.

Result:

1766201320288-112.png

3.3.3 Configure NB-IoT Sensor for connection

3.3.3.1 AT Commands:

In the NB-IoT, we can run below commands so to publish the channels like MQTT.fx

  • AT+PRO=3,1 // Set to use ThingSpeak Server and Related Payload

  • AT+CLIENT=<Your ThingSpeak MQTT ClientID>

  • AT+UNAME=<Your ThingSpeak MQTT User Name>

  • AT+PWD=<Your ThingSpeak MQTT Password>

  • AT+PUBTOPIC=<YOUR_CHANNEL_ID>

  • AT+SUBTOPIC=<YOUR_CHANNEL_ID>

1766201416775-447.png

For SE01-NB

For DDS20-NB

For DDS45-NB

For DDS75-NB

For NMDS120-NB

For SPH01-NB

For NLM01-NB

For NMDS200-NB

For CPN01-NB

For DS03A-NB

For SN50V3-NB

3.3.3.3 Map fields to sensor value

When NB-IoT sensor upload to ThingSpeak. The payload already specify which fields related to which sensor value. User need to create fields in Channels Settings. with name so to see the value correctly.

image-20240819174610-9.png

image-20240819174618-10.png

Below is the NB-IoT Product Table show the mapping.

ModelField1Field2Field3Field4Field5Field6Field7Field8Field9Field10
S31x-KSTemperatureHumidityBatteryRSSI
SE01-KSTemperatureHumidityconductdielectric_constantBatteryRSSI
DDS20-KSdistanceBatteryRSSI
DDS45-KSdistanceBatteryRSSI
DDS75-KSdistanceBatteryRSSI
NMDS120-KSdistanceBatteryRSSI
SPH01-KSphTemperatureBatteryRSSI
NLM01-KSHumidityTemperatureBatteryRSSI
NMDS200-KSdistance1distance2BatteryRSSI
CPN01-KSalarmcountdoor open durationcalc flagBatteryRSSI
DS03A-KSlevelalarmpb14door open numpb14 last open timepb15 level statuspb15 alarm statuspb15 door open numpb15 last open timeBatteryRSSI
SN50V3-KS mod1modBatteryRSSIDS18B20 Tempexit_state/input PA4adc0TemperatureHumidity
SN50V3-KS mod2modBatteryRSSIDS18B20 Tempexit_state/input PA4adc0distance
SN50V3-KS mod3modBatteryRSSIadc0exit_state/input PA4adc1TemperatureHumidityadc4
SN50V3-KS mod4modBatteryRSSIDS18B20 Tempadc0exit_state/input PA4DS18B20 Temp2DS18B20 Temp3
SN50V3-KS mod5modBatteryRSSIDS18B20 Tempadc0exit_state/input PA4Weight
SN50V3-KS mod6modBatteryRSSIcount

3.4 Datacake

Dragino NB-IoT sensors has its template in Datacake Platform. There are two version for NB Sensor,

As example for S31B-KB. there are two versions: S31B-KB-1T and S31B-KB.

  • S31B-CB-1T: This version comes pre-configured for connection to the ThingsEye platform. Users simply need to power on the device, and it will automatically connect and send data to the ThingsEye server.

  • S31B-CB: This verson doesn't have pre-configure Datacake connection. User need to enter the AT Commands to connect to Datacake. See below for instruction.

3.4.1 For device Already has template

3.4.1.1 Create Device

Add Device in DataCake.

image-20240820110003-1.png

image-20240820110017-2.png

Choose the correct model from template.

image-20240820110031-3.png

Fill Device ID. The device ID needs to be filled in with IMEI, and a prefix of 'f' needs to be added.

image-20240820110048-4.png

image-20240820110103-5.png

image-20240820110114-6.png

3.4.2 For Device already registered in DataCake before shipped

3.4.2.1 Scan QR Code to get the device info

Users can use their phones or computers to scan QR codes to obtain device data information.

image-20240820110129-7.png

image-20240820110218-9.png

3.4.2.2 Claim Device to User Account

By Default, the device is registered in Dragino's DataCake Account. User can Claim it to his account.

3.4.3 Manual Add Decoder in DataCake ( don't use the template in DataCake)

Step1: Add a device

image-20240820110235-10.png

image-20240129170024-1.png

Step2: Choose your device type,please select dragino NB-IOT device

image-20240820110247-11.png

Step3: Choose to create a new device

image-20240820111016-12.png

Step4: Fill in the device ID of your NB device

image-20240820111101-13.png

Step5: Please select your device plan according to your needs and complete the creation of the device

image-20240820111113-14.png

Step6: Please add the decoder at the payload decoder of the device configuration.

Decoder location:dragino-end-node-decoder/Datacake-Dragino_NB at main · dragino/dragino-end-node-decoder (github.com)

image-20240820111236-15.png

image-20240820111248-16.png

Step7: Add the output of the decoder as a field

image-20240820111259-17.png

Step8: Customize the dashboard and use fields as parameters of the dashboard

image-20240820111312-18.png

image-20240820111322-19.png

image-20240820111333-20.png

3.4.4 For device have not configured to connect to DataCake

Use AT command for connecting to DataCake

AT+PRO=2,0

AT+SERVADDR=67.207.76.90,4445

3.5 Node-Red (via MQTT)

3.5.1 Configure Node-Red

Take S31-KB UDP protocol as an example.

Dragino provides input flow examples for the sensors.

User can download the required JSON file through Dragino Node-RED input flow template.

Download sample JSON file link: https://www.dropbox.com/sh/mduw85jcuwsua22/AAAvwPhg9z6dLjJhmZjqBf_ma?dl=0

We can directly import the template.

The templates for S31-KB and NB95S31B are the same.

image-20240820111353-21.png

Please select the NB95S31B template.

image-20240820111405-22.png

image-20240820111418-23.png

image-20240820111427-24.png

Successfully imported template.

image-20240820111438-25.png

Users can set UDP port.

image-20240820111448-26.png

3.5.2 Simulate Connection

We have completed the configuration of UDP. We can try sending packets to node red.

image-20240820111504-27.png

image-20240820111515-28.png

3.5.3 Configure NB-IoT Sensors

  • AT+PRO=3,0 or 3,5 // hex format or json format
  • AT+SUBTOPIC=<device name> or User Defined
  • AT+PUBTOPIC=<device name> or User Defined
  • AT+CLIENT=<device name> or User Defined
  • AT+UNAME=<device name> or User Defined
  • AT+PWD=“Your device token”

3.6 ThingsBoard.Cloud (via MQTT)

3.6.1 Configure ThingsBoard

3.6.1.1 Create Device

Create a New Device in ThingsBoard. Record Device Name which is used for MQTT connection.

image-20240820112210-29.png

Uplink Converter

The purpose of the decoder function is to parse the incoming data and metadata to a format that ThingsBoard can consume. deviceName and deviceType are required, while attributes and telemetry are optional. Attributes and telemetry are flat key-value objects. Nested objects are not supported.

To create an uplink converter go to the Integrations center ->Data converters page and click “plus” button. Name it “MQTT Uplink Converter” and select type "Uplink". Use debug mode for now.

image-20240820112222-30.png

Downlink Converter

The Downlink converter transforming outgoing RPC message and then the Integration sends it to external MQTT broke

image-20240820112236-31.png

Note: Our device payload is already human readable data. Therefore, users do not need to write decoders. Simply create by default.

3.6.1.3 MQTT Integration Setup

Go to the Integrations center -> Integrations page and click “plus” icon to add a new integration. Name it “MQTT Integration”, select type MQTT;

image-20240820112247-32.png

  • The next steps is to add the recently created uplink and downlink converters;

image-20240820112302-33.png

image-20240820112316-34.png

Add a topic filter:

Consistent with the theme of the node setting.

You can also select an MQTT QoS level. We use MQTT QoS level 0 (At most once) by default;

image-20240820112330-35.png

3.6.2 Simulate with MQTT.fx

image-20240820112340-36.png

image-20240820112351-37.png

3.6.3 Configure NB-IoT Sensor

AT Commands

  • AT+PRO=3,3 // Use MQTT to connect to ThingsBoard. Payload Type set to 3.

  • AT+SUBTOPIC=<device name>

  • AT+PUBTOPIC=<device name>

  • AT+CLIENT=<device name> or User Defined

  • AT+UNAME=<device name> or User Defined

  • AT+PWD=<device name> or User Defined

Test Uplink by click the button for 1 second

image-20240820112404-38.png

image-20240820112416-39.png

image-20240820112426-40.png

3.8 Tago.io (via MQTT)

3.8.1 Create device & Get Credentials

We use MQTT Connection to send data to Tago.io. We need to Create Device and Get MQTT Credentials first.

image-20240820112516-41.png

image-20240820112526-42.png

Go to the Device section and create a device. Then, go to the section tokens and copy your device-token.

image-20240820112539-43.png

The device needs to enable the TLS mode and set the AT+TLSMOD=1,0 command. On the Connection Profile window, set the following information:

  • Profile Name: “Any name”

  • Broker Address: mqtt.tago.io

  • Broker Port: 8883

  • Client ID: “Any value”

On the section User credentials, set the following information:

  • User Name: “Any value” // Tago validates your user by the token only

  • Password: “Your device token”

  • PUBTOPIC: “Any value”

  • SUBTOPIC: “Any value”

AT command:

  • AT+PRO=3,0 or 3,5 // hex format or json format

  • AT+SUBTOPIC=<device name> or User Defined

  • AT+PUBTOPIC=<device name> or User Defined

  • AT+CLIENT=<device name> or User Defined

  • AT+UNAME=<device name> or User Defined

  • AT+PWD=“Your device token”

3.8.2 Simulate with MQTT.fx

image-20240820112552-44.png

image-20240820112604-45.png

Users can run the AT+PRO=3,5 command, and the payload will be converted to JSON format.

image-20240820112615-46.png

image-20240820112626-47.png

3.8.3 tago data

image-20240820112637-48.png

image-20240820112647-49.png

3.9 TCP Connection

AT command:

  • AT+PRO=4,0 // Set to use TCP protocol to uplink(HEX format)

  • AT+PRO=4,5 // Set to use TCP protocol to uplink(JSON format)

  • AT+SERVADDR=8.135.10.183,34196 // to set TCP server address and port

Sensor Console Output when Uplink:

1766202094655-139.png

See result in TCP Server:

1766202134508-422.png

3.10 AWS Connection

Users can refer to Dragino NB device connection to AWS platform instructions

3.11 ThingsEye (via MQTT)

3.11.1 Configure ThingsEye

3.11.1.1 Create MQTT integration

Go to the Integrations center -> Integrations page and click “plus” icon to add a new integration. Name it “MQTT Integration_NB”, select type MQTT;

image-20241126175509-1.png

Next, directly select to create a new Uplink data converter and downlink data converter.

image-20241126180135-2.png

image-20241126180223-3.png

Add a topic filter:

Consistent with the theme of the node setting.

Note: Recommended MQTT broker: lns1.thingseye.io 8883, fixed use. Topic can be changed on their own, but it need to be consistent with the node's publish and subscribe topic.

You can also select an MQTT QoS level. We use MQTT QoS level 0 (At most once) by default;

image-20241126181024-4.png

3.11.1.2 Add credentials to the MQTT integration

Click on the MQTT integration you just created.

image-20241126181837-5.png

Click the edit icon in the upper right corner to enter the edit mode.

image-20241126184523-13.png

Add credential files.

Click this link to download the certificates.

image-20241126183032-8.png

When the addition is complete, save the Settings.

image-20241126184303-12.png

image-20241126184211-11.png

First, you need to download the MQTT uplink/downlink JS code.

  • Uplink Converter

The purpose of the decoder function is to parse the incoming data and metadata to a format that ThingsBoard can consume.

Go to the Integrations center ->Data converters page, and find that MQTT uplink converter that was newly created when the integration was created.

image-20241126184906-14.png

Enter edit mode and apply MQTT uplink JS code to this uplink converter.

image-20241126190131-15.png

  • Downlink Converter

Go to the Integrations center ->Data converters page, and find that MQTT downlink converter that was newly created when the integration was created.

image-20241126190251-16.png

Enter edit mode and apply MQTT downlink JS code to this downlink converter.

image-20241126190737-17.png

3.11.2 Simulate with MQTT.fx

image-20241126191118-18.png

image-20241126193252-25.png

3.11.3 Configure -KS & KN node

First you need to configure the certificate to the -NB node. Follow the instructions in this link to configure the certificate.

Screenshot of successful certificate configuration:

  • Configuring the CA Certificate

image-20241126192009-19.png

image-20241126192130-21.png

  • Configure client certificate

image-20241126192246-22.png

image-20241126192315-23.png

  • Configure client private key

image-20241126192415-24.png

When the certificate is configured, burn the boot program, burn the working firmware, and then restart the device.

Then configure the -KS & KN node to connect to the ThingsEye platform:

AT Commands

  • AT+PRO=3,5 // Use MQTT Connection & Json Payload
  • AT+SERVADDR=lns1.thingseye.io,8883
  • AT+SUBTOPIC=8899// Consistent with the Topic of MQTT integration created by ThingsEye
  • AT+PUBTOPIC=8899// Consistent with the Topic of MQTT integration created by ThingsEye
  • AT+CLIENT=NULL
  • AT+UNAME=NULL
  • AT+PWD=NULL
  • AT+TLSMOD=1,2

Test Uplink by click the button for 1~3 seconds, the MQTT integration in ThingsEye allows you to view the data upstream from the device:

image-20241126193458-26.png

image-20241126193609-27.png

Go to "Device" -> "Search Device", enter the IMEI of the device to find the device.

image-20241126194018-28.png

You can view the data that has just been uplink on the device:

image-20241126194123-29.png

3.12 ThingsEye (via UDP)

3.12.1 Configure ThingsEye

Note:

1. Since platform configuration involves port data forwarding, it will be handled by platform technicians.

2. Users only need to configure their NB devices and provide the NB device's “IMEI” to the platform technicians for port data forwarding to the corresponding user account.

3.12.2 Device Configuration

AT Commands

  • AT+PRO=2,5 // Use UDP Connection & Json Payload
  • AT+SERVADDR=server1.thingseye.io,11560// Configure the UDP server domain name and port

Click the button for 1–3 seconds to test the uplink. ThingsEye's UDP integration feature allows you to view your device's upstream data.

Note: Requires enabling the Debug Receive Data function within the UDP integration feature, which is disabled by default.

Select the corresponding UDP integration -> Click to enter the UDP integration configuration interface -> Click the button in the upper-right corner to enter edit mode -> Click "Debug mode" -> Open "All messages (15 min)" -> Click "Apply" to save

:

1770620209466-152.png

Test Uplink by click the button for 1~3 seconds, the UDP integration in ThingsEye allows you to view the data upstream from the device:

1770620792503-423.png

1770620762078-727.png

Go to "Device" -> "Search Device", enter the IMEI of the device to find the device.

1770620867087-886.png

You can view the data that has just been uplink on the device:

1770620923699-644.png

4.1 MQTT (via MQTT.fx)

Configure MQTT connections properly and send downlink commands to configure nodes through the Publish function of MQTT.fx.

1. Configure node MQTT connection (via MQTT.fx): AT command:

  • AT+PRO=3,0 or 3,5 // hex format or json format
  • AT+SUBTOPIC=User Defined
  • AT+PUBTOPIC=User Defined
  • AT+UNAME= or User Defined
  • AT+PWD= or User Defined
  • AT+SERVADDR=8.217.91.207,1883 // to set MQTT server address and port

Note: To uplink and downlink via MQTT.fx, we need set the publish topic and subscribe topic different, for example: AT+SUBTOPIC=SE01_SUB & AT+PUBTOPIC=SE01_PUB.

image-20240820112732-52.png

image-20240820112758-53.png

2. When the node uplink packets, we can observe the data in MQTT.fx.

image-20240820112813-54.png

3. The downlink command can be successfully sent only when the downlink port is open.

The downlink port is opened for about 3 seconds after uplink packets are sent.

Therefore, when we see the node uplink packets in the Subscribe window, we need to immediately switch to the publish window to publish the hex format command.

image-20240820112824-55.png

image-20240820112835-56.png

Note: Users can edit the hex command in advance. When the node uplink, directly click the publish button several times to increase the success rate of command configuration.

4.2 UDP (via Thingseye)

Note: The UDP service on the ThingsEye platform needs to be built by the user. (Description Link:UDP service building instructions)

After the node is successfully connected to the platform, you need to select the corresponding node (you can refer to the node's IMEI to find it)

image-20240820141843-2.png

After clicking Show Node Details Page, Select Properties --- select Shared Properties --- click Add Properties

image-20240820143316-3.png

After clicking Add Shared Attribute, set the key to value, and write the command that needs to be downlinked in the Downlink Command Input box (Note: Downlinks can only be downlinked in string format, otherwise the node will not recognize the downlink command.)

image-20240820143820-4.png

After the command is successfully added, the platform will send the command down on the node's next uplink.

image-20240820144913-6.png

image-20240820145133-7.png

Upon successful issuance, the platform automatically eliminates the attributes from the queue and waits for the next addition of new attributes

image-20240820145309-8.png

5. FAQ

The NB series has the feature for Multi Sampling and one uplink. See one of them

/docs/NB-IoT/rs485-sdi-12-sensor-nodes/sn50v3-nb/#25-multi-samplings-and-one-uplink

User can use this feature for below purpose:

  1. Reduce power consumption. The NB-IoT transmit power is much more higher than the sensor sampling power. To save battery life, we can sampling often and send in one uplink.
  2. Give more sampling data points.
  3. Increase reliable in transmission. For example. If user set
  • AT+TR=1800 // The unit is seconds, and the default is to record data once every 1800 seconds (30 minutes, the minimum can be set to 180 seconds)
  • AT+NOUD=24 // The device uploads 24 sets of recorded data by default. Up to 32 sets of record data can be uploaded.
  • AT+TDC=7200 // Uplink every 2 hours.
  • this will mean each uplink will actually include the 6 uplink data (24 set data which cover 12 hours). So if device doesn't lost 6 continue data. There will not data lost.

The json format in uplink packet is not standard Json format. Below is the example. This is to make the payload as short as possible, due to NB-IoT transmit limition, a standard Json is not able to include 32 sets of sensors data with timestamp.

The firmware version released after 2024, Mar will use change back to use Json format. Detail please check changelog.

image-20240820112848-57.png

6. Trouble Shooting:

6.1 Checklist for debuging Network Connection issue. Signal Strenght:99 issue.

There are many different providers provide NB-IoT service in the world. They might use different band, different APN & different operator configuration. Which makes connection to NB-IoT network is complicate.

If end device successfully attached NB-IoT Network, User can normally see the signal strengh as below (between 0~31)

image-20240820112859-58.png

If fail to attach network, it will shows signal 99. as below:

image-20240820112908-59.png

When see this issue, below are the checklist:

  • Does your SIM card support NB-IoT network? If SIM card doesn't not specify support NB-IoT clearly, normally it doesn't support. You need to confirm with your operator.
  • Do you configure the correct APN? Check here for APN settings.
  • Do you lock the frequency band? This is the most case we see. Explain and Instruction.
  • Check if the device is attached to Carrier network but reject. (need to check with operator).
  • Check if the antenna is connected firmly.

If you have check all above and still fail. please send console log files (as many as possible) to support@dragino.com so we can check.

6.2 Why sometime the AT Command is slow in reponse?

When the MCU is communicating with the NB-IoT module, the MCU response of AT Command will become slower, it might takes several seconds to response.

image-20240820113015-60.png

Firstly, it is recommended that users upgrade the firmware of the -KS node to the latest version, as the processing method for downlink commands varies depending on the firmware version. Below, we will introduce the latest downlink command format.

UDP Protocol:

Only supports valid HEX-format downlink commands corresponding to AT command.

Take the AT+TDC command of S31-KS as an example, that is, only the valid HEX format downstream command corresponding to the AT+TDC command can be used:

Downward format: 01000384 // There are no Spaces. 0x0384(H)=900(D), that is, modify TDC to 900 seconds.

1750039871468-460.png

MQTT Protocol:

1. HEX-format

Supports HEX-format downlink commands (corresponding to AT commands).

Example: For the S31-KS's uplink interval modification (AT+TDC=900):

Downlink command: 01000384 // There are no Spaces. 0x0384(H)=900(D), that is, modify TDC to 900 seconds.

1750035004731-376.png

2. JSON-format
2.1 JSON format template.

All -KS nodes support downlink configuration modification using JSON format templates.

We can use templates to configure multiple commands AT once. Users only need to modify the parameters of the required AT commands in the correct template for each device.

Template.

Take the template of DDS75-KS as an example:

{
"AT+SERVADDR": "119.91.62.30,1882",
"AT+CLIENT": "JwcXKjQBNhQ2JykDDAA5Ahs",
"AT+UNAME": "usenamedragino",
"AT+PWD": "passworddragino",
"AT+PUBTOPIC": "123",
"AT+SUBTOPIC": "321",
"AT+TDC": "7200",
"AT+INTMOD": "0",
"AT+APN": "NULL",
"AT+5VT": "0",
"AT+PRO": "3,5",
"AT+TR": "15",
"AT+NOUD": "8",
"AT+CSQTIME": "5",
"AT+GDNS": "0",
"AT+TLSMOD": "0,0",
"AT+MQOS": "0",
"AT+IPTYPE": "0",
"AT+GTDC": "0",
"AT+GNSST": "10",
"AT+GPS": "0"
}

Explanations of two special commands in the template: AT+TR (set the detection interval: 0 ~ 255 minutes) and AT+NOUD (set the number of groups) correspond to parameters in AT+CLOCKLOG.

1751538862245-924.png

Instructions for Using the Template:

  1. Modify the parameters for each AT command in the template as needed.
  2. Send the entire template in one downlink command.

Note:

  • The template may vary depending on the device model.
  • Currently, each specific template is being updated and tested. If you need a template for your specific device, please contact Dragino Technical Support at support@dragino.com to request the latest downlink template.
2.2 Support sending json format commands separately

Some models of nodes support sending json format commands separately: RS485-KS, LDS25-KS, CS01-KS, SDI-12-KS, SW3L-KS, WL03A-KS, PS-KS

Example: For the PS-KS's uplink interval modification (AT+TDC=900):

Downlink command: {AT+TDC=900} // The correct format is {AT Command}. No extra characters other than valid AT commands can be added within {}.

Note:

1. Only when the correct and valid download command is used and the format is correct can the device be configured through the download command. Invalid download content cannot be processed by the device and will be automatically restarted.

2. Devices designed with downlink commands can utilize different downlink formats (e.g., JSON or HEX) for configuration. However, regardless of the format, the functionality is strictly limited to the downlink command specifications described in the user manual's AT command explanation.

For example, the HEX-format downlink command corresponding to AT+TDC can only be used to configure TDC and cannot be used for queries. There is no HEX-format downlink command equivalent to AT+TDC=? , so querying TDC via downlink is not supported.

6.4 What if the signal is good but the domain name resolution fails?

If the domain name resolution fails, first check whether the domain name is correct, users can use their own website domain name resolution tool to verify the domain name.

image-20240827150705-6.png

If the domain name is correct, but the domain name cannot be resolved, the user can turn off the domain name resolution function(AT+GDNS=1) and use the domain name communication directly.

  • Set the DNS

AT Command: AT+GDNS

AT+GDNS=0 // Default. Automatically resolves the domain name and uses the resolved IP to communicate.

AT+GDNS=1 // Disabling Domain name resolution. Use the domain name directly to communicate.

Note: For -KS products, with the exception of AT+PRO=2,5, all protocols and payload formats support direct domain communication.

Example:

image-20240827150121-5.png

image-20240827145055-4.png

6.5 KS device configuration TCP/IP failed

image-20250113103816-1.png

Use AT+IPTYPE=? to check the IPTYPE configuration.

AT+IPTYPE can only be configured as 1 or 2.

If it is configured otherwise, this error will occur.

6.6 How to get the debug log for further analyze?

EG800-NGFF model use the same debug instruction as NB model. Please check this link:

How to Get Full Log?

8. NB-IoT Stack Changelog

To be updated