• Stars
    star
    132
  • Rank 274,205 (Top 6 %)
  • Language
    C
  • Created over 2 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Arduino C++ Library and interface to flash the ZBS243 / SEM9110 8051 Microcontroller

ZBS_Flasher

By Aaron Christophel https://ATCnetz.de

You can support my work via PayPal: https://paypal.me/hoverboard1 this keeps projects like this coming

Ardunio / C++ Library and interface to flash the ZBS243 / SEM9110 8051 Microcontroller

The ZBS243 is an 8051 Zigbee Enabled SOC with 64KB of Flash and 1KB of EEPROM Like Infopage, 256Byte+8KB RAM is available.

It is used in the Electronic Shelf Labels made by SOLUM and rebranded with the name SEM9110

Here is a YouTube video that shows the general function https://youtu.be/QqyUzDRQEqA

YoutubeVideo

Chip Picture:

ZBS243 Picture

ZBS243 Pinout:

ZBS243 Pinout

2.9" amd 1.54" Electronic Shelf Label flashing Pinout:

1.54 and 2.9 Pinout

4.2" Black Electronic Shelf Label flashing Pinout:

4.2 Pinout

The debug interface is an SPI like connection and the debug mode is entered via toggling the CLK signal while a reset is done.

Many more infos about the ZBS243 can be found here: Reverse Engineering an Unknown SOC

This Project enables simple Reading and Writing of the Flash/Infopage

It is written for the ESP32 but should run basically on any SOC with ~8 GPIOS and UART.

You need

Virsual Studio code

PlatformIO

Python > 3.0

for Python you need: pyserial ( pip install pyserial )

How to get Started

Flashing "Dmitrys" Firmware: HowTo

Load the Project folder into Virsual Studio Code, select the Correct COM port in the platformio.ini

Flash it to an ESP32 or Arduino Nano

After that you can use the python tool zbs_flasher.py(zbs_flasher.exe precompiled, may triggers Anti Virus software) with the following parameter:

zbs_flasher -p COMxx read write read-infopage write-infopage file.bin reset

The Pinout on how to connect the ZBS243 SOC is in this README or readable in the main.cpp file and can be changed to any wanted GPIOs of the ESP32.

The "ZBS_POWER" pin is used to reset the SOC after any debug mode action like flashing etc. the SOC is stuck in debug mode and can only exit from it via a power cycle so it is adviced to connect the power to the SOC via an transistor to automaticaly have it exit the debug mode and run the firmware. The power cycle can also be done manually.

Pins:

ZBS243 Pin Pin name Name ESP32 Pin ESP82622 Pin Arduino Nano Pin
14 P0_0 SPI_Clk 18 14 13
15 P0_1 SPI_MoSi 5 13 11
16 P0_2 SPI_MiSo 17 12 12
17 P0_3 SPI_SS 23 15 10
22 RST RESET 19 0 7
ALL VCC VCC ZBS243 Power 16 !!!* 4 !!!* 14 through 19
  • do not connect VCC directly to a GPIO only trough some kind of Mosfet or switch!

Example power switching circuit with ESP32 Lolin Lite:

LDO: https://www.lcsc.com/product-detail/_Shanghai-Siproin-Microelectronics-_C411022.html

PogoFlasher_ZBS243_Power_switching_circuit

Debugging and power options on the Arduino Nano - flasher

There are some basic options to test the tag while connected to the flasher. Highly experimental! Use a serial terminal on 115200 baud and use hit '?' to see the options.

  • Serial passthrough kinda works, but bit-bangs inputs and outputs and is somewhat shaky in its timings. Probably better to use an ESP32 with a second serial port for that.
  • RAM dump currently only dumps the first 256 bytes. The second half of the 256 bytes looks suspiciously similar to the first. This needs some work
  • You can use the 'Clear screen' option on stock firmware to clear the display. It'll disconnect power after the last refresh to a white screen, if the timing is correct.
+---------- DEBUG OPTIONS -------------+
| ? - Displays this list               |
| B - Power on and boot tag            |
| T - Toggle the test pin (P1.0)       |
| P - Toggle power                     |
| R - Toggle reset pin                 |
| S - Soft reset                       |
| H - Hard reset                       |
| | - Hard reset into passthrough mode |
| C - Clear the screen (on stock fw)   |
| F - Clear the screen (on fast hw)    |
| V - Dump RAM contents (experimental) |
+--------------------------------------+
| POWER: OFF   _RESET: HIGH TEST: HIGH |
+--------------------------------------+
Reading from RAM...
 Address: | 0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  | ---------------- |
 0x0-     | C0 07 00 00 00 00 00 00 00 00 00 00 00 00 52 00 | ..............R. |
 0x1-     | AB F8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ |
 0x2-     | 05 00 00 00 00 00 00 00 00 00 00 00 00 00 80 07 | ................ |
 0x3-     | 00 00 00 00 00 C0 05 08 00 CF AB 07 CF FF 07 64 | ...............d |
 0x4-     | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ |
 0x5-     | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ |
 0x6-     | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ |
 0x7-     | 00 00 00 00 14 00 00 00 00 00 D0 00 00 00 00 00 | ................ |
 0x8-     | C0 07 00 00 00 00 00 00 00 00 00 00 00 00 52 00 | ..............R. |
 0x9-     | AB F8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ |
 0xA-     | 05 00 00 00 00 00 00 00 00 00 00 00 00 00 80 07 | ................ |
 0xB-     | 00 00 00 00 00 90 EE 08 00 CF AB 07 CF FF 07 64 | ...............d |
 0xC-     | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ |
 0xD-     | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ |
 0xE-     | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ |
 0xF-     | 00 00 00 00 14 00 00 00 00 00 D0 00 00 00 00 00 | ................ |
