Meshtastic --test fails on Lilygo ttgo v2

Running meshtastic --test with both nodes plugged in via USB, I see:

ERROR:root:Test 1 failed, expected packet not received (1 failures so far)
... (all of them fail if I let it run) ...

I was hoping to have a better way to confirm these are able to communicate.

I’m running meshtastic-device built from GitHub, sha 334e14ea4d9de8c332aac453899255c3e68d613a

I’ve also been unable to do a “smoke test” where I set Meshtastic-python to send messages on one node connected via USB, and watch for them while my phone (w/ app) is connected to the other node.

All this suggests that messages aren’t actually going back and forth. Is there any other way to debug this? And maybe something obvious to fix?

can you paste the output of each device for: meshtastic --info

anonymize any identifying information as needed.

First: (had lat/long/alt hardcoded in with meshtastic tool, intended to act as a “base station”)

Connected to radio

Owner: mathiasx2 (mth)

My info: { "myNodeNum": 632413544, "numBands": 13, "firmwareVersion": "1.2.46.334e14e-d", "rebootCount": 34, "messageTimeoutMsec": 300000, "minAppVersion": 20200, "maxChannels": 8 }

Nodes in mesh:
  {'num': 632413544, 'user': {'id': '!25b1dd68', 'longName': 'mathiasx2', 'shortName': 'mth', 'macaddr': 'THUlsd1o', 'hwModel': 'TLORA_V2_1_1p6'}, 'position': {'latitudeI': REDACT, 'longitudeI': -REDACT, 'altitude': 205, 'batteryLevel': 74, 'latitude': REDACT, 'longitude': REDACT}}
  {'num': 632414276, 'user': {'id': '!25b1e044', 'longName': 'mathiasx', 'shortName': 'mth', 'macaddr': 'THUlseBE', 'hwModel': 'TLORA_V2_1_1p6', 'raw': id: "!25b1e044" long_name: "mathiasx" short_name: "mth" macaddr: "Lu%\261\340D" hw_model: TLORA_V2_1_1p6 }, 'position': {'raw': }, 'lastHeard': None, 'snr': 9.5, 'lastReceived': {'from': 632414276, 'to': 4294967295, 'decoded': {'portnum': 'NODEINFO_APP', 'payload': b'\n\t!25b1e044\x12\x08mathiasx\x1a\x03mth"\x06Lu%\xb1\xe0D0\x03', 'user': {'id': '!25b1e044', 'longName': 'mathiasx', 'shortName': 'mth', 'macaddr': 'THUlseBE', 'hwModel': 'TLORA_V2_1_1p6', 'raw': id: "!25b1e044" long_name: "mathiasx" short_name: "mth" macaddr: "Lu%\261\340D" hw_model: TLORA_V2_1_1p6 }}, 'id': 1203901101, 'rxSnr': 9.5, 'hopLimit': 3, 'raw': from: 632414276 to: 4294967295 decoded { portnum: NODEINFO_APP payload: "\n\t!25b1e044\022\010mathiasx\032\003mth\"\006Lu%\261\340D0\003" } id: 1203901101 rx_snr: 9.5 hop_limit: 3 , 'fromId': '!25b1e044', 'toId': '^all'}, 'hopLimit': 3}

Preferences: { "waitBluetoothSecs": 3600, "phoneTimeoutSecs": 900, "lsSecs": 300, "fixedPosition": true }

Channels:
  PRIMARY psk=default { "modemConfig": "Bw125Cr48Sf4096", "psk": "AQ==" }

Primary channel URL: https://www.meshtastic.org/d/#CgUYAyIBAQ

Second:

Connected to radio

Owner: mathiasx (mth)

My info: { "myNodeNum": 632414276, "numBands": 13, "firmwareVersion": "1.2.46.334e14e-d", "rebootCount": 17, "messageTimeoutMsec": 300000, "minAppVersion": 20200, "maxChannels": 8 }

