Meshtastic

Continuous message sending through terminal

import meshtastic
import time
interface = meshtastic.SerialInterface()
while True:
interface.sendText(“hello sir”)
time.sleep(2)
interface.sendText(“good morning”)
time.sleep(2)
interface.sendText(“how are you?”)
time.sleep(2)

I am getting this error while trying to run the above code. Why no loop structure is not working? How can I send data repetitively on the device ?

Traceback (most recent call last):
File “mesh.py”, line 3, in
interface = meshtastic.SerialInterface()
File “/usr/local/lib/python3.8/dist-packages/meshtastic/init.py”, line 731, in init
StreamInterface.init(
File “/usr/local/lib/python3.8/dist-packages/meshtastic/init.py”, line 588, in init
self.connect()
File “/usr/local/lib/python3.8/dist-packages/meshtastic/init.py”, line 603, in connect
self._waitConnected()
File “/usr/local/lib/python3.8/dist-packages/meshtastic/init.py”, line 314, in _waitConnected
raise Exception(“Timed out waiting for connection completion”)
Exception: Timed out waiting for connection completion

2 Likes

I’m using this code to do, sends a message whit time and day and also print it on the terminal. I add a python file if is necessary.

import meshtastic
import time
from pubsub import pub

def onReceive(packet, interface): # called when a packet arrives
print(f"Received: {packet}")

def onConnection(interface, topic=pub.AUTO_TOPIC): # called when we (re)connect to the radio
# defaults to broadcast, specify a destination ID if you wish

while 1:
       str = time.strftime("%a, %H:%M:%S", time.localtime())
       interface.sendText(str)
       print(time.strftime("%a, %H:%M:%S", time.localtime()))
       time.sleep(60)

pub.subscribe(onReceive, “meshtastic.receive”)
pub.subscribe(onConnection, “meshtastic.connection.established”) # By default will try to find a meshtastic device, otherwise provide a device path like /dev/ttyUSB0

interface = meshtastic.SerialInterface()

1 Like

Hmm. Do you see anything on the serial port if you press the reset button on the radio?

It seems like the python code never saw your device talking to out at startup (a good clue is that stack trace is before you called send text).

If you run “meshtastic --info” at your OS prompt, what does it say?

@folletto95 your code is giving the following syntax error:

    pub.subscribe(onReceive, “meshtastic.receive”)
                                       ^
SyntaxError: invalid character in identifier
arijit@arijit-Lenovo-G550:~$ meshtastic --info
Connected to radio
my_node_num: 3294372840
num_channels: 8
region: "1.0-EU433"
hw_model: "heltec"
firmware_version: "1.1.20"
packet_id_bits: 32
current_packet_id: 349728790
node_num_bits: 32
message_timeout_msec: 300000
min_app_version: 20120

preferences {
  ls_secs: 300
  region: EU433
}
channel_settings {
  modem_config: Bw125Cr48Sf4096
  psk: "\324\361\273: )\007Y\360\274\377\253\317Ni\277"
  name: "Default"
}

Channel URL https://www.meshtastic.org/c/#GAMiENTxuzogKQdZ8Lz_q89Oab8qB0RlZmF1bHQ=
Nodes in mesh:
{'num': 3294372840, 'user': {'id': '!240ac45c23e8', 'longName': 'Unknown 23e8', 'shortName': '?E8', 'macaddr': 'JArEXCPo'}, 'position': {}}
{'num': 3294300496, 'user': {'id': '!240ac45b0950', 'longName': 'Unknown 0950', 'shortName': '?50', 'macaddr': 'JArEWwlQ'}, 'position': {}, 'snr': 8.75}

This is the output of meshtastic --info command

It is also showing the communication using JSON format

I think you fell victim to a copypaste issue from the forum software. Your quotes include backwards quotes, python only understands the regular quote character.

1 Like

hmm - that’s puzzling, because the “meshtastic --info” is doing almost the same thing as your “interface = meshtastic.SerialInterface()” which is failing. If you directly copy the example from the readme does it work?

import meshtastic
interface = meshtastic.SerialInterface() # By default will try to find a meshtastic device, otherwise provide a device path like /dev/ttyUSB0
interface.sendText("hello mesh") # or sendData to send binary data, see documentations for other options.
interface.close()

Yes, Kevin. You are absolutely right. my bad.

1 Like

Yes, the original READ ME.md code which you have written in the github works fine now Thanks @geeksville .

1 Like

This is the (hacked together) code I use to send the current time every 30 seconds over the mesh. It uses threads and allows other code to run between the send text stuff. Just replace what’s inside def sendText(): with anything you want to do.

import meshtastic
from pubsub import pub
import threading
import time
from time import sleep
import datetime

def onReceive(packet, interface): # called when a packet arrives
  print(f"Received: {packet}")

def onConnection(interface, topic=pub.AUTO_TOPIC): # called when we (re)connect to the radio
  print ("starting...")
  rt = RepeatedTimer(30, sendText) # no need of rt.start()

def sendText(): # called every x seconds
  currTime = datetime.datetime.now().strftime("%H:%M:%S")
  interface.sendText(currTime)
  print("Message sent: " + currTime)

pub.subscribe(onReceive, "meshtastic.receive")
pub.subscribe(onConnection, "meshtastic.connection.established")
# By default will try to find a meshtastic device, otherwise provide a device path like /dev/ttyUSB0
interface = meshtastic.SerialInterface()

class RepeatedTimer(object): # Timer helper class
  def __init__(self, interval, function, *args, **kwargs):
    self._timer = None
    self.interval = interval
    self.function = function
    self.args = args
    self.kwargs = kwargs
    self.is_running = False
    self.next_call = time.time()
    self.start()

  def _run(self):
    self.is_running = False
    self.start()
    self.function(*self.args, **self.kwargs)

  def start(self):
    if not self.is_running:
      self.next_call += self.interval
      self._timer = threading.Timer(self.next_call - time.time(), self._run)
      self._timer.start()
      self.is_running = True

  def stop(self):
    self._timer.cancel()
    self.is_running = False
3 Likes

@thepoweroftwo Thank you so much, it is working very smoothly now.

1 Like

I keep losing connection between the Raspberry and the T-Beam: meshtastic --info works for a while, then spit out a “Timed out waiting for connection completion”. I then have to power-cycle the USB port (or physically disconnect and reconnect the T-Beam) for meshtastic to regain communication with the board.

Everything is up-to-date and I really don’t have a clue…

Hmm. Just double checking: while the tbeam is connected via USB - is it’s oled display staying on?

It is not! I thought the boards would always be responsive when polled through USB.

P.S.: yes, --set-router is on.

hmm - can you post a serial log (921600 baud) of the device booting up (i.e. connect serial terminal app, start logging, press reset button on device - capture the first 10ish seconds of life)

@IZ1IVA Run the following command on your terminal if you are using Linux

$screen
$screen /dev/ttyUSB0 921600 8-N-1
1 Like

I can, but it’s going to be pretty long :flushed:

It’s a 160+ KB file, so I’ve only pasted it’s head and tail. The first part is a long repetition of similar blocks, of which I have only pasted the first four or so (Head). After that some data of the configuration and network follow (Tail).

Head

¿Ä¿¿¿Ä¿¿Ä¿ÄÄ¿¿¿¿¿¿Ä¿¿ÄÄÄÄ¿¿Ä¿¿ÄÄÄ¿¿¿¿¿Ä¿ÄÄÄ¿¿Ä¿¿¿¿¿¿¿Ä¿¿¿¿¿Ä¿ÄÄ¿¿Ä¿¿Ä¿¿ÄÄ¿ÄÄÄ¿¿¿¿¿¿ÄÄ¿¿¿¿Ä¿ÄÄ¿¿¿Ä¿Ä¿Ä¿¿¿Ä¯Emitting reboot packet for serial shell
î√Hbooted, wake cause 0 (boot count 1), reset_reason=reset
Filesystem files:
/db.proto
[D][esp32-hal-i2c.c:1336] i2cProcQueue(): Busy Timeout start=0x2d, end=0x5f, =50, max=50 error=0
[E][esp32-hal-i2c.c:318] i2cDumpI2c(): i2c=0x3ffbe2d8
[I][esp32-hal-i2c.c:319] i2cDumpI2c(): dev=0x60013000 date=0x16042000
[I][esp32-hal-i2c.c:321] i2cDumpI2c(): lock=0x3ffbc234
[I][esp32-hal-i2c.c:323] i2cDumpI2c(): num=0
[I][esp32-hal-i2c.c:324] i2cDumpI2c(): mode=1
[I][esp32-hal-i2c.c:325] i2cDumpI2c(): stage=3
[I][esp32-hal-i2c.c:326] i2cDumpI2c(): error=0
[I][esp32-hal-i2c.c:327] i2cDumpI2c(): event=0x3ffbc294 bits=0
[I][esp32-hal-i2c.c:328] i2cDumpI2c(): intr_handle=0x3ffbc2c4
[I][esp32-hal-i2c.c:329] i2cDumpI2c(): dq=0x3ffbafc0
[I][esp32-hal-i2c.c:330] i2cDumpI2c(): queueCount=1
[I][esp32-hal-i2c.c:331] i2cDumpI2c(): queuePos=0
[I][esp32-hal-i2c.c:332] i2cDumpI2c(): errorByteCnt=0
[I][esp32-hal-i2c.c:333] i2cDumpI2c(): errorQueue=0
[I][esp32-hal-i2c.c:334] i2cDumpI2c(): debugFlags=0x00000000
[I][esp32-hal-i2c.c:311] i2cDumpDqData(): Debug Buffer not Enabled
[I][esp32-hal-i2c.c:354] i2cDumpInts(): Debug Buffer not Enabled
[D][esp32-hal-i2c.c:1345] i2cProcQueue(): Gross Timeout Dead start=0x6a, end=0x9c, =50, max=50 error=0
[E][esp32-hal-i2c.c:318] i2cDumpI2c(): i2c=0x3ffbe2d8
[I][esp32-hal-i2c.c:319] i2cDumpI2c(): dev=0x60013000 date=0x16042000
[I][esp32-hal-i2c.c:321] i2cDumpI2c(): lock=0x3ffbc234
[I][esp32-hal-i2c.c:323] i2cDumpI2c(): num=0
[I][esp32-hal-i2c.c:324] i2cDumpI2c(): mode=1
[I][esp32-hal-i2c.c:325] i2cDumpI2c(): stage=3
[I][esp32-hal-i2c.c:326] i2cDumpI2c(): error=0
[I][esp32-hal-i2c.c:327] i2cDumpI2c(): event=0x3ffbc294 bits=0
[I][esp32-hal-i2c.c:328] i2cDumpI2c(): intr_handle=0x3ffbc2c4
[I][esp32-hal-i2c.c:329] i2cDumpI2c(): dq=0x3ffbafc0
[I][esp32-hal-i2c.c:330] i2cDumpI2c(): queueCount=1
[I][esp32-hal-i2c.c:331] i2cDumpI2c(): queuePos=0
[I][esp32-hal-i2c.c:332] i2cDumpI2c(): errorByteCnt=-1
[I][esp32-hal-i2c.c:333] i2cDumpI2c(): errorQueue=0
[I][esp32-hal-i2c.c:334] i2cDumpI2c(): debugFlags=0x00000000
[I][esp32-hal-i2c.c:311] i2cDumpDqData(): Debug Buffer not Enabled
[I][esp32-hal-i2c.c:354] i2cDumpInts(): Debug Buffer not Enabled
[I][esp32-hal-i2c.c:1130] i2cProcQueue(): Bus busy, reinit
[D][esp32-hal-i2c.c:1336] i2cProcQueue(): Busy Timeout start=0xa7, end=0xd9, =50, max=50 error=0
[E][esp32-hal-i2c.c:318] i2cDumpI2c(): i2c=0x3ffbe2d8
[I][esp32-hal-i2c.c:319] i2cDumpI2c(): dev=0x60013000 date=0x16042000
[I][esp32-hal-i2c.c:321] i2cDumpI2c(): lock=0x3ffbc234
[I][esp32-hal-i2c.c:323] i2cDumpI2c(): num=0
[I][esp32-hal-i2c.c:324] i2cDumpI2c(): mode=1
[I][esp32-hal-i2c.c:325] i2cDumpI2c(): stage=3
[I][esp32-hal-i2c.c:326] i2cDumpI2c(): error=0
[I][esp32-hal-i2c.c:327] i2cDumpI2c(): event=0x3ffbc294 bits=0
[I][esp32-hal-i2c.c:328] i2cDumpI2c(): intr_handle=0x3ffbc2c4
[I][esp32-hal-i2c.c:329] i2cDumpI2c(): dq=0x3ffbafc0
[I][esp32-hal-i2c.c:330] i2cDumpI2c(): queueCount=1
[I][esp32-hal-i2c.c:331] i2cDumpI2c(): queuePos=0
[I][esp32-hal-i2c.c:332] i2cDumpI2c(): errorByteCnt=0
[I][esp32-hal-i2c.c:333] i2cDumpI2c(): errorQueue=0
[I][esp32-hal-i2c.c:334] i2cDumpI2c(): debugFlags=0x00000000
[I][esp32-hal-i2c.c:311] i2cDumpDqData(): Debug Buffer not Enabled
[I][esp32-hal-i2c.c:354] i2cDumpInts(): Debug Buffer not Enabled
[D][esp32-hal-i2c.c:1336] i2cProcQueue(): Busy Timeout start=0xe3, end=0x115, =50, max=50 error=0
[E][esp32-hal-i2c.c:318] i2cDumpI2c(): i2c=0x3ffbe2d8
[I][esp32-hal-i2c.c:319] i2cDumpI2c(): dev=0x60013000 date=0x16042000
[I][esp32-hal-i2c.c:321] i2cDumpI2c(): lock=0x3ffbc234
[I][esp32-hal-i2c.c:323] i2cDumpI2c(): num=0
[I][esp32-hal-i2c.c:324] i2cDumpI2c(): mode=1
[I][esp32-hal-i2c.c:325] i2cDumpI2c(): stage=3
[I][esp32-hal-i2c.c:326] i2cDumpI2c(): error=0
[I][esp32-hal-i2c.c:327] i2cDumpI2c(): event=0x3ffbc294 bits=0
[I][esp32-hal-i2c.c:328] i2cDumpI2c(): intr_handle=0x3ffbc2c4
[I][esp32-hal-i2c.c:329] i2cDumpI2c(): dq=0x3ffbafc0
[I][esp32-hal-i2c.c:330] i2cDumpI2c(): queueCount=1
[I][esp32-hal-i2c.c:331] i2cDumpI2c(): queuePos=0
[I][esp32-hal-i2c.c:332] i2cDumpI2c(): errorByteCnt=0
[I][esp32-hal-i2c.c:333] i2cDumpI2c(): errorQueue=0
[I][esp32-hal-i2c.c:334] i2cDumpI2c(): debugFlags=0x00000000
[I][esp32-hal-i2c.c:311] i2cDumpDqData(): Debug Buffer not Enabled
[I][esp32-hal-i2c.c:354] i2cDumpInts(): Debug Buffer not Enabled

Tail

[D][esp32-hal-i2c.c:1336] i2cProcQueue(): Busy Timeout start=0x1c70, end=0x1ca2, =50, max=50 error=3
[E][esp32-hal-i2c.c:318] i2cDumpI2c(): i2c=0x3ffbe2d8
[I][esp32-hal-i2c.c:319] i2cDumpI2c(): dev=0x60013000 date=0x16042000
[I][esp32-hal-i2c.c:321] i2cDumpI2c(): lock=0x3ffbc234
[I][esp32-hal-i2c.c:323] i2cDumpI2c(): num=0
[I][esp32-hal-i2c.c:324] i2cDumpI2c(): mode=1
[I][esp32-hal-i2c.c:325] i2cDumpI2c(): stage=3
[I][esp32-hal-i2c.c:326] i2cDumpI2c(): error=3
[I][esp32-hal-i2c.c:327] i2cDumpI2c(): event=0x3ffbc294 bits=0
[I][esp32-hal-i2c.c:328] i2cDumpI2c(): intr_handle=0x3ffbc2c4
[I][esp32-hal-i2c.c:329] i2cDumpI2c(): dq=0x3ffbafc0
[I][esp32-hal-i2c.c:330] i2cDumpI2c(): queueCount=1
[I][esp32-hal-i2c.c:331] i2cDumpI2c(): queuePos=0
[I][esp32-hal-i2c.c:332] i2cDumpI2c(): errorByteCnt=0
[I][esp32-hal-i2c.c:333] i2cDumpI2c(): errorQueue=0
[I][esp32-hal-i2c.c:334] i2cDumpI2c(): debugFlags=0x00000000
[I][esp32-hal-i2c.c:311] i2cDumpDqData(): Debug Buffer not Enabled
[I][esp32-hal-i2c.c:354] i2cDumpInts(): Debug Buffer not Enabled
[W][esp32-hal-i2c.c:1411] i2cCheckLineState(): invalid state sda(21)=1, scl(22)=0
[D][esp32-hal-i2c.c:1419] i2cCheckLineState(): Recovered after 1 Cycles
[E][esp32-hal-i2c.c:1426] i2cCheckLineState(): Bus Invalid State, TwoWire() Can’t init sda=1, scl=0
No I2C devices found
Meshtastic swver=1.1.23, hwver=1.0-EU865
Setting random seed 1693439411
Total heap: 255616
Free heap: 223508
Total PSRAM: 4194252
Free PSRAM: 4194252
NVS: UsedEntries 85, FreeEntries 545, AllEntries 630
AXP192 not found
Read RTC time as 7 (cur millis 7354) quality=0
WANT GPS=1
Setting GPS power=1
Connected to UBLOX GPS successfully
Setting default preferences!
Expanding short PSK #1
Installing AES128 key!
Wanted region 0, using Unset
Initial packet id 917108237, numPacketId 4294967295
Loading saved preferences
Loaded saved preferences version 11
Expanding short PSK #1
Installing AES128 key!
Wanted region 3, using EU865
legacy_region=1.0-EU865, region=3, NODENUM=0x1c637fec, dbsize=2
Starting meshradio init…
(bw=125, sf=12, cr=4/8) packet symLen=32 ms, payloadSize=16, time 2269 ms
Set radio: name=LongSlow, config=3, ch=6, power=0
Radio myRegion->freq: 865.200012
Radio myRegion->spacing: 0.300000
Radio myRegion->numChannels: 10
Radio channel_num: 6
Radio frequency: 867.000000
Short packet time: 2269 msec
Set radio: final power level=17
RF95 init result 0
PowerFSM init, USB power=0
[D][esp32-hal-cpu.c:189] setCpuFrequencyMhz(): PLL: 320 / 4 = 80 Mhz, APB: 80000000 Hz
publishing GPS lock=0
No GPS lock
WARNING: Using fixed position
got gps notify time=453837000, lat=0, bat=0
DB update position node=0x1c637fec time=0, latI=453837000, lonI=77106000
Node status update: 2 online, 2 total
Sending position to mesh (wantReplies=1)
Update DB node 0x1c637fec, rx_time=0
Received position from=0x1c637fec, id=0x36a9f610, payloadlen=14
DB update position node=0x1c637fec time=0, latI=453837000, lonI=77106000
Node status update: 2 online, 2 total
Sending response
Update DB node 0x1c637fec, rx_time=0
Received position from=0x1c637fec, id=0x36a9f611, payloadlen=14
DB update position node=0x1c637fec time=0, latI=453837000, lonI=77106000
Node status update: 2 online, 2 total
Plugin position handled=0
Enqueuing local (id=0x36a9f611 Fr0xec To0xec, WantAck0, HopLim3 Portnum=3)
Plugin position handled=0
Rebroadcasting received floodmsg to neighbors (id=0x36a9f610 Fr0xec To0xff, WantAck0, HopLim3 Portnum=3 WANTRESP)
enqueuing for send (id=0x36a9f610 Fr0xec To0xff, WantAck0, HopLim2 encrypted)
(bw=125, sf=12, cr=4/8) packet symLen=32 ms, payloadSize=38, time 3416 ms
txGood=0,rxGood=0,rxBad=0
FIXME-update-db Sniffing packet
Delivering rx packet (id=0x36a9f610 Fr0xec To0xff, WantAck0, HopLim3 Portnum=3 WANTRESP)
Trigger powerFSM 3
Forwarding to phone (id=0x36a9f610 Fr0xec To0xff, WantAck0, HopLim3 Portnum=3 WANTRESP)
Update DB node 0x1c637fec, rx_time=0
Received position from=0x1c637fec, id=0x36a9f610, payloadlen=14
DB update position node=0x1c637fec time=0, latI=453837000, lonI=77106000
Node status update: 2 online, 2 total
Sending response
Update DB node 0x1c637fec, rx_time=0
Received position from=0x1c637fec, id=0x36a9f612, payloadlen=14
DB update position node=0x1c637fec time=0, latI=453837000, lonI=77106000
Node status update: 2 online, 2 total
Plugin position handled=0
Enqueuing local (id=0x36a9f612 Fr0xec To0xec, WantAck0, HopLim3 Portnum=3)
Plugin position handled=0
Adding packet record (id=0x36a9f610 Fr0xec To0xff, WantAck0, HopLim3 Portnum=3 WANTRESP)
enqueuing for send (id=0x36a9f610 Fr0xec To0xff, WantAck0, HopLim3 encrypted)
(bw=125, sf=12, cr=4/8) packet symLen=32 ms, payloadSize=38, time 3416 ms
txGood=0,rxGood=0,rxBad=0
Telling client we have new packets 1
Adding packet record (id=0x36a9f611 Fr0xec To0xec, WantAck0, HopLim3 Portnum=3)
FIXME not implemented addRoute
FIXME-update-db Sniffing packet
Delivering rx packet (id=0x36a9f611 Fr0xec To0xec, WantAck0, HopLim3 Portnum=3)
Trigger powerFSM 3
Forwarding to phone (id=0x36a9f611 Fr0xec To0xec, WantAck0, HopLim3 Portnum=3)
Update DB node 0x1c637fec, rx_time=0
Received position from=0x1c637fec, id=0x36a9f611, payloadlen=14
DB update position node=0x1c637fec time=0, latI=453837000, lonI=77106000
Node status update: 2 online, 2 total
Plugin position handled=0
Adding packet record (id=0x36a9f612 Fr0xec To0xec, WantAck0, HopLim3 Portnum=3)
FIXME not implemented addRoute
FIXME-update-db Sniffing packet
Delivering rx packet (id=0x36a9f612 Fr0xec To0xec, WantAck0, HopLim3 Portnum=3)
Trigger powerFSM 3
Forwarding to phone (id=0x36a9f612 Fr0xec To0xec, WantAck0, HopLim3 Portnum=3)
Update DB node 0x1c637fec, rx_time=0
Received position from=0x1c637fec, id=0x36a9f612, payloadlen=14
DB update position node=0x1c637fec time=0, latI=453837000, lonI=77106000
Node status update: 2 online, 2 total
Plugin position handled=0
Telling client we have new packets 3
Setting RTC 1608555533 secs
Read RTC time as 1608555533 (cur millis 9385) quality=2
publishing GPS lock=0
No GPS lock
WARNING: Using fixed position
got gps notify time=453837000, lat=1608555533, bat=0
DB update position node=0x1c637fec time=1608555533, latI=453837000, lonI=77106000
Node status update: 1 online, 2 total
Starting low level send (id=0x36a9f610 Fr0xec To0xff, WantAck0, HopLim2 encrypted)
Transition powerFSM transition=boot timeout, from=BOOT to=ON
Setting bluetooth enable=1
Pre BT: 215084 heap size
Starting bluetooth
BLE task running
registered service 0x1800 with handle=1
registered service 0x1801 with handle=6
registered service 6ba1b218-15a8-461f-9fa8-5dcae273eafd with handle=10
registered service cb0b9a0b-a84c-4c0d-bdbb-442e3144ee30 with handle=18
BLE advertisting type=0, Private=0, Device Address: c5:10:52:1c:63:7f

Completed sending (id=0x36a9f610 Fr0xec To0xff, WantAck0, HopLim2 encrypted)
Starting low level send (id=0x36a9f610 Fr0xec To0xff, WantAck0, HopLim3 encrypted)
Completed sending (id=0x36a9f610 Fr0xec To0xff, WantAck0, HopLim3 encrypted)
Sending our nodeinfo to mesh (wantReplies=1)
sending owner !10521c637fec/Castellamonte/Cst
Update DB node 0x1c637fec, rx_time=1608555562
Received nodeinfo from=0x1c637fec, id=0x36a9f613, payloadlen=43
old user !10521c637fec/Castellamonte/Cst
updating changed=0 user !10521c637fec/Castellamonte/Cst
sending owner !10521c637fec/Castellamonte/Cst
Sending response
Update DB node 0x1c637fec, rx_time=1608555562
Received nodeinfo from=0x1c637fec, id=0x36a9f614, payloadlen=43
old user !10521c637fec/Castellamonte/Cst
updating changed=0 user !10521c637fec/Castellamonte/Cst
Plugin nodeinfo handled=0
Enqueuing local (id=0x36a9f614 Fr0xec To0xec, WantAck0, HopLim3 Portnum=4 rxtime=1608555562)
Plugin nodeinfo handled=0
Rebroadcasting received floodmsg to neighbors (id=0x36a9f613 Fr0xec To0xff, WantAck0, HopLim3 Portnum=4 WANTRESP rxtime=1608555562)
enqueuing for send (id=0x36a9f613 Fr0xec To0xff, WantAck0, HopLim2 encrypted rxtime=1608555562)
(bw=125, sf=12, cr=4/8) packet symLen=32 ms, payloadSize=67, time 4956 ms
txGood=2,rxGood=0,rxBad=0
FIXME-update-db Sniffing packet
Delivering rx packet (id=0x36a9f613 Fr0xec To0xff, WantAck0, HopLim3 Portnum=4 WANTRESP rxtime=1608555562)
Trigger powerFSM 3
Forwarding to phone (id=0x36a9f613 Fr0xec To0xff, WantAck0, HopLim3 Portnum=4 WANTRESP rxtime=1608555562)
Update DB node 0x1c637fec, rx_time=1608555562
Received nodeinfo from=0x1c637fec, id=0x36a9f613, payloadlen=43
old user !10521c637fec/Castellamonte/Cst
updating changed=0 user !10521c637fec/Castellamonte/Cst
sending owner !10521c637fec/Castellamonte/Cst
Sending response
Update DB node 0x1c637fec, rx_time=1608555562
Received nodeinfo from=0x1c637fec, id=0x36a9f615, payloadlen=43
old user !10521c637fec/Castellamonte/Cst
updating changed=0 user !10521c637fec/Castellamonte/Cst
Plugin nodeinfo handled=0
Enqueuing local (id=0x36a9f615 Fr0xec To0xec, WantAck0, HopLim3 Portnum=4 rxtime=1608555562)
Plugin nodeinfo handled=0
Adding packet record (id=0x36a9f613 Fr0xec To0xff, WantAck0, HopLim3 Portnum=4 WANTRESP rxtime=1608555562)
enqueuing for send (id=0x36a9f613 Fr0xec To0xff, WantAck0, HopLim3 encrypted rxtime=1608555562)
(bw=125, sf=12, cr=4/8) packet symLen=32 ms, payloadSize=67, time 4956 ms
txGood=2,rxGood=0,rxBad=0
Telling client we have new packets 4
Telling client we have new packets 4
No BLE notify
Adding packet record (id=0x36a9f614 Fr0xec To0xec, WantAck0, HopLim3 Portnum=4 rxtime=1608555562)
FIXME not implemented addRoute
FIXME-update-db Sniffing packet
Delivering rx packet (id=0x36a9f614 Fr0xec To0xec, WantAck0, HopLim3 Portnum=4 rxtime=1608555562)
Trigger powerFSM 3
Forwarding to phone (id=0x36a9f614 Fr0xec To0xec, WantAck0, HopLim3 Portnum=4 rxtime=1608555562)
Update DB node 0x1c637fec, rx_time=1608555562
Received nodeinfo from=0x1c637fec, id=0x36a9f614, payloadlen=43
old user !10521c637fec/Castellamonte/Cst
updating changed=0 user !10521c637fec/Castellamonte/Cst
Plugin nodeinfo handled=0
Adding packet record (id=0x36a9f615 Fr0xec To0xec, WantAck0, HopLim3 Portnum=4 rxtime=1608555562)
FIXME not implemented addRoute
FIXME-update-db Sniffing packet
Delivering rx packet (id=0x36a9f615 Fr0xec To0xec, WantAck0, HopLim3 Portnum=4 rxtime=1608555562)
Trigger powerFSM 3
Forwarding to phone (id=0x36a9f615 Fr0xec To0xec, WantAck0, HopLim3 Portnum=4 rxtime=1608555562)
Update DB node 0x1c637fec, rx_time=1608555562
Received nodeinfo from=0x1c637fec, id=0x36a9f615, payloadlen=43
old user !10521c637fec/Castellamonte/Cst
updating changed=0 user !10521c637fec/Castellamonte/Cst
Plugin nodeinfo handled=0
Telling client we have new packets 6
Telling client we have new packets 6
No BLE notify
Starting low level send (id=0x36a9f613 Fr0xec To0xff, WantAck0, HopLim2 encrypted rxtime=1608555562)
Completed sending (id=0x36a9f613 Fr0xec To0xff, WantAck0, HopLim2 encrypted rxtime=1608555562)
Starting low level send (id=0x36a9f613 Fr0xec To0xff, WantAck0, HopLim3 encrypted rxtime=1608555562)
Completed sending (id=0x36a9f613 Fr0xec To0xff, WantAck0, HopLim3 encrypted rxtime=1608555562)
Transition powerFSM transition=Screen-on timeout, from=ON to=DARK
Transition powerFSM transition=Bluetooth timeout, from=DARK to=LS
lsEnter begin, ls_secs=86400
lsEnter end
Setting bluetooth enable=0
advertise complete; reason=29error enabling advertisement; rc=30
Done shutting down bluetooth
Shutdown BT: 228756 heap size
GPS prepare sleep!

Thanks, I’ve installed screen and enabled logging. Still trying to figure out how to use it :thinking:

I did something like this:

uhubctl -l 1-1 -p 2 -a 2 && sleep 1 && screen -L /dev/ttyUSB0 921600 8-N-1

Oh that had what I needed.

The “axp192 not found” was key. Something is busted with either that chip or the i2c bus. Without that chip we can’t get charge/power info so it never realizes we are powered by USB.

I’ll make a bug to change that failure into a fault message we show on the screen.

I see… but then I get the same behaviour with LoRa32 boards, which AFAIK don’t have that chip.

I’ve checked all my boards, that is two T-Beams (one reports a working AXP192) and two LoRa32 and they all shut down the display and USB communication after a while. IIRC, that wasn’t the case with earlier firmwares. I’d better try older firmware revisions to check if my memory is correct.

1 Like