Quick Start

Hardware preparation

  • A Windows computer, recommended for the 'Win10' system.
  • A TypeC data cable
  • A SIM card
  • One EG91X Evaluation Board
  • A CP2102 module
  • One antenna

Environment construction

硬件连接

按照下图进行硬件连接:

  1. Insert SIM card
  2. Connect the antenna to the antenna connector marked with the word 'LTE'.
  3. Connect the serial port of the EG912U development board to the CP2102 module.
  4. Connect the CP2102 module to the computer
  5. Connect the EG912U development board with a Type-C data cable

Equipment development

Power on

完成硬件连接的工作后,长按开发板上标识为PWk的按键,直到网络灯net闪烁,或电脑设备管理器的端口列表中出现包含Quectel USB 字样的 COM 口,表示开机成功。(EG91X系列C1-P02开发板上电自动开机)

Download firmware

Refer to this chapter Burn firmware package QPy_OCPU_SETA0002REG912U_GLAA_FW. zip To EG912U module development board.

脚本导入与运行

  1. Configure the specific parameters of the TCP server and UART used in dev.json
  1. Refer to this chapter To transfer files between modules, import all files from the code folder in the source code directory into the module file system, as shown in the following figure:
  1. Refer to this chapter, execute the main program file demo.py

  2. Refer to this chapter, stop program running

Debugging

Program startup

After executing demo.py, the program will start various service modules and connect to the configured TCP server

Upload data from the electricity meter

Here, the serial port assistant is used to send information to simulate electricity meter uploading data. The serial port assistant sends a hexadecimal RFC1662 message with the content "Hello, I am Meter".

🚩 Warning
The information sent needs to be in the message format specified in the RFC1662 protocol in the code!

For example, it is necessary to send "Hello I am Meter!", assemble it into a message format, and represent it in hexadecimal as:

7E FF 03 00 21 00 12 BF 48 65 6C 6C 6F 20 49 20 61 6D 20 4D 65 74 65 72 21 9C 1F 7E

Then send it to the module in hexadecimal format through the serial assistant

After receiving the RFC1662 message from the electricity meter, the module will first parse it and then send it to the TCP server:

The TCP server received a message from the electricity meter:

The TCP server sends a message "Hello, I am TCP_Server!" to the module. After receiving the message, the module will first perform RFC1662 protocol packaging on the message and then send it to the electricity meter

🚩 Warning

The phenomenon of garbled characters appearing before and after the information in the figure is not actually garbled, but rather because the module sent a complete RFC1662 protocol packet,
And the serial assistant does not have the ability to unpack, so this is a normal phenomenon