Skip to content

Commit 18f3ace

Browse files
committed
Removed last part of SPPServer constructor, as it shouldn't start the pairing sequence
1 parent c5ec4c2 commit 18f3ace

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

SPPServer.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
//#define EXTRADEBUG // Uncomment to get even more debugging data
2121
//#define PRINTREPORT // Uncomment to print the report sent to the Arduino
2222

23-
SPPServer::SPPServer(BTD *p, const char *name, const char *pin, bool pair, uint8_t *addr) :
23+
SPPServer::SPPServer(BTD *p, const char *name, const char *pin) :
2424
SPPBase(p)
2525
{
2626
if(pBtd)
@@ -29,12 +29,6 @@ SPPBase(p)
2929
pBtd->btdName = name;
3030
pBtd->btdPin = pin;
3131

32-
if (addr) // Make sure address is set
33-
pBtd->pairWithOtherDevice = pair;
34-
35-
for (uint8_t i = 0; i < 6; i++)
36-
pBtd->remote_bdaddr[i] = addr[5 - i];
37-
3832
/* Set device cid for the SDP and RFCOMM channelse */
3933
sdp_dcid[0] = 0x50; // 0x0050
4034
sdp_dcid[1] = 0x00;

SPPServer.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ class SPPServer : public SPPBase {
3131
* @param p Pointer to BTD class instance.
3232
* @param name Set the name to BTD#btdName. If argument is omitted, then "Arduino" will be used.
3333
* @param pin Write the pin to BTD#btdPin. If argument is omitted, then "0000" will be used.
34-
* @param pair Set this to true if you want to pair with a device.
35-
* @param addr Set this to the address you want to connect to.
3634
*/
37-
SPPServer(BTD *p, const char *name = "Arduino", const char *pin = "0000", bool pair = false, uint8_t *addr = NULL);
35+
SPPServer(BTD *p, const char *name = "Arduino", const char *pin = "0000");
3836

3937
/** @name SPPBase implementation */
4038
/**

0 commit comments

Comments
 (0)