This feature is experimental! Data sent across this passthrough may appear mangled/corrupted!
----------------------------
booted at 0x1a77
Booting FW ver 0x0000010f00000000
 -> FW v1.15.0.0
MAC FF:FF:FF:FF:FF:FF:FF:FF
eeprom has 59 image slots
Associate is not diâ–’played
try ch 11
sleep: 791015

3D printed programming jig

General info

  • Before each flashing the Flash/Infopage is always fully erased
  • Flash takes ~12 Seconds for a full file, smaller file are faster of course
  • Full read of flash takes ~12 Seconds
  • on flashing the data is directly verified on the ESP32, on reading no verify is done so maybe read it twice to make sure its correct
  • It could be needed to tweak the transmission speed from the ESP32 to ZBS, this can be done in the zbs_interface.h (ZBS_spi_delay value), in the newest version hardware SPI is used so maybe reduce the SPI-speed if needed

Arduino-Nano flasher variant:

  • If you use an Arduino Nano, you should use a 3.3v version. Some bootlegs are 5v, and while the tags -seem- 5v tolerant, they aren't built for that
  • The Arduino Nano version should work with an m168 or m328 part, update platformio settings accordingly
  • Timings have been adjusted for maximum speed (Down to 76 seconds for a flash upload) I didn't run into problems, but you might. Add some delays in zbs_interface if it doesn't work for you

More Repositories

1

ATC_MiThermometer

Custom firmware for the Xiaomi Thermometer LYWSD03MMC and Telink Flasher via USB to Serial converter
C
2,682
star
2

ATC_TLSR_Paper

Custom BLE firmware for Hanshow E-Paper Shelf Labels / Price Tags
C
284
star
3

E-Paper_Pricetags

C
230
star
4

ESP32_nRF52_SWD

This software brings you the possibility to Read and Write the internal Flash of the Nordic nRF52 series with an ESP32
C++
229
star
5

CH559sdccUSBHost

USB host to Arduino Interface with the Cheap CH559 uC
C++
220
star
6

ATCmiBand8fw

A custom firmware for the Xiaomi Mi Band 8
HTML
186
star
7

ATCwatch

Custom Arduino C++ firmware for the P8 and PineTime plus many more DaFit Smartwatches
C
175
star
8

DaFlasherFiles

Additional files for the DaFlasher App and the ATCwatch Firmware for the P8 Smartwatch
108
star
9

TCSintercomArduino

Arduino C++ interface for the TCS intercom system
C++
69
star
10

NETSGPClient

Arduino Interface for cheap 2.4ghz RF enabled Solar Micro Inverters
C++
60
star
11

ESP_CC_Flasher

Arduino Library and code to flash CC2510, CC1110 or other Texas Instruments CCxxx Microcontroller
C++
55
star
12

DiyArduinoESP232AlarmSystem

Simple Alarmsystem with the ESP8266 or ESP32 and 433mhz sensors
C++
48
star
13

ATC_stc_solder_iron

Custom firmware for cheap STC Based Soldering iron using PlatformIO and SDCC 8051 based
C
44
star
14

atc1441.github.io

HTML
38
star
15

CustomCanDecoderBox

C++
36
star
16

Waveshare_NFC_E-Paper_Display_custom_firmware

A basic custom firmware to show a running example on the TN2115S2 SoC inside of the Passive NFC E-Paper Displays from Waveshare
C++
35
star
17

88MZ100

C++
26
star
18

chflasher

Python
26
star
19

ATC_Wifi_Toothbrush

The fitting firmware to update the Wifi Toothbrush plus an example custom firmware for the ESP32-C3
C
25
star
20

QRcode_clock

64x64 RGB LED Matrix QR code clock using ESP32 and Espruino
JavaScript
25
star
21

CH_HID_Arduino

C++
25
star
22

Disno_band_NRF31512

Hacking of the Disno Band Version 2 and its internal NRF31512
C++
22
star
23

CH55xOneClickCompiler

CH551 to CH554 One Click SDCC Compiler
C
19
star
24

D6Emulator

D6 Fitness Tracker Custom Firmware for Arduino
C++
13
star
25

D6Flasher

Java
11
star
26

ATC_GICISKY_ESL

Informations and Example code to control the GICISKY / PICKSMART E-Paper Shelf Labels
11
star
27

HINKeinkDisplayLibrary

Driver for HINK E-Ink E-Paper Displays Arduino
C++
10
star
28

TI_CC_Ghidra_CPU

Ghidra Plugin for Texas Instrument CC 8051 SOC's especially CC1110 and CC2510
Java
10
star
29

ESP32-I2S-RGB-Matrix-Clock

C++
10
star
30

Magic3_DaFit

Code repo for infos and demos on the DaFit Magic 3 Smartwatch
C
9
star
31

ZBS243_SEM9110_Ghidra_CPU

Ghidra CPU Plugin which makes Reversing of the Samsung ZBS243 8051 SOC more simple
Java
8
star
32

HRS3300-Arduino-Library

Arduino Library for the HRS3300 Heartrate sensor for the nRF52 Bluetooth Micro
C
6
star
33

D6Notification

Companion App for the ATCwatch Arduino Smartwatch Firmware mainly for nRF52832
Java
5
star
34

ArduinoHoverboardAPI

C
2
star
35

smart-watch-socs

A list of smart watches and their corresponding SoC and price (USD)
2
star
36

CH55xDuino

1
star