mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-16 13:22:15 +00:00
dispatch l2cap and rfcomm packets in java client
This commit is contained in:
parent
25bf58726a
commit
7c07076ad3
@ -77,11 +77,20 @@ public class BTstackClient {
|
||||
packetHandler.handlePacket(new BTstackEventDaemonDisconnect());
|
||||
return;
|
||||
}
|
||||
if (packet.getPacketType() == Packet.HCI_EVENT_PACKET){
|
||||
switch (packet.getPacketType()){
|
||||
case Packet.HCI_EVENT_PACKET:
|
||||
packetHandler.handlePacket(EventFactory.eventForPacket(packet));
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case Packet.L2CAP_DATA_PACKET:
|
||||
packetHandler.handlePacket(new L2CAPDataPacket(packet));
|
||||
break;
|
||||
case Packet.RFCOMM_DATA_PACKET:
|
||||
packetHandler.handlePacket(new RFCOMMDataPacket(packet));
|
||||
break;
|
||||
default:
|
||||
packetHandler.handlePacket(packet);
|
||||
break;
|
||||
}
|
||||
}
|
||||
System.out.println("Rx Thread: Interrupted");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user