sforkowany z mirror/meshtastic-android
work with real hardware
rodzic
d57a86abcd
commit
f08e210e8d
|
@ -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)
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
Ładowanie…
Reference in New Issue