moving pairing options to core, do not disable ble in core (#402)

* moving pairing options to core, do not disable ble in core

* moving default pairing settings into core
This commit is contained in:
Peli de Halleux 2017-05-19 06:35:23 -07:00 committed by GitHub
parent a5a67afc59
commit 7af5b009cc
3 changed files with 58 additions and 61 deletions

View File

@ -28,64 +28,9 @@
}, },
"optionalConfig": { "optionalConfig": {
"microbit-dal": { "microbit-dal": {
"bluetooth": {
"private_addressing": 0,
"advertising_timeout": 0,
"tx_power": 6,
"dfu_service": 1,
"event_service": 1,
"device_info_service": 1,
"eddystone_url": 1,
"eddystone_uid": 1,
"open": 0,
"pairing_mode": 1,
"whitelist": 1,
"security_level": "SECURITY_MODE_ENCRYPTION_NO_MITM"
},
"gatt_table_size": "0x700" "gatt_table_size": "0x700"
} }
},
"userConfigs": [
{
"description": "Unsecure: Anyone can connect via Bluetooth.",
"config": {
"microbit-dal": {
"bluetooth": {
"open": 1,
"pairing_mode": 0,
"whitelist": 0,
"security_level": null
} }
}
}
},
{
"description": "JustWorks pairing (default): Button press to pair.",
"config": {
"microbit-dal": {
"bluetooth": {
"open": null,
"pairing_mode": null,
"whitelist": null,
"security_level": null
}
}
}
},
{
"description": "Passkey pairing: Button press and 6 digit key to pair.",
"config": {
"microbit-dal": {
"bluetooth": {
"open": 0,
"pairing_mode": 1,
"whitelist": 1,
"security_level": "SECURITY_MODE_ENCRYPTION_WITH_MITM"
}
}
}
}
]
}, },
"installedVersion": "vzlhfd" "installedVersion": "vzlhfd"
} }

View File

@ -1,5 +1,5 @@
{ {
"Math.abs": "Returns the absolute value of a number (the value without regard to whether it is positive or negative). \nFor example, the absolute value of -5 is the same as the absolute value of 5.", "Math.abs": "Returns the absolute value of a number (the value without regard to whether it is positive or negative).\nFor example, the absolute value of -5 is the same as the absolute value of 5.",
"Math.abs|param|x": "A numeric expression for which the absolute value is needed.", "Math.abs|param|x": "A numeric expression for which the absolute value is needed.",
"Math.max": "Returns the larger of two supplied numeric expressions.", "Math.max": "Returns the larger of two supplied numeric expressions.",
"Math.min": "Returns the smaller of two supplied numeric expressions.", "Math.min": "Returns the smaller of two supplied numeric expressions.",

View File

@ -56,9 +56,61 @@
"optionalConfig": { "optionalConfig": {
"microbit-dal": { "microbit-dal": {
"bluetooth": { "bluetooth": {
"enabled": 0 "private_addressing": 0,
"advertising_timeout": 0,
"tx_power": 6,
"dfu_service": 1,
"event_service": 1,
"device_info_service": 1,
"eddystone_url": 1,
"eddystone_uid": 1,
"open": 0,
"pairing_mode": 1,
"whitelist": 1,
"security_level": "SECURITY_MODE_ENCRYPTION_NO_MITM"
}
}
},
"userConfigs": [
{
"description": "Bluetooth Unsecure Pairing: Anyone can connect via Bluetooth.",
"config": {
"microbit-dal": {
"bluetooth": {
"open": 1,
"pairing_mode": 0,
"whitelist": 0,
"security_level": null
} }
} }
} }
},
{
"description": "Bluetooth JustWorks pairing (default): Button press to pair.",
"config": {
"microbit-dal": {
"bluetooth": {
"open": null,
"pairing_mode": null,
"whitelist": null,
"security_level": null
}
}
}
},
{
"description": "Bluetooth Passkey pairing: Button press and 6 digit key to pair.",
"config": {
"microbit-dal": {
"bluetooth": {
"open": 0,
"pairing_mode": 1,
"whitelist": 1,
"security_level": "SECURITY_MODE_ENCRYPTION_WITH_MITM"
}
}
}
}
]
} }
} }