MDBT42Q NRF.setScan not detecting BLE Advertisements #7863
-
|
Hello, I have my PC connecting to an MDBT42Q Breakout via a CP2102. I've upgraded the MDBT42Q to 2v27. I want to detect BLE advertisements from other devices so my code is the below, that is simple as I can think of. I upload to RAM via the Espruino IDE and all seems to start correctly and I can see the logging. But all I ever see is "Invalid device..." - even when advertising with nrfConnect, or BLE Advertiser (both android apps), or my watch, I never see any devices recognised. Any ideas welcome. Regards, console.log("Starting BLE advertisement scan..."); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Where did you get the code from? I guess an AI wrote that for you? If you look at https://www.espruino.com/Reference#l_NRF_setScan it's not how you use setScan. Probably all you want is: Depending what you're after you might want |
Beta Was this translation helpful? Give feedback.
Where did you get the code from? I guess an AI wrote that for you?
If you look at https://www.espruino.com/Reference#l_NRF_setScan it's not how you use setScan.
Probably all you want is:
Depending what you're after you might want
NRF.requestDevice(find one device) orNRF.findDevices(scan for X seconds and return what was found).setScanwill call you back every time an advertisement is received, which could be a lot!