DataElement reparsed = new DataElement(attrBytes);
System.out.println("Reparsed Attributes="+reparsed);
*/
BluetoothStack.init(new BluetoothTCPClient("192.168.10.2", 2600));
BluetoothStack bluetooth = BluetoothStack.getBluetoothStack();
bluetooth.send_HCI_HC_Change_Local_Name("TINI BLUE");
bluetooth.send_HCI_HC_Write_Event_Filter_Connection_Setup((byte)0x02);
bluetooth.send_HCI_HC_Write_Event_Filter_Inquiry_Result();
bluetooth.send_HCI_HC_Write_Scan_Enable((byte)0x03);
BluetoothClient blue = new BluetoothClient();
while (remoteDevice == null) { Thread.sleep(1000); }
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); }