The Xiaomi Mi Band 8
Like different smartwatch/well being monitoring bands in the marketplace, the Xiaomi Mi Band 8 is filled with sensors, communication capabilities, and an environment friendly battery administration system- all in a compact wearable. The band runs on an Arm Cortex-M4 microcontroller inside an Apollo4 Blue Lite SoC from Ambiq, and because of this reality, Aaron Christohpel (atc1441 on GitHub) realized that he may hack it to run customized firmware due to the Ambiq SDK.
Accessing the MCU
There are a few methods to load applications and knowledge onto an Arm microprocessor, however the major methodology for debugging entails the SWD, or serial wire debug, header. By way of simply two or three pins, new executables and may be despatched and subsequently monitored with a debugger. Conveniently, the Reset, SWD Clock, and SWD IO have been all uncovered on the underside of the PCB as check pads, thus permitting Christohpel to solder jumpers and fasten them to a programmer. Two UART pin have been additionally obtainable to behave as serial debugging output.
Constructing a show driver
One of many greatest attracts of the watch is its massive 1.62″ AMOLED touchscreen with a decision of 192 x 490 pixels, making it an excellent alternative for embedded initiatives that require human enter. Nevertheless, figuring out how the show driver was related to the microcontroller and even what mannequin the motive force is within the first place required some reverse engineering earlier than applications may very well be written.
After analyzing the show, Christohpel found it was pushed by an RM69330, which is frequent for spherical LCDs, together with the pins being utilized by the microcontroller’s SPI bus. Armed with this information, he constructed a driver that might write pixel knowledge to the display screen’s inner buffer after which present it. The ultimate check of this proof of idea concerned exporting a number of frames from Rick Astley’s notorious “By no means Gonna Give You Up” video and looping by way of them to create a easy animation.
Different peripherals
Though the display screen is the principle attraction, the Mi Band 8 is in the end a health tracker, and subsequently incorporates sensors for motion/orientation, coronary heart price measurement, and ambient mild sensing in addition to a Bluetooth Low-Power module. At the moment, Christohpel has gotten the show, touchscreen, and lightweight sensor working in his newest challenge launch and shortly plans on finishing accelerometer assist.
Going additional
Attributable to its low price and spectacular array of sensors and display screen, the Mi Band 8 seems to be a promising gadget for future hacking and adapting into different initiatives. To comply with extra of Christohpel’s progress as he continues to unlock its performance, you’ll be able to go to his GitHub repository right here.