NB-IoT Narrowband Internet of Things Technology Project Development Tutorial-Device Side Development (3)

Device-side hardware architecture:

                    MCU --------- Serial port ------------ NB module

The MCU is selected according to the needs. Here we take the STM32L series as an example

For the NB module, Shanghai Moves Far Away, BC95 / 35 as an example

                 The mcu communicates with the NB module through the serial port to implement the command issuance and obtain the command return value

The current instruction of the NB module is the AT instruction. Here we will introduce the AT instruction:

AT stands for Attention. The AT command set is sent from the terminal equipment (TE) or data terminal equipment (DTE) to the terminal adapter (TA) or data circuit terminal equipment (DCE). Through TA and TE, AT commands are sent to control the functions of mobile stations (MSs) and interact with GSM network services.

Advantages of AT.

The commands are simple and easy to understand, and the standard serial port is used to send and receive AT commands, which greatly simplifies the control of the device and converts it into a simple serial port programming.

AT commands provide a set of standard hardware interfaces-serial ports. This simplified hardware design. Newer telecommunications network modules almost all use serial hardware interfaces.

The AT command function is more complete, you can complete the control of the device through a set of commands, complete the call, SMS, phone book, data services, fax.

AT command notes

  1. Automatically ignore spaces when entering commands
  2. When entering a command, it must end with a carriage return, or a carriage return + line feed
  3. When outputting commands, each line ends with a carriage return + line feed by default, so the characters at the end of WIN display normally, and LINUX and MAC are abnormal
  4. After the module is powered on, after outputting the string  \ r \ nNeul \ r \ nOK \ r \ n   , it indicates that the AT command is ready for processing
  5. When inputting multiple commands in a single line, you can use the; character to separate them, just add AT at the beginning of the line, and do not add AT after the character
  6. When the AT command processing module processes a line of instructions, it will issue OK / ERROR to indicate that it is ready to process the next line

AT command syntax

Test command

AT+<cmd>=?

Test use

Read command

AT+<cmd>? 

 

Setting instructions

AT+<cmd>=p1[,p2[,p3[.....]]]

 

Execute instruction

AT+<cmd>

 

In the early stage of development, you can use computer serial port tools, such as SSCOM, to configure the NB module to perform network and function verification tests.

 

Like the picture above, add commonly used instructions to the expansion bar to facilitate debugging.

The next article first introduces how to use the AT command to add the NB module to the operator's network.

 

Published 5 original articles · Like1 · Visits 169

Guess you like

Origin blog.csdn.net/weixin_41472344/article/details/105562638