You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libraries/BluetoothSerial/README.md
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -25,12 +25,12 @@ There are 3 basic use cases: phone, other ESP32 or any MCU with BT serial module
25
25
26
26
#### ESP32
27
27
28
-
You can flash one of the ESP32 with example [`SerialToSerialBTM`](https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBTM/SerialToSerialBTM.ino) (the Master) and another ESP32 with [`SerialToSerialBT`](https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBT/SerialToSerialBT.ino) (the Slave).
29
-
Those examples are pre-set to work out-of-thebox but they should be scalable to connect multiple Slaves to the Master.
28
+
You can flash one of the ESP32 with the example [`SerialToSerialBTM`](https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBTM/SerialToSerialBTM.ino) (the Master) and another ESP32 with [`SerialToSerialBT`](https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBT/SerialToSerialBT.ino) (the Slave).
29
+
Those examples are preset to work out-of-the-box but they should be scalable to connect multiple Slaves to the Master.
30
30
31
31
#### 3rd party Serial BT module
32
32
33
-
Using 3rd party Serial BT module will require to study the documentation of the particular module in order to make it work, however one side can utilize the mentioned [`SerialToSerialBTM`](https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBTM/SerialToSerialBTM.ino) (the Master) or [`SerialToSerialBT`](https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBT/SerialToSerialBT.ino) (the Slave).
33
+
Using 3rd party Serial BT module will require to study the documentation of the particular module in order to make it work, however, one side can utilize the mentioned [`SerialToSerialBTM`](https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBTM/SerialToSerialBTM.ino) (the Master) or [`SerialToSerialBT`](https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBT/SerialToSerialBT.ino) (the Slave).
34
34
35
35
### Pairing options
36
36
@@ -46,12 +46,12 @@ This method will authenticate automatically any attempt to pair and should not b
46
46
47
47
### With SSP
48
48
49
-
Usage of SSP provides secure connection. This option is demonstrated in example [`SerialToSerialBT_SSP`](https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBT_SSP/SerialToSerialBT_SSP.ino)
49
+
The usage of SSP provides a secure connection. This option is demonstrated in the example `SerialToSerialBT_SSP``](https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBT_SSP/SerialToSerialBT_SSP.ino)
50
50
51
-
The Secure Simple Pairing is enable by calling method `enableSSP` which has two variants - one is backward compatible without parameter `enableSSP()` and second with parameters `enableSSP(bool inputCapability, bool outputCapability)`.
52
-
Alternatively the SSP can be disabled by `disableSSP()`
51
+
The Secure Simple Pairing is enabled by calling method `enableSSP` which has two variants - one is backward compatible without parameter `enableSSP()` and second with parameters `enableSSP(bool inputCapability, bool outputCapability)`.
52
+
Alternatively, the SSP can be disabled by `disableSSP()`
53
53
54
-
Both options must be called before `begin()` or if it is called after `begin()` the driver needs to be restart (call `end()` followed by `begin()`) in order to take in effect enabling or disabling the SSP.
54
+
Both options must be called before `begin()` or if it is called after `begin()` the driver needs to be restarted (call `end()` followed by `begin()`) in order to take in effect enabling or disabling the SSP.
55
55
56
56
#### The parameters define the method of authentication:
57
57
@@ -61,7 +61,7 @@ Both options must be called before `begin()` or if it is called after `begin()`
61
61
62
62
***inputCapability=true and outputCapability=true**
63
63
* Both devices display randomly generated code and if they match the user will authenticate pairing on both devices.
64
-
* This must be implemented registering callback via `onConfirmRequest()` and in this callback the user will input the response and call `confirmReply(true)` if the authenticated, otherwise call `confirmReply(false)` to reject the pairing.
64
+
* This must be implemented by registering a callback via `onConfirmRequest()` and in this callback the user will input the response and call `confirmReply(true)` if the authenticated, otherwise call `confirmReply(false)` to reject the pairing.
65
65
***inputCapability=false and outputCapability=false**
66
66
* Only the other device authenticates pairing without any pin.
67
67
***inputCapability=false and outputCapability=true**
@@ -74,5 +74,6 @@ Both options must be called before `begin()` or if it is called after `begin()`
74
74
75
75
To use Legacy pairing you will have to use [Arduino as an IDF component](https://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/esp-idf_component.html) and disable option `CONFIG_BT_SSP_ENABLED`.
76
76
Please refer to the documentation on how to setup Arduino as an IDF component and when you are done, run `idf.py menuconfig` navigate to `Component Config -> Bluetooth -> Bluedroid -> [ ] Secure Simple Pairing` and disable it.
77
-
While in the menuconfig you will also need to change partition scheme `Partition Table -> Partition Table -> (X) Single Factory app (large), no OTA`.
78
-
After these changes save & quit menuconfig a you are ready to go: `idf.py monitor flash`.
77
+
While in the menuconfig you will also need to change the partition scheme `Partition Table -> Partition Table -> (X) Single Factory app (large), no OTA`.
78
+
After these changes save & quit menuconfig and you are ready to go: `idf.py monitor flash`.
79
+
Please note that to use the PIN in smartphones and computers you need to use characters `SerialBT.setPin("1234", 4);` not a number `SerialBT.setPin(1234, 4);` . Numbers CAN be used if the other side uses them too, but phones and computers use characters.
0 commit comments