work with real hardware

1.2-legacy
geeksville 2020-02-02 19:06:56 -08:00
rodzic d57a86abcd
commit f08e210e8d
2 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -177,7 +177,9 @@ class RadioInterfaceService : Service(), Logging {
// Note: this call does no comms, it just creates the device object (even if the
// device is off/not connected)
device = bluetoothAdapter.getRemoteDevice("B4:E6:2D:EA:32:B7")
val usetbeam = false
val address = if (usetbeam) "B4:E6:2D:EA:32:B7" else "24:6F:28:96:C9:2A"
device = bluetoothAdapter.getRemoteDevice(address)
// Note this constructor also does no comm
safe = SafeBluetooth(this, device)

Wyświetl plik

@ -18,10 +18,10 @@ class SimRadio(private val context: Context) {
*/
private val simInitPackets =
arrayOf(
""" { "from": 10, "to": 9, "payload": { "subPackets": [{ "user": { "id": "+16508675310", "longName": "Bob One", "shortName": "BO" }}]}} """,
""" { "from": 10, "to": 9, "payload": { "subPackets": [{ "data": { "payload": "aGVsbG8gd29ybGQ=", "typ": 0 }}]}} """, // SIGNAL_OPAQUE
""" { "from": 10, "to": 9, "payload": { "subPackets": [{ "data": { "payload": "aGVsbG8gd29ybGQ=", "typ": 1 }}]}} """, // CLEAR_TEXT
""" { "from": 10, "to": 9, "payload": { "subPackets": [{ "data": { "payload": "", "typ": 2 }}]}} """ // CLEAR_READACK
""" { "from": 10, "to": 9, "payload": { "user": { "id": "+16508675310", "longName": "Bob One", "shortName": "BO" }}} """,
""" { "from": 10, "to": 9, "payload": { "data": { "payload": "aGVsbG8gd29ybGQ=", "typ": 0 }}} """, // SIGNAL_OPAQUE
""" { "from": 10, "to": 9, "payload": { "data": { "payload": "aGVsbG8gd29ybGQ=", "typ": 1 }}} """, // CLEAR_TEXT
""" { "from": 10, "to": 9, "payload": { "data": { "payload": "", "typ": 2 }}} """ // CLEAR_READACK
)
fun start() {