Most recent activity
-
Thanks for the reply Gordon.
The device is a bathroom extractor fan called Pure Sense which would be tricky to post ;-)
I did some testing over the weekend and realised I needed to disable a lot of other Bluetooth devices in order for the Puck to discover it. Once I had the ID, I was able to enable the other devices and the Puck began connecting to the fan fine.
Not sure why this was the case, but I'm super happy that it works now. Takes around 30s to connect and send data but that's not a biggie.
Thanks for helping debug it!
-
No worries, thanks for trying.
It looks like the Puck isn't working for what I wanted it to do which is connect to a BLE device and send some requests.
I'll now try and get it to connect to a Raspberry Pi via Bluetooth and see if I can get the communication to work that way, it'll just mean an even longer lag :(
-
Thanks for helping debug this issue.
I have been reverse engineering a Pure Sense fan for the past few months by inspecting packets in Wireshark on the communication between the Android App and the Fan. By this process I was able to find out the Mac address, Device Name etc.
nRF shows the device as "LE only", Advertising Type "Legacy", Complete Local Name: "Pure Sense".
"Pure Sense" is the name of the Bluetooth device list when running on Raspberry Pi (in Python) and Web Bluetooth using JavaScript.
I cannot see why the Puck would be any different.
Do you have any idea on how I can change my code to free up the serial (if that's what I need to do?) I'm not sure this is the right approach since other Bluetooth LE devices show up in the scan.
It's worth noting that the description the Puck shows for each Bluetooth device is different too, there are no friendly names shown for any devices.
-
-
I tried to force the connection on Serial1 but now I've got an error 'Prompt not detected'
I really do wish this was simple. I was able to get this working in Python and Javascript fairly easily, something basic like finding a BLE device should be super simple :(
function onInit() { setTimeout(function() { Serial1.setConsole(); }, 1000); // ... }
also tried
function onInit() { setTimeout(function() { Serial1.setConsole(true); }, 1000); // ... }
-
-
-
Thanks Gordon,
I'm not sure what an active scan is. I was using a slightly modified version of the script in my original question.
The button, when pressed, makes a connection to the device, reads some data and sends some data. Since I'm doing it in a promise based approach, it takes a while for the data to be read / written. It's super quick in the app (around 1s or so) but takes around 30s on the Puck. I'm using LEDs to help signify that "something is happening". Will check to ensure I'm reusing objects as much as possible, pretty sure I am though.