if (remoteDevice != null) { //System.out.println("bdAddr:"+remoteDevice.getBluetoothAddress());
//System.out.println("Name:"+remoteDevice.getFriendlyName(false));
//System.out.println("major dev class :"+remoteDevice.deviceClass.getMajorDeviceClass());
//System.out.println("minor dev class :"+remoteDevice.deviceClass.getMinorDeviceClass());
//System.out.println("service classes :"+remoteDevice.deviceClass.getServiceClasses());
SDPClientChannel sdpChannel = new SDPClientChannel(remoteDevice, blue);
bluetooth.connectL2CAPChannel(sdpChannel, remoteDevice, (short)0x0001);
byte[] uuidList = { 0x35, 0x03, 0x19, 0x10, 0x02 };
DataElement uuidListElement = new DataElement(uuidList);
sdpChannel.send_SDP_ServiceSearchRequest((short)1, (short)14, uuidListElement);
}
while (serviceRecords == null) { Thread.sleep(1000); }
for (int i = 0; i < serviceRecords.length; i++) {
System.out.println(" " + serviceRecords[i]);
int[] attrIDs = { 0xff00 }; //reversed the values for range... this avoids ranges starting with 00 to be tructated.