mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Allow the user to write the remote Bluetooth address LSB, as it is normally shown
This commit is contained in:
parent
d9bbd6f224
commit
c5ec4c2402
3 changed files with 4 additions and 3 deletions
|
@ -42,7 +42,7 @@ SPPBase(p)
|
||||||
pBtd->pairWithOtherDevice = pair;
|
pBtd->pairWithOtherDevice = pair;
|
||||||
|
|
||||||
for (uint8_t i = 0; i < 6; i++)
|
for (uint8_t i = 0; i < 6; i++)
|
||||||
pBtd->remote_bdaddr[i] = addr[i];
|
pBtd->remote_bdaddr[i] = addr[5 - i];
|
||||||
|
|
||||||
/* Set device cid for the SDP and RFCOMM channels */
|
/* Set device cid for the SDP and RFCOMM channels */
|
||||||
sdp_scid[0] = 0x50; // 0x0050
|
sdp_scid[0] = 0x50; // 0x0050
|
||||||
|
|
|
@ -33,7 +33,7 @@ SPPBase(p)
|
||||||
pBtd->pairWithOtherDevice = pair;
|
pBtd->pairWithOtherDevice = pair;
|
||||||
|
|
||||||
for (uint8_t i = 0; i < 6; i++)
|
for (uint8_t i = 0; i < 6; i++)
|
||||||
pBtd->remote_bdaddr[i] = addr[i];
|
pBtd->remote_bdaddr[i] = addr[5 - i];
|
||||||
|
|
||||||
/* Set device cid for the SDP and RFCOMM channelse */
|
/* Set device cid for the SDP and RFCOMM channelse */
|
||||||
sdp_dcid[0] = 0x50; // 0x0050
|
sdp_dcid[0] = 0x50; // 0x0050
|
||||||
|
|
|
@ -16,7 +16,8 @@ USB Usb;
|
||||||
|
|
||||||
BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
|
BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
|
||||||
|
|
||||||
uint8_t addr[6] = { 0x71, 0xB4, 0xB0, 0xC8, 0xBC, 0xC8 }; // Set this to the Bluetooth address you want to connect to
|
uint8_t addr[6] = { 0x00, 0x12, 0x02, 0x10, 0x45, 0x13 }; // Set this to the Bluetooth address you want to connect to
|
||||||
|
|
||||||
SPPClient SerialBT(&Btd, "Arduino", "0000", true, addr);
|
SPPClient SerialBT(&Btd, "Arduino", "0000", true, addr);
|
||||||
|
|
||||||
boolean firstMessage = true;
|
boolean firstMessage = true;
|
||||||
|
|
Loading…
Reference in a new issue