forked from aanon4/BlueBasic
-
Notifications
You must be signed in to change notification settings - Fork 0
BTPOKE and BTPEEK
kscheff edited this page Feb 18, 2017
·
3 revisions
BTPOKE <key>|<value>, <value>
<variable> = BTPEEK(<key>|<value>)
Directly change the values of the BLE keys.
- "ADVERT_ENABLED"
- "MIN_CONN_INTERVAL"
- "MAX_CONN_INTERVAL"
- "SLAVE_LATENCY"
- "TIMEOUT_MULTIPLIER"
- "LIM_DISC_ADV_INT_MIN"
- "LIM_DISC_ADV_INT_MAX"
- "GEN_DISC_ADV_INT_MIN"
- "GEN_DISC_ADV_INT_MAX"
- "TXPOWER"
- "RXGAIN"
- "DEV_ADDRESS"
- "GEN_DISC_ADV_MIN"
- "LIM_ADV_TIMEOUT"
- "PASSCODE"
- "BONDING_ENABLED"
- "POWER"
13 // "3200 = Advertise every 2 seconds"
15 T = 3200
20 BTPOKE LIM_DISC_ADV_INT_MIN, T
30 BTPOKE LIM_DISC_ADV_INT_MAX, T
40 BTPOKE GEN_DISC_ADV_INT_MIN, T
50 BTPOKE GEN_DISC_ADV_INT_MAX, T
another example showing how to use numbers instead of keywords for enabling passcode MITM authentication
//set pairing mode to GAPBOND_PAIRING_MODE_WAIT_FOR_REQ
10 BTPOKE 0x400, 1
// set BLE_MITM_PROTECTION to TRUE
20 BTPOKE 0x402, 1
// set BLE_BONDING_ENABLED to TRUE
30 BTPOKE 0x406, 1
// set BLE_DEFAULT_PASSCODE to individual passcode
40 BTPOKE 0x408, 1234