Nodes in mesh:
  {'num': 632414276, 'user': {'id': '!25b1e044', 'longName': 'mathiasx', 'shortName': 'mth', 'macaddr': 'THUlseBE', 'hwModel': 'TLORA_V2_1_1p6'}, 'position': {'batteryLevel': 67}, 'lastHeard': 1636563753}
  {'num': 632413544, 'user': {'id': '!25b1dd68', 'longName': 'mathiasx2', 'shortName': 'mth', 'macaddr': 'THUlsd1o', 'hwModel': 'TLORA_V2_1_1p6', 'raw': id: "!25b1dd68" long_name: "mathiasx2" short_name: "mth" macaddr: "Lu%\261\335h" hw_model: TLORA_V2_1_1p6 }, 'position': {'latitudeI': REDACT, 'longitudeI': -REDACT, 'raw': latitude_i: REDACT longitude_i: -REDACT , 'latitude': REDACT, 'longitude': -REDACT}, 'lastHeard': None, 'snr': 10.75, 'lastReceived': {'from': 632413544, 'to': 4294967295, 'decoded': {'portnum': 'NODEINFO_APP', 'payload': b'\n\t!25b1dd68\x12\tmathiasx2\x1a\x03mth"\x06Lu%\xb1\xddh0\x03', 'user': {'id': '!25b1dd68', 'longName': 'mathiasx2', 'shortName': 'mth', 'macaddr': 'THUlsd1o', 'hwModel': 'TLORA_V2_1_1p6', 'raw': id: "!25b1dd68" long_name: "mathiasx2" short_name: "mth" macaddr: "Lu%\261\335h" hw_model: TLORA_V2_1_1p6 }}, 'id': 1602078082, 'rxSnr': 10.75, 'hopLimit': 3, 'raw': from: 632413544 to: 4294967295 decoded { portnum: NODEINFO_APP payload: "\n\t!25b1dd68\022\tmathiasx2\032\003mth\"\006Lu%\261\335h0\003" } id: 1602078082 rx_snr: 10.75 hop_limit: 3 , 'fromId': '!25b1dd68', 'toId': '^all'}, 'hopLimit': 3}

Preferences: { "waitBluetoothSecs": 1200, "phoneTimeoutSecs": 900, "lsSecs": 300 }

Channels:
  PRIMARY psk=default { "modemConfig": "Bw125Cr48Sf4096", "psk": "AQ==" }

Primary channel URL: https://www.meshtastic.org/d/#CgUYAyIBAQ

both devices are listed in “Nodes in mesh”, so they were able to communicate before, which is good.

there is no region set on either device in “Preferences”, check that.

what frequency are you using?

They’re 915mhz. I don’t see anything in the Meshtastic docs about setting a region, so I assumed that was automatic. How would I set it from Meshtastic-python?

This looks like I’m on the right track, after finding a mention of --set region xyz in the releases changelog. But I don’t know what the valid settings are:

$ meshtastic --get region
Connected to radio
region: 0
Completed getting preferences

strange, the app should’ve warned you to set a region. via python CLI run something like: meshtastic --set region US

full list of arguments:

Thanks! I’ve set the region.
I am using the iOS app and it is possible that it doesn’t prompt for setting the region yet.

Re-running the --test still shows packet failures:

Connection changed: meshtastic.connection.established
ERROR:root:Test 1 failed, expected packet not received (1 failures so far)
ERROR:root:Test 2 failed, expected packet not received (2 failures so far)
etc

my understanding is the --test parameter is more of an advanced tool for stress testing. never really used it.

does meshtastic --nodes show you a list of devices all with recent “LastHeard”/“Since” times (under few minutes ago)?

if yes, they are able to communicate and should be working.

Fair enough — I see messages on the second node’s screen now.

Is there any way to use the meshtastic CLI app to post text in Primary channel? If I use —sendtext on the node connected to my computer, it does not appear on the mobile app. The Python example code similarly says it is sending text, but it doesn’t appear.

yes. --sendtext should default to primary channel. try using --ch-index 0.

for testing I use the RangeTest plugin to send numbered messages every 60 seconds with: meshtastic --set range_test_plugin_enabled 1 --set range_test_plugin_sender 60

must restart the device to take effect.

to disable: meshtastic --set range_test_plugin_enabled 0

see if that works.

After doing more testing, I am going to have to assume that it is the iOS app that doesn’t work – sending or receiving. Getting the python example to wait for received messages and sending a message from iOS, I never see it come across.

The nodes are sending messages back and forth as far as their screens, but that’s very hard to test with and can’t be used beyond testing things from my laptop.