Add Bluetooth signalling echo request/response handlers, disconnection request/response handlers.
Add Bluetooth connection request/complete/disconnection callbacks. Remove debugging from HCI layer, as it is now operational -- add guards to ACL debug statements to reduce logging chattyness so that the overall command sequences can be observed and debugged.
This commit is contained in:
parent
fa1a092901
commit
083d797aca
7 changed files with 198 additions and 83 deletions
|
@ -195,3 +195,30 @@ void Bluetooth_Host_Task(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool Bluetooth_ConnectionRequest(uint8_t* RemoteAddress)
|
||||
{
|
||||
printf_P(PSTR("Connection Request from Device %02X:%02X:%02X:%02X:%02X:%02X\r\n"),
|
||||
RemoteAddress[5], RemoteAddress[4],
|
||||
RemoteAddress[3], RemoteAddress[2],
|
||||
RemoteAddress[1], RemoteAddress[0]);
|
||||
|
||||
/* Always accept connections from remote devices */
|
||||
return true;
|
||||
}
|
||||
|
||||
void Bluetooth_ConnectionComplete(void)
|
||||
{
|
||||
printf_P(PSTR("Connection Complete to Device %02X:%02X:%02X:%02X:%02X:%02X\r\n"),
|
||||
Bluetooth_Connection.RemoteAddress[5], Bluetooth_Connection.RemoteAddress[4],
|
||||
Bluetooth_Connection.RemoteAddress[3], Bluetooth_Connection.RemoteAddress[2],
|
||||
Bluetooth_Connection.RemoteAddress[1], Bluetooth_Connection.RemoteAddress[0]);
|
||||
}
|
||||
|
||||
void Bluetooth_DisconnectionComplete(void)
|
||||
{
|
||||
printf_P(PSTR("Disconnection Complete to Device %02X:%02X:%02X:%02X:%02X:%02X\r\n"),
|
||||
Bluetooth_Connection.RemoteAddress[5], Bluetooth_Connection.RemoteAddress[4],
|
||||
Bluetooth_Connection.RemoteAddress[3], Bluetooth_Connection.RemoteAddress[2],
|
||||
Bluetooth_Connection.RemoteAddress[1], Bluetooth_Connection.RemoteAddress[0]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue