# QConn\_Eflash
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
## Overview
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
This section mainly introduces the factory production process, using
QConn\_Eflash to prepare the environment for command-line programming, parameter configuration,
programming log examples, and so on.
Programming steps:
- Connect module devices according to hardware connection
requirements
- Module chip starts from UART
- Modify the eflash\_loader\_cfg.ini configuration file as
required
- Send programming commands according to command-line parameter requirements
## Hardware connection
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
Programming board connection requirements:
- VDD\_OUT: 3.3V, connected to the chip/target board VCC power
supply
- GND: Connected to chip/target board GND
- UART\_TXD: Connected to the chip/target board RxD pin
- UART\_RXD: Connected to the chip/target board TxD pin
- UART\_RTS: Connected to the RST pin of the chip/target board, used to control the reset
of the chip
- UART\_DTR: Connected to the chip/target board boot pin, used to control the chip to boot
from UART
When the chip is powered on, the start-up mode is
determined based on the level of the boot pin. When the boot pin level is low, the chip boots
from Flash. When the boot pin level is high, the chip boots from UART and enter the
programming mode. The tool can communicate with the chip through UART to complete the
programming process. According to this, the command-line programming tool will automatically
control the UART's DTR and RTS pins before starting the programming process (first control DTR
to pull the chip's boot pin level high, and then control RTS to reset the chip). Control the
chip to enter the programming mode, thereby realizing automatic chip programming.
## Preparation for program file
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
The files to be programmed are generally generated by developers through the programming
tool during the development process. The programming tool generates two programming files,
whole\_flash\_data.bin and whole\_img.pack.
whole\_flash\_data.bin is a binary file that arranges all image-related files to be
programmed according to the partition table. It is consistent with the data layout in Flash.
The composition of whole\_flash\_data.bin is as shown in the figure:
Figure : whole\_flash\_data.bin

As can be seen from the figure, whole\_flash\_data.bin contains all bin files to be
programmed, and are arranged according to the location of the partition table. However, this
file is relatively large because it contains padding between different firmware. This file can
be programmed directly to the starting address of Flash using a Flash programmer or
command-line programming tool. The disadvantage is that the programming time is long.
whole\_img.pack is a compressed file. It converts the files to be
programmed in the programming tool directory into a compressed
package. The composition of the compressed package is as shown in
the figure below:
Figure : whole\_img.pack

