Reverse Engineer the BL602 WiFi Driver
lupyuen.github.io
lupyuen.github.io
https://www.pine64.org/2020/10/28/nutcracker-challenge-blob-...
https://lupyuen.github.io/articles/pinecone
Aside:
This is another interesting example of the "convenience" of centralisation of source code control around a single website: github.com.
The author seemingly never has to search competing source code control websites or hardware manufacturer websites. Most everything he references is found on github.com
Pine64 required all nutcracker entries to use github.com
Is it worth pondering that a company founded on the idea of not releasing source code to software users, instead copyrighting it and enforcing copyright through the courts and law enforcement, as a means for selling software (licenses), is now in control of accesss to all this open, freely avaialble source code.
https://github.com/aimnas/ja2-1.13-source-mirror/search?q=br... finds 12 occurrences (should be 17), somehow misses https://github.com/aimnas/ja2-1.13-source-mirror/blob/master...
I stopped relying on it after this discovery :/
Wireless (Tier-1 RF Performance)
Wi-Fi 802.11 b/g/n
Bluetooth® Low Energy 5.0
Wi-Fi Fast connection with BLE assistance
Wi-Fi and BLE coexistence
Wi-Fi Security WPS/WEP/WPA/WPA2/WPA3
STA, SoftAP and sniffer modes
Multi-Cloud connectivity
2.4 GHz RF transceiver
Integrated RF balun, PA/LNA
Microcontroller Subsystem 32-bit RISC CPU with FPU
L1 cache
RTC timer up to One year
Two 32b general purpose timers
Four DMA channels
Dynamic Frequency from 1MHz to 192MHz
JTAG development support
XIP QSPI flash support
Memory 276KB SRAM
128KB ROM
1Kb eFuse
Embedded Flash (Optional)
Security (Complete Security features) Secure boot
Secure debug
XIP QSPI On-The-Fly AES Decryption (OTFAD)
AES 128/192/256
SHA-1/224/256
TRNG (True Random Number Generator)
PKA (Public Key Accelerator)
Peripherals SDIO 2.0 slave (AP-Host)
SPI master/slave
Two UART
I2C master/slave
Five PWM channels
10-bit general DAC
12-bit general ADC
Two general analog comparators
PIR (Passive Infra-Red) detection
IR remote HW accelerator
Flexible 16 GPIOs (BL602) / 23 GPIOs (BL604)
Power Modes (Ultra-low Power modes) Off
Hibernate
Power Down Sleep (flexible)
Active
Clock Support XTAL 24/26/32/38.4/40MHz
Support XTAL 32/32.768KHz
Internal RC 32KHz & 32MHz oscillator
Internal System PLL
Package Type 32 pin QFN (BL602)
40 pin QFN (BL604)"How does BL602 compare with ESP32?
BL602 is a General Purpose Microcontroller that supports Bluetooth LE and WiFi
ESP32 is more of a Bluetooth LE + WiFi Controller that supports Embedded Programs"
The microcontroller in an ESP32 isn't second class or anything, and seems "general purpose" to me. So I'm confused as to what point is being made.
Big mystery: why did I think, all along, that ESP32 was ARM? (Don't answer that.)
Datasheet: https://www.espressif.com/sites/default/files/documentation/...
A work of this calibre, and quality level can cost easily $100k+ in the embedded world.
If so, I think you'd want to use 'first rate' to mean something best in class. First grade is well, first grade(childish), at least in US English.
dmitrygr is a legendary embedded hacker [2]: his Transcend WiFi SD card reverse-engineering is what led to me having a PQI Air Card in my pocket, and he's also written a bit-banged Bluetooth Low Energy driver. Great for a demo or when there's nothing else available, but far from a finished product.
Writing a MISRA-compliant BLE driver would make me MISRA BLE.
[1] https://embeddedgurus.com/state-space/2016/04/beyond-the-rto...
A large amount of initial RE work is research, such as this article. Not doing it costs you a lot more time later on.
Working code could easily be over 100 hours of work on an under-documented radio chip, so your cost estimate is too low for that
Anyway, at $200/h you can spend 500h making something work. ;)
Some companies want to find how someone would RE their devices, so they pay someone to find a way, then tell them.
Sometimes just a random person will want something REd so much that they'd pay for it to be done (happened more than once)
Sometimes no cause is given to me, which is fine because that is none of my business, really.
Sometimes I just do it for fun, but then I do not get paid, eg: http://dmitry.gr/?r=05.Projects&proj=30.%20Reverse%20Enginee...
> Are they really the same code?
> We compared the decompiled BL602 WiFi Supplicant code with the Rockchip RK3399 source code… They are nearly 100% identical!
Isn't that a GPL violation? Code should be available!
Assuming that the license text is correct, Marvell or NXP would have been in their full rights to provide the same source code to some users under the GPLv2 for use in a Linux driver, and to other users under a different license.
Another possibility is that Marvell themselves licensed the supplicant code from someone else and replaced the copyright information when publishing it together with their driver.