This topic describes common issues and frequently asked questions (FAQs) that may arise during development with NB-IoT modules.
How do I bind an NB-IoT module?
-
Before binding a module, make sure it has a minimal system circuit connected. The module has a stable power supply, excellent antenna performance, and an NB-IoT card installed.
-
The module is inactive until the initial setup is complete. You must connect it to the internet before activating it for normal use. Here is how the activation process works:
- After power on, the module communicates with the MCU.
- The module sends the command
0x01
to the MCU to request product information.
- The MCU responds to the product information query.
- The module gets the product information and uploads it to the cloud for activation.
- The module returns network status
0x03
, indicating it is registered to the carrier but not bound with the cloud.
- Scan the module’s short code label using the Tuya Smart app for binding.
-
Bind the device using the Tuya Smart app. For more information, see Use Smart Life App.
The short code label attached to the device packaging uniquely identifies Tuya’s NB-IoT modules. You need to use Tuya’s label printing tool to create labels. Contact the Tuya team for more information. During the development phase, you can manually enter the module’s IMEI for binding.
- After binding with the app, the device must interact with the Tuya platform before synchronizing the binding information. The device can proactively report a piece of data to start exchanging information with the Tuya platform. The module will send the bound status to the MCU on successful synchronization.
- Once a module is bound, it must be removed from the mobile app before it can be bound with another user. Alternatively, the MCU instructs the module to reset locally for unbinding.
How does the module report data?
- PSM-type modules must exit the PSM mode before reporting data. The MCU can wake up the module by pulling down
PSM_EINT
for over five milliseconds (actual time may vary), then report real-time data via 0x05
or record-type data via 0x08
(recommended).
- DRX-type modules can respond to MCU’s reporting commands in real time.
- If the module is unbound, it will filter out and not upload reported data to the cloud. The MCU will receive a reporting failure message from the module.
- For more information about the commands
0x05
and 0x08
, see the serial protocol.
Where can I access the data exchange logs between the module and the cloud?
- Visit the Tuya Operation Platform to search for logs of paired modules using the device ID or IMEI.
- Enter the device ID or IMEI and click Filter to search logs.
What should I consider when reporting multiple DPs?
- The module can report multiple DPs in a single request. See the serial protocol for the data format. A data frame cannot exceed 255 bytes.
- When reporting more than two DPs, it is recommended to do so in one go to save time and power.
Why can’t the module receive the downstream data?
PSM-type modules do not receive downstream data while in deep sleep mode. They only receive cached downstream data from the Tuya cloud when they proactively send upstream data.
- If the module does not respond to commands from the app panel, it may be in PSM mode, which disables peripherals like RF reception. The module must proactively report data to the cloud to receive the cached data. If there are multiple cached commands from the same DP, only the most recent one will be sent to the module.
- When the heartbeat interval is reached, the module will automatically communicate with the cloud and receive the cached data.
- If the device goes offline, all cached commands will be cleared.
Can the module receive and process data from the app in real time?
- Yes, it can. Configure the module to DRX mode and use a SIM card with DRX service. Additionally, set the product to DRX mode.
- In DRX mode, the module will not enter PSM mode, allowing it to receive data in real time.
- In PSM mode, the module cannot receive real-time data due to NB-IoT characteristics.
How do I unbind a module?
- After the user removes a device from the mobile app, the device can then be bound with another account.
- After the user moves a device locally, the module’s network status remains bound in the cloud. Therefore, it must communicate with the Tuya cloud to synchronize its current status.
The module can proactively communicate with the cloud to synchronize its current binding status. Then, its status will change from bound to unbound (recommended).
How do I use the reset command?
The reset command restores factory settings. The MCU directs the module to clear any unsent data and then unbind.
When do I use the power saving lock?
Once the power saving lock is enabled, the module will disable the PSM feature and stay active. The module will not enter low power mode and can respond to MCU commands in real time.
- When the PSM-type module receives a large amount of data from the MCU upon waking up, the interval between data packets will be extended. To prevent the module from entering low power mode before completing data transmission, you can enable the power saving lock when the module wakes up and disable it after sending all data.
- DRX-type modules automatically enable the power saving lock.
When does the device show offline on the mobile app?
A device is declared offline if it fails to report data for more than three heartbeat cycles. Before that, the device shows online.
What should I consider when setting the module’s heartbeat interval?
- This heartbeat defines how frequently the module communicates with the platform. The default heartbeat interval is every eight hours, with a minimum of two minutes (120 seconds) and a maximum of one week (604,800 seconds). If you set the heartbeat interval to 0 or more than one week, it will default to one week. If you set it to a value greater than 0 but less than 120 seconds, it will default to 120 seconds.
- This heartbeat keeps the device online. Each heartbeat communication consumes around 96 bytes of data. To prevent data loss from frequent heartbeat reporting, you can adjust the interval to be longer.
- When the network is poor, the module will either enter deep sleep (PSM mode) or restart (DRX mode) to resolve network issues after a failed data transmission. After entering deep sleep, the module will wake up in the next heartbeat cycle or can be woken up by the MCU pulling down
PSM_eINT
.
How long does it take for the module to enter PSM mode after waking up?
After waking up, the module will enter low power mode after at least 20 seconds. This depends on the signal strength and the APN type of the SIM card.
After the NB-IoT device finishes uploading data, the wireless base station initiates an inactivity timer that defaults to 20 seconds. If the NB-IoT device does not send or receive data within the timer period, the base station will disconnect the NB-IoT wireless connection. The user session on the core network and the module’s IP address will be retained. The NB-IoT device will then enter the idle state and initiate an active timer. When the active timer expires, the NB-IoT device enters PSM mode.
Can I adjust the duration before the module enters PSM?
- This setting cannot be altered as the chip manufacturer specifies a 20-second duration to maintain network stability. Standard NB-IoT modules are usually set at approximately 20 seconds, determined by the core network and module firmware.
- You can customize the firmware to shorten the duration, but this may lead to incomplete data transmission. This applies to NB-IoT devices that do not receive downstream data. Consult your project manager for details.
What is the power consumption of the module?
Status |
Power consumption |
Test result |
PSM |
2 μA |
1.7 μA |
eDRX idle |
2 μA to 2 mA |
1 mA |
DRX idle |
1 to 4 mA |
1 mA |
Connected |
Transmit: 200 mA. Receive: 65 mA. |
Transmit: 189 mA. Receive: 161 mA. |
How to choose the right SIM card?
- Tuya’s NB-IoT module supports China Telecom and China Mobile. China Telecom is recommended for its extensive coverage across China.
- When purchasing NB-IoT cards from the carrier, confirm the APN support for PSM or DRX. You can also buy the card from Tuya. Consult your project manager for pricing.
What services does the module cover?
Tuya’s NB-IoT modules are categorized into PSM and DRX types, each using different logic. Before purchasing the module, confirm the service type of your product.
- PSM-type modules enter PSM mode to reduce power consumption. They are commonly used in battery-powered devices, have fixed reporting types, and cannot respond to commands in real time.
- DRX-type modules do not enter low power mode and can respond to data transmission in real time, making them ideal for devices that need real-time control and are not sensitive to power consumption.
How do I set the module to run in DRX mode?
- Use an IoT SIM card that supports DRX type.
- Create a DRX-type product on the Tuya Developer Platform.
- Set the module firmware to DRX mode.
Which module is suitable for global use?
Tuya’s NM1-GL module supports global use.
Does the NB-IoT module support positioning?
Tuya’s module supports the Release 14 standard. The carrier currently does not support the positioning feature.