When using the command-line programming tool to choose
to program whole\_img.pack, the user can decompress the compressed package to the corresponding
chip directory under the command-line programming tool directory, and then call the command of
the command-line tool. For the specific calling method, refer to the subsequent sections.
## Configuration file description
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
The serial port number used for programming, programming speed, programming file,
programming address and other parameters can be set in the configuration file in the
eflash\_loader directory of the corresponding chip model. The configuration file name is
eflash\_loader\_cfg.ini. Some configuration parameters of the configuration file are described
as follows:
`[LOAD_CFG]`
- `interface`: Choose to program using uart.
- `device`: Specify the uart com port.
- `speed_uart_load`: Configure the uart baud rate during programming.
- `chiptype`: Select the chip model to use. Currently, the tool supports
qcc743.
- `verify`: Select whether readback and programming verification is
required. If equal to 0, only SHA256 verification will be performed. If greater than 0, both
reading and SHA256 verification will be performed.
- `check_mac`: In the automatic programming mode, set the function of
repeated programming. Select true for repeated programming.
- `local_log`: Select whether to save the programming log to a file. If it
is equal to true, the programming log will be saved to the log folder
of the tool.
- `skip_mode`: When programming Flash, specify that the content of a
certain area in the Flash will not be overwritten.
- `boot2_isp_mode`: Specify whether to enable isp mode
- `isp_mode_speed`: Specify the serial port baud rate when triggering isp
programming in isp mode
- `isp_shakehand_timeout`: Specify the waiting timeout for triggering isp
programming in isp mode:
`[FLASH_CFG]`
- `file`: Specify the bin file to be programmed. Multiple files can be
specified. The files are separated by spaces.
- `address`: Specify the programming address on the flash corresponding to
the programming bin file, and separate the addresses with spaces.
Note: The above configuration items can be specified on the command line
using the corresponding command line parameters, and there is no need to modify the
configuration file. For other unexplained configuration items, use the default configuration
without making changes.
## Command parameters
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
When using command-line tools to program Flash or eFuse, the user can pass parameters
through the command line. The programming configuration parameters passed through the command
line can overwrite the parameters in the configuration file, achieving greater flexibility and
convenience.
Command format: QConn\_Eflash.exe + command-line parameters
Note:To execute commands, must follow the below steps:
1. Put the device in UART\_boot mode
2. Add chipname details in every command (for example:
`--chipname=qcc743`)
3. Add port details in every command (for example: `-p com18`)
The command-line parameter description:
- `-v`: Get the version number of the programming tool
- `-i/--interface`: Specify the programming interface, select UART for
programming
- `-e`: erase, specifies the erase flash command, generally used in
combination with `--flash`
- `-w`: write, specifies the programming command, generally used in
combination with `--flash`
- `-r`: read, specifies the read command, generally used in combination
with `--flash`
- `-p/--port`: Specify the UART COM port
- `-b/--baudrate`: Configure the UART baud rate during programming
- `--flash`: Specify read and write Flash
- `--efuse`: Specify read and write eFuse
- `--efusecheck`: Specify to verify the programming eFuse area when
programming eFuse. Verify whether the data to be programmed covers the existing data in the
eFuse area. If not, an error is reported and the programming will stop.
- `--efusefile`: Write efusefile to eFuse
- `--packet`: Import the programming file package
- `--ram`: Specify to load the application into the ram area and
automatically run the program
- `--chipid`: Get the ChipID. The obtained ChipID is printed out through
the tool log.
- `--start`: When erasing flash, specify the starting address of erasing
flash; when reading flash, specify the starting address of reading flash. The address is in
hexadecimal, and it is supported whether adding 0x or not.
- `--end`: When erasing flash, specify the end address of erasing flash;
when reading flash, specify the end address of reading flash. The address is in hexadecimal,
and it is supported whether adding 0x or not.
- `--file`: When reading flash, write the read data to the specified file,
used with the parameter `-r`
- `--mac`: Specify the read or write MAC address
- `--data`: Specify the eFuse value when writing eFuse
- `--addr`: Specify the eFuse address when writing eFuse
- `--mass`: Full wipe upgrade
- `--userarea`: Only upgrade user area firmware
- `--skip`: Specify to skip a certain flash area without programming. The
skip command must specify the starting address and length of the skipped flash area,
separated by commas. For example: `--skip=0x0,0x10000` means that the
starting address of the skipped flash area is 0x0 and the length is 0x10000
- `--chipname`: Select the chip model
- `--xtal`: Select the crystal oscillator type
- `--para`: Generate eFuse configuration data based on the
efuse\_bootheader/efuse\_bootheader\_cfg.ini file under the chip model
folder and program the data to eFuse
- `--romfs`: Program romfs data (when programming romfs, the same
programming task will not program the img firmware at the same time), specify the romfs data
to be programmed, and the programming address is `-- addr` specified
- `--publickey`: Specify the public key file for the ECC signature. The
tool calculates the hash value of the public key file and writes it to the corresponding
location of eFuse. At the same time, it writes eFuse to enable the signature function.
- `--privatekey`: Specify the private key file for the ECC signature. The tool
calculates the hash value of the public key file and write it to the corresponding location
of eFuse. At the same time, it writes eFuse to enable the signature function.
- `--csvaddr`: Specify the programming address of the bin file
- `--csvfile`: Specify the source file containing quintuple information
(`--csvfile` and `--csvaddr` commands are used in
combination. When the quintuple source file and programming address are correctly specified,
the tool extracts an unused quintuple information in the source file to generate a quintuple
programming file and automatically program it into the flash address specified by
`--csvaddr`. At the same time, it extracts the \*\* DeviceName\*\* value is
written into eFuse as the device MAC address)
- `--isp`: Use isp mode for programming. It should be noted that starting isp
mode requires the support of boot2. The flash contains boot2 to start isp programming.
- `--key`: User must enter the corresponding values in AES Key and AES IV
according to the AES encryption method, and write eFuse to enable the encryption
function.
- `--iv`: User must enter the corresponding values in AES Key and AES IV
according to the AES encryption method, and write eFuse to enable the encryption
function.
- `--auto_efuse_verify` : eFuse verification is performed by default. Adding
`--auto_efuse_verify` will not verify eFuse except for the first time when
programming eFuse and perform eFuse verification.
For specific usage methods, refer to the following examples:
To get information:
- `QConn_Eflash.exe --chipname=qcc743 -v`: Get the version number of the
programming tool
- `QConn_Eflash.exe --chipname=qcc743 --chipid`: Get the Chip ID of the
chip
Import the programming package:
- `QConn_Eflash.exe --chipname=qcc743
--packet=chips/qcc743/img_create_iot/whole_img.pack`: Import the programming file
package. The tool unpacks the specified whole\_img.pack file package into one or more files
to be programmed, and automatically modify the configuration file to allocate programming
files as needed. After the unpacking is successful, there is no need to specify the
programming file on the tool command line. The tool will automatically complete the
programming task based on the unpacking configuration.
Flash erase:
- `QConn_Eflash.exe -e --flash --end=0 --chipname=qcc743`: Full chip erase
operation, specify the chip model as qcc743, the serial port number used for programming,
the file and address to be programmed and other parameters, both specified in the
configuration file.
- `QConn_Eflash.exe -e --flash --start=0x10000 --end=0x11000
--chipname=qcc743`: Erase flash data from address 0x10000 to address 0x11000
Flash reading:
- `QConn_Eflash.exe -r --flash --start=0x0 --end=0x2000 --file=flash.bin
--chipname=qcc743 --port=com18`: Specify the chip model qcc743, read the flash
from data between address 0x0 and address 0x2000. A new flash.bin file will be created in
the root directory of the tool, and the read data are written to flash.bin
Flash programming:
- `QConn_Eflash.exe -w --flash --chipname=qcc743`: Program flash, specify the
chip model as qcc743. Parameters such as the serial port number used for programming, the
file and address to be programmed, are all specified in the configuration file.
- `QConn_Eflash.exe -w --flash --chipname=qcc743 --xtal=40m`: Program flash,
specify the chip model qcc743, the crystal oscillator type 40m, the serial port number used
for programming, the file and address to be programmed and other parameters are specified in
the configuration file.
- `QConn_Eflash.exe -w --flash --chipname=qcc743 --xtal=40m --port=com18
--baudrate=115200`: Program flash, specify the chip model qcc743, and the crystal
oscillator type 40m. At the same time, use UART com18 for programming. The UART baud rate is
115200 (ignore the device and speed\_uart\_load parameters in the configuration file. When
filling in the parameters, the parameters shall prevail. The default value in the
configuration file will not be updated accordingly). The programmed file with the address
specified in the configuration file.
- `QConn_Eflash.exe -w --flash --chipname=qcc743 -p com18 -b 115200 --isp`: To
program flash, user must have boot2 programmed in the flash at address 0, and specify the
chip model qcc743. At the same time, use UART com18 for programming, and the UART baud rate
is 115200 (ignore the device and speed\_uart\_load parameters in the configuration file. When
filling in the parameters, the parameters shall prevail. The default value in the
configuration file will not be updated accordingly). The file and address to be programmed
are specified in the configuration file, and Please Press Reset Key!
will be prompted during the programming process. At this time, the user must reset the chip
within 5 seconds. After the handshake is successful, qcc743 will prompt isp
ready, and then the programming is successful. If it is an automatically
programmed board, after prompting Please Press Reset Key!, the tool
will control the reset pin to automatically reset the chip, then shake hands and perform the
programming operation.
- `QConn_Eflash.exe -w --flash --chipname=qcc743 -p com18 -b 2000000
--mass=test_bin/whole_img.bin`: Specify the chip model qcc743. Erase and upgrade
the test\_bin/whole\_img.bin file in the tool root directory to the flash 0 address. The
serial port used is com18, and the baud rate is 2M
- `QConn_Eflash.exe -w --flash --chipname=qcc743 -p com18 -b 2000000
--userarea=test_bin/img.bin`: Specify the chip model qcc743. Upgrade the
test\_bin/img.bin file in the tool root directory to the active firmware address area. The
serial port used is com18, and the baud rate is 2M
- `QConn_Eflash.exe -w --flash --chipname=qcc743 -p com18 -b 2000000
--file=test_bin/whole_img.bin --addr=0x0 --skip=0x0,0x10000`: Specify chip model
qcc743. Program the test\_bin/whole\_img.bin file in the tool root directory to the flash 0
address, and ignore the data written to the flash 0x0 address with a length of 0x10000 (this
is generally done to protect the content of this area of the flash from being replaced). The
serial port used is com18, and the baud rate is 2M
- `QConn_Eflash.exe -w --flash --chipname=qcc743 -p com18 --xtal=40m --csvfile=demo.csv
--csvaddr=1c5000`: When programming the flash, program the triplet/quintuple at
the same time. Specify the csv source file, crystal oscillator type 40m, use UART com18 for
programming, and specify to program the bin file containing triplet/quintuple information to
the 0x1c5000 address
- `QConn_Eflash.exe -w --flash --chipname=qcc743 -p com18
--romfs=AABBCCDDEEFF00112233445566778899--addr=0x1e0000`: Program romfs. Specify
the chip model qcc743, the serial port used is com18. The romfs data is programmed to the
flash address 0x1e0000 through media.bin
eFuse programming:
- `QConn_Eflash.exe -w --flash --efuse --chipname=qcc743 -p com18 --para`:
Program eFuse at the same time as flash. Use UART com18 for programming. The eFuse data is
generated based on the efuse\_bootheader/efuse\_bootheader\_cfg.ini file in the chip model
folder, instead of using the existing efusedata.bin file in the efuse\_bootheader
directory.
- `QConn_Eflash.exe -w --efuse --chipname=qcc743 -p com18 -b 2000000
--mac=12345678abcd`: Program the MAC address. Specify the chip model qcc743,
specify the MAC address value to be programmed, and use UART com18 for programming. The UART
baud rate is 2000000 (ignore the device and speed\_uart\_load parameters in the configuration
file. When filling in the parameters, the parameters shall prevail. The default value in the
configuration file will not be updated accordingly)
- `QConn_Eflash.exe -w --efuse --chipname=qcc743 -p com18 -b 2000000 --data=12345678
--addr=108`: Program eFuse. Specify the chip model qcc743, specify the eFuse value
to be programmed and the address of the eFuse to be programmed, and use UART com18 for
programming. The UART baud rate is 2000000 (ignore the device and speed\_uart\_load parameters
in the configuration file. When filling in the parameters, the parameters shall prevail. The
default value in the configuration file will not be updated accordingly)
- `QConn_Eflash.exe -w --efuse --chipname=qcc743 -p com18 -b 2000000
--publickey=utils/pem/publickey_- uecc.pem`: Program eFuse. Specify the chip model
qcc743, and the tool will calculate the hash value of the specified public key file and
write it to the corresponding location of eFuse. At the same time, it writes eFuse to enable
the signature function.
- `QConn_Eflash.exe -w --efuse --chipname=qcc743 -p com18 -b 2000000
--key=1234567812345678123456 7812345678 --iv=12345678123456781234567800000000`:
Program eFuse. Specify the chip model qcc743, the tool writes the key to the corresponding
location of efsue, and also write eFuse to enable the encryption function.
- `QConn_Eflash.exe -w --efuse --chipname=qcc743 -p com18 -b 2000000
--key=12345678123456781234567 812345678 --iv=12345678123456781234567800000000 --auto_efuse
_verify`: Program eFuse. Specify the chip model qcc743, and the tool will write
the key to the corresponding location of eFsue, and also write eFuse to enable the
encryption function. If the chip is encrypted for the first time, eFuse is verified, and it
will not be verified later.
RAM area programming:
- `QConn_Eflash.exe -w --ram --chipname=qcc743 -p com18 -b 2000000
--file=img_if.bin`: Load the img\_if.bin application into the ram area of the chip,
and let the chip automatically jump to the application to run after the loading is
complete.
MAC address programming and reading:
- `QConn_Eflash.exe -w --efuse --chipname=qcc743 --mac=9658de05b918 -p com18 -b
2000000`: Write the mac address of the chip. Specify the chip model as qcc743, and
write the content of 9658de05b918 as the MAC address into the eFuse of the chip.
- `QConn_Eflash.exe -r --efuse --chipname=qcc743 --mac -p com18 -b 2000000`:
Read the mac address of the chip. Specify the chip model as qcc743, the read MAC address is
printed on the command-line terminal, and the read mac address will be saved to the
macaddr.txt file in the tool directory.
Note: The chip model must be specified, and the tool will automatically
find the eflash\_loader/eflash\_loader\_cfg.ini file in the corresponding chip model directory to
use as the configuration file. When the chip model and crystal oscillator type are specified
at the same time, the tool will automatically search for the programming auxiliary bin file
corresponding to the crystal oscillator type in the eflash\_loader directory of the
corresponding chip model.
## Program log
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
- Execute the command to start programming:
QConn_Eflash.exe -w --flash --chipname=qcc743Copy to clipboard
- After starting the programming, there will be the following log output:
Figure : Start programming log example

