BLE working on Simulator with BLE USB Dongle but no on Watch Fenix 6 Solar

Hi,

i develop my app using the simulator with the USB Dongle nRF52840 and the app works fine and can connect to the external peripheral device.

I can read/write to/from characteristics and also receive update notification.

But running the same app on the watch it doenst scan the external peripheral device. I can see all the other scan results but not mine.

I comment the BLE profile registration hoping to see all scan results raw data but it doenst even output my peripheral device raw data?

Is the bluetooth low energy version from the watch 4.2? If not is it compatible with peripherals that are running 4.2?

Here is some data from the log file from the watch:

[ble] result.getRawData() [2, 1, 26, 2, 10, 12, 11, 255, 76, 0, 16, 6, 19, 30, 154, 192, 213, 78] result.getAppearance() 0
[ble] result.getRawData() [2, 1, 26, 2, 10, 12, 17, 255, 76, 0, 15, 8, 192, 10, 148, 184, 6, 0, 64, 11, 16, 2, 1, 4] result.getAppearance() 0
[ble] result.getRawData() [2, 1, 26, 2, 10, 12, 11, 255, 76, 0, 16, 6, 19, 30, 154, 192, 213, 78] result.getAppearance() 0
[ble] close
On Stop...

Here is the output console from the simulator on scan results:

result.getRawData() [3, 2, 144, 204, 25, 255, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 11, 155, 15, 146, 3, 201, 4, 236, 255, 248] result.getAppearance() 0

I can read the raw data from all other bluetooth peripherals around but not mine. Any idea? Why is it working on simulator and not on the watch?

(BluetoothLowEnergy permission is set on Manifest.xml)

Best regards,

Michael

  • Hi Jim,

    the USB BLE Dongle is not attached to the PC once i download and run the application on the watch.

  • Hi Jim,

    so i modify your code now to log only what the watch can scan and compare it with the simulator:

    Simulator output:

    [ble] scanResults.next() result.getRawData()[2, 1, 26, 2, 10, 12, 17, 255, 76, 0, 15, 8, 192, 10, 148, 184, 6, 0, 64, 11, 16, 2, 1, 4]

    [ble] scanResults.next() result.getRawData()[2, 1, 6, 10, 255, 76, 0, 16, 5, 75, 28, 172, 152, 12]

    [ble] scanResults.next() result.getRawData()[2, 1, 30, 10, 255, 117, 0, 1, 0, 2, 0, 1, 2, 2, 3, 25, 192, 0]

    [ble] scanResults.next() result.getRawData()[3, 2, 144, 204, 25, 255, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 11, 151, 15, 146, 3, 200, 4, 236, 255, 248]

    Watch output log:

    [ble] scanResults.next() result.getRawData()[2, 1, 6, 10, 255, 76, 0, 16, 5, 75, 28, 172, 152, 12]
    [ble] scanResults.next() result.getRawData()[2, 1, 26, 2, 10, 12, 17, 255, 76, 0, 15, 8, 192, 10, 148, 184, 6, 0, 64, 11, 16, 2, 1, 4]
    [ble] scanResults.next() result.getRawData()[2, 1, 30, 10, 255, 117, 0, 1, 0, 2, 0, 1, 2, 2, 3, 25, 192, 0]

    Here is the code modification:

    function onScanResults( scanResults ) {    	
        //System.println("[ble] onScanResults");
            for( var result = scanResults.next(); result != null; result = scanResults.next() ) 
            {
            	var ret=false;
            	for( var i = 0; i < sizeArray; i++ )
            	{
            		if(scan_results[i]!=0)
            		{
    	        		if(result.isSameDevice(scan_results[i]))
    		        	{
    		        		ret=true;
    		        	}
            		}
            	}
            	if(ret==false)
            	{
            		scan_results[counter]=result;
            		counter++;
            		System.println("[ble] scanResults.next() result.getRawData()"+result.getRawData());
            	}
            	
                if( contains( result.getServiceUuids(), profileManager.PI_SERVICE ) ) {
                	// found a raspberry pi advertising the service needed
    		    	Ble.setScanState(Ble.SCAN_STATE_OFF);
    		    	view.scanning=false;
    		    	view.startCommTimer();	    	
    				view.device = Ble.pairDevice(result);
    				view.curResult=result;			
    				view.paired=true;
    				Ui.requestUpdate();							               
                }
            }        
        }

    It looks like the watch bluetooth scan results doenst output all the bluetooth devices around. Is this maybe a software bug from garmin? Or is the bluetooth IC only compatible with BLE 4.0 and 4.1 and not 4.2?

  • Here's what I see in nRF Connect for one of my pi system.  What's it look like for your sensor?

  • Hi Jim,

    thank you for your answer.

    I compare with my sensor and it is different.

    I took the manufacturer specific data out of the advertising package from my sensor and now i can connect to it.

    Maybe GARMIN only allows some manufacturer specific data IDs and some will be blocked.

    Best regards,

    Michael