DIY 2400 RX Programming Process

ELRS 2.4G Receiver Configuration

SCM( Single Chip Micyoco): ESP8285

 RFIC chip: SX1280

Frequency Bands: 2.4G

Programming Tool: USB to TTL Serial Port Tools

Tool Chip: CH341

一· Programming

1. Correctly connect to the USB to TTL serial port tool, RX of the receiver--TX of the tool, TX of the receiver--RX of the tool, 5V--5V GND--GND.

2. Download VS code and install the Platform extension package in VS code (the installation process may take a while, please be patient).

 

 After the installation is complete, an icon of the extension will appear on the left taskbar.

3. After the installation is complete, open the firmware package, take version 1.0.0 as an example (path C:\Desktop\ExpressLRS-1.0.0\src), click the Platform icon in PROJECT TASK

Find "DIY-2400-RX-ESP8285 SX1280- via_UART", select "Build" to compile the firmware file.

In the end, the Status shows the green word SUCCESS  is a success, regardless of the yellow word reminder that may appear in front.

4. Set the GPIO0 port (pin 15) of the SCM to a low GPIO, and set the GPIO2 port (pin 14) to a high GPIO, that is, the ESP8285 enters the UART download mode.

ESP8285 enter the different modes GPIO are as follows:

5. Keep the GPIO0 port at a low GPIO and the GPIO2 port at a high GPIO, and then insert the USB serial port tool into the computer, (take WIN10 as an example) then right-click, at this time, right-click My Computer-Management-Device Manager in the "Ports (COM and LPT)" should have an additional "communication port (COM digital)", the indicator light is always on before the program is flashed.

6. Go back to VS code and continue to click "Upload", it will automatically search and connect to the new serial port, this time it is COM6.

In the process of brushing, If the yellow font appears don't worry about it, as long as it is green SUCCESS in the end, it will be successful. Power off and power on again, the indicator light will flash after 2 seconds, if the connection with the remote control ELRS protocol is successful, it will be always on.

Problems you may encounter during the installation of Platform:

The problem encountered when installing the Platform extension package is related to Python, because Platform requires the Python variable environment to be installed in its own directory for successful installation.

 

The solution is:

(1) Delete the folder directly

    C:\Users\用户名\.platformio

    C:\Users\用户名\.vscode\extensions\platformio.platformio-ide-版本号

(2)Cancel Python environment variables

If Python is installed in the system, temporarily cancel the environment variable.

How to verify whether the environment variable exists?

Run a new CMD, enter python If the prompt "is not an internal or external command" means that there are no environment variables.(If win10 does not set the environment, entering Python will automatically open the app store)

There is a python environment variable, which is an important reason for the failure of installing platformio, so it must be canceled here, even if it is temporarily canceled, it can be added back afterwards.

(3) Reinstall the Platform, and you will be prompted to restart after the installation is successful.

 (4) If the installation still fails, a warning box for the Python environment problem will pop up in the lower right corner (the prompt in the lower right corner, do not click any button, and do not close VS code.) Then go to the Python official website to download the Python IDLE installation package.

(5) Open the installation package, the two options at the bottom of the window must be checked and then select Customize Installation

Check all the options below, click "Next", the next option is the default option to start the installation. If the installation fails, repair and try to install it several times until the installation is successful.

(6) After successfully installing Python IDLE, open the Python IDLE installation package again, and select Uninstall to clean the residue of the original Python environment. If the direct uninstall fails, you can only click Install to overwrite some registry settings, and then uninstall is to remove the Some residual files in the registry are cleaned up.

Even if you install the same Python version as the official package. Platform does not recognize it, it has to be installed and decompressed to its own environment directory, so it must be uninstalled, otherwise even if you installed Platform at that time, it will still not work.

(7) After uninstalling Python, click Retry (Try agent..) in the 4 buttons where the VS code plugin Platform installation error is reported, and it will be completed after a period of time.

Problems that may be encountered in the process of programming:

1. If the TX and RX lines of the receiver are not connected correctly, or the ESP8285 is plugged into the computer when it is not in the UART download mode, the following error will appear:

                        serial port not found error

Looking for upload port...

Error: Please specify `upload_port` for environment or use global `--upload-port` option.

For some development platforms it can be a USB flash drive (i.e. /media/<user>/<device name>)

*** [upload] Explicit exit, status 1

Then check the computer's device manager to see if a new COM port appears. Solutions please read the step 1 and step 5.

On power-up in UART download mode, but disconnected before completing the flash, or without entering UART download mode, a port connection timeout occurs:

Auto-detected: COM6

Uploading .pio\build\DIY_2400_RX_ESP8285_SX1280_via_UART\firmware.bin

esptool.py v3.0

Serial port COM6

Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header

*** [upload] Error 2