- After all files are successfully programmed and verified, the following log output will
appear:
Figure : Programming success log example

## Multi-device programming
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
### UDP daemon
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
When multiple devices need to be programmed at the same time, the programming tool
provides the function of supporting multiple devices to be programmed at the
same time. Among them, QConn\_Eflash\_server.exe serves as the UDP server,
receives the programming command from the UDP client and completes the
programming. QConn\_Eflash\_client.py as a UDP client, send programming
commands to the UDP server. For details, please refer to the UDP client demo
section.
First, open the UDP server and double-click QConn\_Eflash\_server.exe in the root directory
of the tool. The tool will open a new window for multi-task programming and
listen to UDP port 8080 by default. Then run the UDP client, open it through
the QConn\_Eflash\_client.py program, and then send the command line
programming command to UDP port 8080.
Note: The programming command only needs to send command line
parameters, and there is no need to add the prefix of
QConn\_Eflash.exe.
When user need to program uart com3 and com18 at the same time, start the UDP server
first. Then start two UDP clients and send the commands `-w --flash
-p com3 -b 115200` and `-w --flash -p com18 -b
115200` respectively. Both commands mean to program flash.
They specify uart com3 and com18 respectively, and the baud rate is 115200
for programming. The file and address to be programmed are specified in the
configuration file.
The log during the programming process of each task will be returned to the corresponding
UDP client by the programming tool. QConn\_Eflash\_server.exe essentially uses
the function of QConn\_Eflash.exe. The difference is that using
QConn\_Eflash.exe directly is to receive the programming command through the
command line. QConn\_Eflash\_server.exe will start a UDP server to receive
programming commands from UDP clients, and can receive programming commands
from multiple UDP clients to complete multi-device programming.
Note: When performing multi-task programming, the
`-p` option must be added to the command line
parameters to specify the device to be programmed. Otherwise, problems such
as device conflicts may occur when more than one device is programmed at the
same time.
### Encryption programming command
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
When sending the programming command to the programming tool through socket
communication, in some scenarios with high security requirements, the programming command
needs to be encrypted before being sent. Currently the tool supports AES-128 encryption and
supports ECDH key negotiation. ECDH elliptic curve uses P256R1. User can start
QConn\_Eflash\_server.exe on the command line and add parameters to the command line to specify
whether to enable socket encrypted communication and encryption keys.
The command line parameter description:
- `-p/--port`: Set the UDP listening port. If not specified, UDP listens to
port 8080 by default.
- `--echo`: Turn on programming log echo
- `--key`: Set the AES encryption key (when user need to decrypt the
programming command and the ECDH function is not enabled, user need to specify the AES
encryption key)
- `--ecdh`: Set to turn on the ECDH key negotiation function (when user need to
decrypt the programming command and enable the ECDH function, user need to set to turn on
ECDH, and user cannot set the AES encryption key)
Examples:
- `QConn_Eflash_server.exe`: Open the multi-tasking programming tool. UDP
listens to port 8080 by default and receives programming commands without encryption (in
this case without any command line parameters, user can also double-click to open
QConn\_Eflash\_server.exe without using the command line)
- `QConn_Eflash_server.exe -p 8080 --echo`: Open the multi-task programming
tool, UDP listens to port 8080, turns on echo, receives programming commands, and does not
encrypt
- `QConn_Eflash_server.exe -p 8080 --echo
--key=000102030405060708090a0b0c0d0e0f`: Open the multi-task programming tool. UDP
listens to port 8080, turns on the echo, receives the programming command, and uses the
corresponding key to decrypt and process the programming command.
- `QConn_Eflash_server.exe -p 8080 --echo --ecdh`: Open the multi-tasking
programming tool. UDP listens to port 8080, turns on echo, receives programming commands,
enables ECDH, and uses the key generated by key negotiation to decrypt and process the
programming commands.
Note: Only one of the two options `--key` and
`--ecdh` can be turned on at the same time. If key is set, there is no need
for ECDH to renegotiate the key. If ECDH is turned on, the key will be automatically generated
and there is no need to re-negotiate. Specify the key, otherwise conflicts will occur.
### ECDH key negotiation
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
When QConn\_Eflash\_server.exe enables the ECDH function, the tool needs to perform a round
of ECDH key negotiation first. After negotiating to obtain the key, it then uses the key to
decrypt the received programming command and execute the command. To adapt to the key
negotiation of QConn\_Eflash\_server.exe, the programming command sent by the user needs to
follow the communication negotiation protocol.
Here, QConn\_Eflash\_server.exe is called UDP Server, and the user is called UDP Client.
The negotiation protocol is as follows:
- The UDP Client randomly generates a private key d1, calculates the public key client
shared key, adds the prefix to the client shared key, and then passes csk: + client shared
key to the UDP Server via UDP.
- After receiving csk: + client shared key, UDP Server randomly generates a private key d2.
And calculate the public key server shared key, add ssk: prefix to the server shared key,
and then pass ssk: + server shared key to the UDP Client through UDP
- UDP Server calculates the server encrypt key based on the client
shared key and private key d2
- The UDP Client receives ssk: + server shared key, and calculates the client encrypt key
based on the server shared key and private key d1. client encrypt key == server encrypt key
should be established.
- The UDP Client uses the first 16 digits of the client encrypt key as the AES encryption
key, encrypts the programming command, and passes it to the UDP Server.
- UDP Server receives the encrypted programming command, uses the first 16 bits of the
server encrypt key as the AES decryption key, decrypts the encrypted programming command
into plain text, and executes the command
- The UDP Server passes the clear text of the log information of the execution of the
programming command to the UDP Client.
- After the UDP Server completes the programming task, it will return the programming result
to the UDP Client. Returning Finished with success indicates that the
programming was successful, and returning Finished with fail
indicates that the programming failed.
- After the programming is completed, when the UDP Client sends a programming command again,
or another UDP Client sends a programming command, the key negotiation must be done again.
After generating a new key, use the new key to encrypt the programming command and send
Figure : ECDH key negotiation

