Firmware Update
Guide to update the firmware running on the Fencyboy sensor using a USB programmer.
Fencyboy v2.0.0
This guide explains how to update the firmware on a Fencyboy sensor unit using a USB-TTL converter and the serial firmware uploader web tool.
The update is normally completed in a few minutes per unit.
Required items
You will need:
Fencyboy sensor unit
USB-TTL converter with 3.3 V output and 3.3 V logic level. Do not use a 5 V USB-TTL converter, 5 V supply, or 5 V logic signals. The converter needs only RX and TX signals.
Jumper wires with female ends to connect to the Fencyboy
Computer with Windows, macOS, or Linux and standard web browser with WebSerial support.
The new
.binfirmware file for the Fencyboy unit (which can be requested from the manufacturer)
1. Disconnect other power sources
Before connecting the USB-TTL converter:
Disconnect the battery.
Cover or disconnect the solar panel.
Do not power the Fencyboy from the battery or solar panel during flashing.
The Fencyboy will be powered directly from the USB-TTL converter through the 3.3 V pin.
2. Connect the USB-TTL converter
Connect the USB-TTL converter to UART2 on the programming header of the Fencyboy.
Use the following wiring:
3V3
3V3
U2_RXI
TX (crossover with RX from Fencyboy)
U2_TXO
RX (crossover with TX from Fencyboy)
GND
GND
The RX and TX lines must be crossed: Fencyboy RX goes to USB-TTL TX, and Fencyboy TX goes to USB-TTL RX. Note that the label on your USB-TTL programmer might already be swapped to account for this crossover.

3. Web Serial Firmware Uploader
Open the Web Serial Firmware Uploader tool on the computer with the USB-TTL programmer connected.

Click on the "Select Serial Port" button and select the USB-TTL adapter, like "FT232R USB UART".

Click on the "Connect" button and you should see log messages appearing in the console below.
You may verify the connection now by sending "AT+VER=?" via the TX textbox and you should get a response like below.

4. The Firmware File
The firmware file has the .bin extension. You can get the file from the manufacturer.
Example:
The same firmware file can be uploaded onto multiple units because each unit has their LoRaWAN credentials like DevEUI and AppKey pre-configured and they can only be changed via AT-Commands.
Select this file on the website through "Choose File"

5. Upload the firmware
Having the firmware file selected and the Fencyboy connected you can click on the "Upload Firmware" button and watch the progress complete. This will take 1-2 minutes.

Thats it and you are done with the update. See Troubleshooting in case of errors.
7. Optional: Check the serial log after flashing
After the firmware update, the device should reboot automatically and try to join the LoRaWAN network.
You can monitor the serial output using the serial monitor shown on the website or any other tool.
Use the following serial settings:
A normal startup log should show the system booting, reading battery voltage, starting LoRaWAN, and attempting to join the network.
Example output:
8. Reconnect the unit
After the firmware update:
Disconnect the USB-TTL converter.
Start the unit as described in Getting Started
The device should now start normally and try to join the LoRaWAN network using the configured credentials.
Troubleshooting
Device does not power on
Make sure that:
3V3 from the USB-TTL converter is connected.
GND is connected.
The USB-TTL converter can provide 3.3 V power.
The battery and solar panel are disconnected or inactive during flashing.
Device flashes successfully but does not join the LoRaWAN network
Check that:
The correct firmware file was flashed.
The device was registered with the correct DevEUI and AppKey.
The firmware region and frequency plan match the network configuration.
The device has sufficient battery voltage after reconnecting the battery.
The serial log shows join attempts after reboot.
Please contact the manufacturer in case of further problems.
Fencyboy v1.3.1
This guide explains how to update the firmware on a Fencyboy sensor unit using a USB-TTL converter and the CubeCellFlash tool.
The update is normally completed in a few minutes per unit.
Required items
You will need:
Fencyboy sensor unit
USB-TTL converter with 3.3 V output and 3.3 V logic level. Do not use a 5 V USB-TTL converter, 5 V supply, or 5 V logic signals. The converter should optionally provide RTS and DTR signals for automatic reset/bootloader control.
Jumper wires with female ends to connect to the Fencyboy
Computer with Windows, macOS, or Linux
CubeCellFlash tool from Heltec (find the download link below)
The correct
.cyacdfirmware file for the specific Fencyboy unit (which can be requested from the manufacturer)
1. Disconnect other power sources
Before connecting the USB-TTL converter:
Disconnect the battery.
Cover or disconnect the solar panel.
Do not power the Fencyboy from the battery or solar panel during flashing.
The Fencyboy will be powered directly from the USB-TTL converter through the 3.3 V pin.
2. Connect the USB-TTL converter
Connect the USB-TTL converter to the 6-pin programming header of the Fencyboy.
Use the following wiring:
3V3
3V3
RX
TX (crossover with RX from Fencyboy)
TX
RX (crossover with TX from Fencyboy)
DTR
DTR (optional, but only together with RTS)
RTS
RTS (optional, but only together with DTR)
GND
GND
The RX and TX lines must be crossed: Fencyboy RX goes to USB-TTL TX, and Fencyboy TX goes to USB-TTL RX. Note that the label on your USB-TTL programmer might already be swapped to account for this crossover.
The reset control lines (DTR and RTS) are optional. However, they must be treated consistently.
Either connect both control lines or connect neither of them. Do not connect only one of RTS or DTR. The images below show the two possible configurations.


