UART Access for NB ST-BC660K-GL base model (for AT Commands, firmware upgrade)
Table of Contents:
- 1. NB ST-BC660K-GL base Hardware
- 2. Hardware Wiring for UART
- 3. UART for AT Commands
- 4. Firmware Upgrade
- 5. FAQ
1. NB ST-BC660K-GL base Hardware
Below hardware use NB ST -BC660K-GL module. They support UART Access for AT Command and Firmware Upgrade.
Models | Mother Board | UART Wiring | UART for Upgrade Firmware |
---|---|---|---|
PS-NB, PS-NB-NA, SDI12-NB | SIB | Instruction | Instruction |
SN50v3-NB, S31-NB, S31B-NB, D20-NB. D20S-NB, D21-NB, D22-NB, DS03A-NB, | SN50v3 | Instruction | Instruction |
RS485-NB, SE01-NB, SPH01-NB, LMS01-NB, LDS12-NB, LDS40-NB, DDS75-NB, DDS45-NB, DDS04-NB, DDS20-NB, MDS120-NB, MDS200-NB, WSC2-NB | RS485-BL | Instruction | Instruction |
2. Hardware Wiring for UART
2.1 SN50v3 base mother board
2.2 SIB mother board
2.3 RS485-BL base mother board
3. UART for AT Commands
Step1: Connect UART Interface & Set to Flash Mode
Step2: Use Serial Utility to connect
- 1. Use a general serial tool.
- 2. Set up serial tool with : BaudRate: 9600, databit:8, No parity, No flow control.
- 3. The AT Command Password is printed as AT PIN in the sticker on the giftbox.
Example:
4. Firmware Upgrade
4.1 Check Your device already has bootloader
4.1.1 Firmware Structure
The -NB/-NS firmware structure is as below:
4.1.2 What is Dragino Bootloader for NB-IoT Model?
Dragino NB Bootloader is a bootloader which support below features:
- OTA Update via BLE
- OTA Batch update configure via BLE (Not Finished)
All Dragino End Devices which support BLE module are shipped with the NB Bootloader.
4.1.3 How can i know if my device already have bootloader?
If a device has a bootloader. it will output bootloader info to UART when boot. As below:
4.1.4 How to upload bootloader to device?
If your is NB ST -BC660K-GL base hardware but doesn't have bootloader or The bootloader is erased by mistake. You can upload a bootloader to it. ( This instruction works no matter the device has bootloader or not)
Downlink Link for NB-IoT BLE bootloader.
Step1: download STM32 Cubeprogramer
Step2: Connect wires to Device's UART interface & Set Device to ISP mode
See UART Connection method for each device.
Step3: Use STM32 Cube to Connect Device
Step4: Choose NB Bootloader and Start Programming
Step5: Verify Programming
Step6: Switch Jumper from ISP to Flash mode
4.2 Update Firmware (Assume the device already have a bootloader)
Step1: Download STM32 Cubeprogramer
Step2: Connect wires to Device's UART interface & Set Device to ISP mode
See UART Connection method for each device.
Step3: Use STM32 Cube to Connect Device
Step4: Choose NB Bootloader and Start Programming
The firmware can be found on the Device Downlink Folder. Please use the firmware with .hex suffix.
Step5: Verify Programming
Step6: Switch Jumper from ISP to Flash mode
5. FAQ
5.1 What is the difference between .hex and .bin file?
When compile the firmware, there will be two files .hex and .bin. they are different:
- .bin : original firmware file. When use .bin file and update in STM32Cube, you need to specify the start address.
- .hex : file with control / meta info. When use .hex file and update in STM32Cube, you don't need to specify the start address. They are included in the file so hex file is bigger in size but actually firmware are the same