Allow the user to write the remote Bluetooth address LSB, as it is normally shown

This commit is contained in:
Kristian Lauszus 2014-04-21 19:28:00 +02:00
parent d9bbd6f224
commit c5ec4c2402
3 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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;