-
• #2
That's right, yes. I believe you may be able to experiment using the
nRF connect
app to create a server. -
• #3
Hi Gordon,
I configured a sample GATT server using nRF connect app. I have following issues:
- NRF.setScan executed on Puck does not return any results.
- NRF.connect("Bluetooth Mac address") executed on Puck cannot connect and fails with "Unhandled promise rejection: Connection timeout."
Thank you.
- NRF.setScan executed on Puck does not return any results.
-
• #4
I guess you just typed
NRF.setScan()
? You need to add a handler to make it work.Try
NRF.findDevices(print)
for something a bit easier.There are different types of address too - see what
findDevices
returns - you may have to putrandom
after the Mac address to make it work (if the address is classified as not being universally unique). -
• #5
Hi Gordon,
Neither
packets=10; NRF.setScan(function(d) { packets--; console.log(d); // print packet info if (packets<=0) NRF.setScan(); // stop scanning });
nor
NRF.findDevices(function(devices) { console.log(devices); }, 1000);
return any results.
I guess configuring GATT server with the sample configuration does not start the server itself.
Another approach could be implementing a GATT server on Android.
-
• #6
Ahh, that all looks fine. Sometimes it can depend on your phone - as far as I know not all Android phones support Central mode.
If you had a second Android phone then you could at least test :)
Hi Guys,
I would like to connect from Puck to Android using "NRF.connect("Bluetooth Mac address")"
What is required on Android, start GATT server ?
Thank you.