scanning doesn't see mu Samsung phone A8

Posted on
  • hello ,
    I have started a new project , and went back to basic because something isn't working for me
    simple scan for devices and print them
    this is the code:

    NRF.setAdvertising({}, {name: "Test3"});
    
    var s=setInterval(function(){
    LED1.write(false);
    NRF.findDevices(function(devices) {
      if (devices.length>0)
      {
        print("I found you :\n\r ");
        for(var i=0;i<devices.length;i++)
      {
        
        var time = (new Date()).toString();
        var rssi = devices[i].rssi;
        var MAC = devices[i].id;
        var name = devices[i].name;
        var manufacturer = devices[i].manufacturer;
        print (
             + " " +   time
             + " " +   MAC
             + " " +   rssi
             + " " +   name
             + "  " + manufacturer
        );
        
      } }
      LED1.write(true);    
     print ("**************************");               
    }, 1000);},5000);
    
    

    I can see devices found (none of them is my phone...)

    I found you :
    NaNMon Aug 10 2020 17:08:56 GMT+0300 00:0e:0b:0c:70:03 -77 undefined  19784
    NaNMon Aug 10 2020 17:08:56 GMT+0300 7c:9a:12:f8:57:c3 -85 undefined  76
    NaNMon Aug 10 2020 17:08:56 GMT+0300 28:af:35:20:89:9b -89 undefined  6
    NaNMon Aug 10 2020 17:08:56 GMT+0300 68:bd:35:87:b2:2c -87 undefined  6
    NaNMon Aug 10 2020 17:08:56 GMT+0300 60:d9:f3:7d:3e:a6 -87 undefined  76
    **************************
    

    everything is on the desk maybe 10 cm from the device
    the samsung phone bluetooth is open
    how could it be ?
    did I miss something in the code?

    Thanks ,

  • I'm not sure if this helps, but when I get something similar (device I'm expecting to see isn't on the list) I eventually realize it's because it's not advertising on BLE (either because it's connected and paired with something else or I disabled advertising altogether).

    If you have another phone or tablet you can try the nrfconnect app and see if the app can detect the phone.

  • I can see the phone with anoter device

  • There is a (confusing) difference between standard Bluetooth and Bluetooth LE.

    Most phones will advertise on Bluetooth but may not advertise on Bluetooth LE by default. You could try installing nRF Connect as suggested above.

    On my phone:

    • NRF.findDevices(print) does not properly list the phone
    • Start nRF Connect, go to 'Advertiser', add a new advertise type and turn it on
    • NRF.findDevices(print) now shows the phone
    • If I turn 'Advertiser' off the phone is no longer visible on Bluetooth LE
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

scanning doesn't see mu Samsung phone A8

Posted by Avatar for David1234321 @David1234321

Actions