meshtastic 0.0.177 → 0.0.178
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -9
- data/lib/meshtastic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89ae445ffe5b5a92527ac776eefac452593bdd34473a325c6048d8b19d3b7d9a
|
|
4
|
+
data.tar.gz: b3173a5209a3b9efefad113218573f399bb2f62ae794c037a1f5ea9c4ba24ed7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e94b436cb0340c13a372e1e11c3cb85b9f26303ed2e7d667ba754eb205e30a84383894b494904d548b4d86bcce2c8a245fd85b03fd42b4a9e9c4d64de2cc696
|
|
7
|
+
data.tar.gz: 4d784f09138ee9ecf2c9fde1503adf3974b651a82a35e5f96ed3cb64109ecd9ceae007e582ca3e3b208fb0a2e574d9e9f11a3c1c5fd584518d199cd9c14ec3b3
|
data/README.md
CHANGED
|
@@ -96,7 +96,7 @@ end
|
|
|
96
96
|
You should see something like this:
|
|
97
97
|
|
|
98
98
|
```
|
|
99
|
-
{packet: {from:
|
|
99
|
+
{packet: {from: 3237997296, to: 4294967295, channel: 93, id: 1, rx_time: 1735689600, rx_snr: 0.0, hop_limit: 3, want_ack: false, priority: :HIGH, rx_rssi: 0, delayed: :NO_DELAY, via_mqtt: false, hop_start: 3, public_key: "", pki_encrypted: false, next_hop: 0, relay_node: 0, tx_after: 0, decoded: {portnum: :TEXT_MESSAGE_APP, payload: "WHAT IS MY channel VALUE?", want_response: false, dest: 0, source: 0, request_id: 0, reply_id: 0, emoji: 0, bitfield: 0}, encrypted: :decrypted, topic: "msh/US/2/e/LongFast/!c0ffee00", node_id_from: "!c0ffee00", node_id_to: "!ffffffff", rx_time_utc: "2025-01-01 00:00:00 UTC"}, channel_id: "LongFast", gateway_id: "!c0ffee00"}
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
Note where is says `channel: 93`. This is the `channel` value required to send messages in this particular example.
|
|
@@ -118,14 +118,14 @@ require 'meshtastic'
|
|
|
118
118
|
|
|
119
119
|
serial_obj = nil
|
|
120
120
|
begin
|
|
121
|
-
serial_obj = Meshtastic::Serial.connect(block_dev: '/dev/
|
|
121
|
+
serial_obj = Meshtastic::Serial.connect(block_dev: '/dev/ttyACM0', baud: 115_200)
|
|
122
122
|
Meshtastic::Serial.wait_for_config(serial_obj: serial_obj, timeout: 10)
|
|
123
123
|
puts "local node: !#{serial_obj[:my_node_num].to_s(16)}"
|
|
124
124
|
|
|
125
125
|
# Direct message, or to: '!ffffffff' for the shared channel.
|
|
126
126
|
Meshtastic::Serial.send_text(
|
|
127
127
|
serial_obj: serial_obj,
|
|
128
|
-
to: '!
|
|
128
|
+
to: '!aabbccdd',
|
|
129
129
|
channel: 0,
|
|
130
130
|
text: 'Hello over serial!',
|
|
131
131
|
want_ack: true
|
|
@@ -147,14 +147,14 @@ Drive the loop yourself with `recv_from_radio(serial_obj:, timeout:)` (`0` polls
|
|
|
147
147
|
|
|
148
148
|
#### Bluetooth (`Meshtastic::Bluetooth`)
|
|
149
149
|
|
|
150
|
-
Linux only (BlueZ + `ruby-dbus`). Connect with a BLE address (`AA:BB:CC:DD:EE:FF`), not a mesh id (`!
|
|
150
|
+
Linux only (BlueZ + `ruby-dbus`). Connect with a BLE address (`AA:BB:CC:DD:EE:FF`), not a mesh id (`!11223344`). Pair first; this gem does not guess a PIN. BLE writes unframed ToRadio protobufs (no UART `0x94 0xC3` header).
|
|
151
151
|
|
|
152
152
|
Scan:
|
|
153
153
|
|
|
154
154
|
```ruby
|
|
155
155
|
require 'meshtastic'
|
|
156
156
|
Meshtastic::Bluetooth.scan(adapter: 'hci0', timeout: 5)
|
|
157
|
-
# => [{ address: '
|
|
157
|
+
# => [{ address: 'AA:BB:CC:DD:EE:FF', name: 'Meshtastic_eeff', paired: true }, ...]
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
Pair while discovery is running. Screen devices typically show a random 6-digit PIN:
|
|
@@ -164,8 +164,8 @@ bluetoothctl
|
|
|
164
164
|
agent KeyboardDisplay
|
|
165
165
|
default-agent
|
|
166
166
|
scan on
|
|
167
|
-
pair
|
|
168
|
-
trust
|
|
167
|
+
pair AA:BB:CC:DD:EE:FF
|
|
168
|
+
trust AA:BB:CC:DD:EE:FF
|
|
169
169
|
scan off
|
|
170
170
|
quit
|
|
171
171
|
```
|
|
@@ -179,12 +179,12 @@ require 'meshtastic'
|
|
|
179
179
|
|
|
180
180
|
bluetooth_obj = nil
|
|
181
181
|
begin
|
|
182
|
-
bluetooth_obj = Meshtastic::Bluetooth.connect(address: '
|
|
182
|
+
bluetooth_obj = Meshtastic::Bluetooth.connect(address: 'AA:BB:CC:DD:EE:FF')
|
|
183
183
|
Meshtastic::Bluetooth.wait_for_config(bluetooth_obj: bluetooth_obj, timeout: 30)
|
|
184
184
|
|
|
185
185
|
Meshtastic::Bluetooth.send_text(
|
|
186
186
|
bluetooth_obj: bluetooth_obj,
|
|
187
|
-
to: '!
|
|
187
|
+
to: '!aabbccdd',
|
|
188
188
|
channel: 0,
|
|
189
189
|
text: 'Hello over BLE!',
|
|
190
190
|
want_ack: true
|
data/lib/meshtastic/version.rb
CHANGED