3. Download CubeCellFlash
Download the CubeCellFlash tool for your operating system from the Heltec download page:

Download the matching archive, e.g., CubeCellflash-0.0.1-macos.tar.gz, for your operating system, then unpack it somewhere convenient, for example into a folder called Fencyboy-Frimware-Update in your Downloads folder.
4. The Firmware File
Copy the provided Fencyboy firmware file into the unpacked CubeCellFlash folder, i.e., Downloads/Fencyboy-Frimware-Update. You can get the file from the manufacturer.
The firmware file has the extension:
Example:
Use the firmware file that was provided for the specific unit you are flashing because it contains the LoRaWAN configuration, e.g., DevEUI.
5. Find the serial port
Connect the USB-TTL converter to your computer.
The serial port may appear as something like:
On Windows:
On macOS:
On Linux:
or
6. Flash the firmware
Open a terminal or command prompt and navigate into the Downloads/Fencyboy-Frimware-Update folder.
Run the flashing command using the correct serial port and firmware filename. You can adapt the examples below.
If RTS and DTR are not connected you need to press the buttons manually before issuing the command below.
Hold down the USER button on the Fencyboy.
Press and release the RESET button.
Start the CubeCellFlash command from the terminal.
Keep holding the USER button until the upload is in progress.
Release the USER button during the upload process.
After the upload is complete, press RESET once.
macOS / Linux example
Windows example
During flashing, the output should show the bootloader initialization, upload progress, checksum verification, and reboot.
A successful flash should look similar to this:

Thats it and you are done with the update. See Troubleshooting in case of errors.
7. Optional: Check the serial log after flashing
After the firmware update, the device should reboot automatically and try to join the LoRaWAN network.
You can monitor the serial output using a serial monitor such as:
PuTTY
Arduino IDE Serial Monitor
PlatformIO Serial Monitor
Any other terminal program
Use the following serial settings:
A normal startup log should show the system booting, reading battery voltage, starting LoRaWAN, and attempting to join the network.
Example output:
8. Reconnect the unit
After the firmware update:
Disconnect the USB-TTL converter.
Start the unit as described in Getting Started
The device should now start normally and try to join the LoRaWAN network using the configured credentials.
Troubleshooting
CubeCellFlash reports a timeout
Try the following:
Unplug and reconnect the USB-TTL converter.
Check that the correct serial port is used.
Check that RX and TX are crossed.
Check that the USB-TTL converter uses 3.3 V supply and 3.3 V logic levels.
If RTS and DTR are not connected, use the manual USER/RESET button sequence.
If using RTS and DTR, make sure both are connected as described above. Do not use RTS or DTR alone, only in combination.
Device does not power on
Make sure that:
3V3 from the USB-TTL converter is connected.
GND is connected.
The USB-TTL converter can provide 3.3 V power.
The battery and solar panel are disconnected or inactive during flashing.
Device flashes successfully but does not join the LoRaWAN network
Check that:
The correct firmware file was flashed.
The device was registered with the correct DevEUI and AppKey.
The firmware region and frequency plan match the network configuration.
The device has sufficient battery voltage after reconnecting the battery.
The serial log shows join attempts after reboot.
Please contact the manufacturer in case of further problems.
Last updated