Description
First of all thank you so much for creating this project and sharing your research! This has all been incredibly helpful.
Bug Description
readMem/writeMem only works for the first 10-15 seconds after Bluetooth is turned on (or when scanning is in operation). readMem fails 10 seconds after scanning is started, and internalblue produces the following error,
[!] _sendThreadFunc: No response from the firmware.
[!] sendHciCommand: waiting for response timed out!
Hardware and OS
BCM4375B1 (fw_0x1111.py)
Samsung S10e (msm), Android 10, Kernel 4.14 (SELinux Permissive)
Logs/To Reproduce
When scanning is off,
> hd 0x200400
[!] _sendThreadFunc: No response from the firmware.
[!] sendHciCommand: waiting for response timed out!
[!] readMem: No response to readRAM HCI command! (read_addr=200400, len=100)
...
[!] readMem: failed!
> info device
[!] _sendThreadFunc: No response from the firmware.
[!] sendHciCommand: waiting for response timed out!
[!] readMem: No response to readRAM HCI command! (read_addr=2026e2, len=6)
...
[!] readMem: failed!
File "$HOME/conda/lib/python3.11/site-packages/internalblue/cli.py", line 1441, in infoDevice
bt_addr = self.readMem(self.internalblue.fw.BD_ADDR, 6)[::-1]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
TypeError: 'NoneType' object is not subscriptable
EXCEPTION of type 'TypeError' occurred with message: 'NoneType' object is not subscriptable
But as soon as I tap on Scan in Settings -> Connections -> Bluetooth,
> info device
[*] ### | Device ###
[*] - Name: Android
[*] - ADB Serial: [REDACTED]
[*] - Address: [REDACTED]
Additional Context
As Busybox netcat was used, I had to change all references to nc -l -p
into netcat -l -p
for everything to work. This was likely a GNU netcat vs. BSD netcat problem in the new Busybox binary.