### UDP client demo
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
To facilitate docking and use of QConn\_Eflash\_server.exe, the command line programming
tool will also provide a python source code of UDP Client. The file name is
QConn\_Eflash\_client.py for reference. User can send the flash command directly in the standard
input of QConn\_Eflash\_client.py.
For QConn\_Eflash\_client.py, command line setting parameters are
also provided:
- `-p/--port`: Set the UDP sending port. If not specified, UDP sends data to
port 8080 by default.
- `--key`: Set the AES encryption key (when the programming command must be
encrypted and the ECDH function is not enabled, the AES encryption key must be specified).
Running the source code requires the support of the Cryptodome module
(pycryptodome==3.9.8)
- `--ecdh`: Set to turn on the ECDH key negotiation function (when the
programming command must be encrypted and the ECDH function is enabled, ECDH must be turned
on, and the AES encryption key cannot be set)
Examples:
- `python QConn_Eflash_client.py -p 8080`: Open the script, and the programming
command will be sent to UDP port 8080. The programming command is not encrypted.
- `python QConn_Eflash_client.py -p 8080
--key=000102030405060708090a0b0c0d0e0f`: Open the script, and the programming
command will be sent to the UDP 8080 port. The programming command is encrypted with the
corresponding key and sent.
- `python QConn_Eflash_client.py -p 8080 --ecdh`: Open the script, the
programming command will be sent to the UDP 8080 port, enable ECDH, the programming command
will be encrypted using the key generated by the key negotiation and then sent.
## Add CRC check of eFuse data
Source: [https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html](https://docs.qualcomm.com/doc/80-WL740-7/topic/qconn-eflash.html)
Use the following commands to import the encryption signature pack and program the Flash
and eFuse.
- `QConn_Eflash.exe --chipname=qcc743
--packet=QConn_Flash/chips/qcc743/img_create_iot/whole_img.pack`: Programming file
package
- `QConn_Eflash.exe -w --efuse --flash --chipname=qcc743 --port=com18
--baudrate=15200`: Execute the programming command. eFuse and Flash are programmed
at the same time
Last Published: Feb 05, 2025
[Previous Topic
QConn\_Production\_Tool](https://docs.qualcomm.com/bundle/publicresource/80-WL740-7/topics/qconn-production-tool.md)