Hello All Forum Goers,
I am a programmer at an intermediate level. I am at the moment developing an application that is going to be used in a Bluetooth busy environment.
I am wondering if it is possible to narrow down what a BT Devices searches for in a Bluetooth busy environment.
Is it possible to distinguish BT enabled phone device from a BT enabled GPS when scanning (Discovering).
I have being investigating this myself and I have come across one possible solution of checking the Device Class Attribute and coupling this attribute with Bluetooth Assigned Numbers(https://programs.bluetooth.org/apps/...?doc_id=49709). I have found this code in java which is below but was wndering if this is possible with an non OO language i.e. C :,
---------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------Code:public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) { System.out.println("Found device = " + btDevice.getBluetoothAddress()); /* * Since service search takes time and we are already forced to * complete an inquiry, we will not do a service * search on any device that is not an Imaging device. * The device class of 0x600 is Imaging as * defined in the Bluetooth Assigned Numbers document. */ // if (cod.getMajorDeviceClass() == 0x600) { /* * Imaging devices could be a display, camera, scanner, or * printer. If the imaging device is a printer, * then bit 7 should be set from its minor device * class according to the Bluetooth Assigned * Numbers document. */ // if ((cod.getMinorDeviceClass() & 0x80) != 0) { /* * Now we know that it is a printer. Now we will verify that * it has a rendering service on it. A rendering service may * allow us to print. We will have to do a service search to * get more information if a rendering service exists. If this * device has a rendering service then bit 18 will be set in * the major service classes. */ // if ((cod.getServiceClasses() & 0x40000) != 0) { deviceList.addElement(btDevice); // } // } // } }
Thanks,
Michael