A few months ago I bought a bluetooth mouse from Kmart for some ridiculously cheap price.
Well, no, not that type, this type:
This mouse has 4 driven wheels on the bottom, and drives them “tank style” in two pairs. Yes, this is a 4WD mouse… 🙄
Since the cat didn’t appear to take much interest in it at the time, I decided that I would have go. Following my last post, I was wondering what else I could “rinse and repeat” with the bluetooth web API. While cleaning up, I found my next
victim candidate! 😁
The mouse is also a smart mouse! Well… Bluetooth 4.0 SMART at least!
This remote control mouse is controlled by Smartphone apps, with apps available both for Android and for iPhone under the title “Mouse Racer” and “More for Mouse Racer” respectively. The publisher and manufacturer is HangZhou TianYuan Pet Products Co., Ltd, and you can still actually buy this bluetooth mouse cat toy from aliexpress here!
However, if you do buy it, don’t expect too much… the motors and gears inside are quite noisy and our cat simply was more scared than interested. With only 10k downloads on Android, it certainly doesn’t seem like this product was quite a roaring success….
Anyway… onto the tinkering! I simply did the same thing for this product as I did in the Yongnuo Light Wand series. However, doing this three years later… turns out I had forgotten a few things. Here’s what worked for me on my old LG G5:
- Downloaded the Android Debugger.
- Since my phone logs to the SD card, I inserted a microSD card.
- Set phone into developer mode (tap on build number 10 times).
- In developer settings on the phone, I enabled Bluetooth HCI Logging.
- I rebooted the phone.
- Ran the “Mouse Racer” app, and made sure to press every function button to move the mouse, so those commands would be added to the log.
- In developer settings on the phone, I enabled USB debugging.
- In developer settings on the phone, I set the USB mode “Picture PTP”
- Plugged in the phone to my Windows 10 PC with a proper data (not a “power-only”) USB-C cable.
- Authorised the PC’s access on the phone
- From a command line in the “platform-tools” folder:
- “adb devices” – to show that the phone was detected, connected, and authorised.
- “adb pull /sdcard/btsnoop_hci.log” to get the bluetooth log off the phone
- Opened the resulting file in wireshark, and read through to find the command data being send to the “write” characteristic on the device.
Unfortunately the latency through the Web Bluetooth API is quite high, making drivability of the mouse fairly imprecise … but I’m happy that at least it does work as a neat demo.