Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Response on TCP connection. #24

Open
ItsNix opened this issue Jun 29, 2024 · 11 comments
Open

No Response on TCP connection. #24

ItsNix opened this issue Jun 29, 2024 · 11 comments

Comments

@ItsNix
Copy link

ItsNix commented Jun 29, 2024

Running on Docker with a node attached to wifi.

I can see the incoming messages but do not get a response on my Meshtastic node.

2024-06-29 08:45:39,997 - INFO - TC²-BBS is running on tcp interface...
2024-06-29 08:46:17,076 - INFO - Received message from user 'AsMo' to MDev: Hello
2024-06-29 08:47:06,939 - INFO - Received message from user 'AsMo' to MDev: ?
2024-06-29 08:48:21,796 - INFO - TC²-BBS is running on tcp interface...
2024-06-29 08:48:36,358 - INFO - Received message from user 'AsMo' to MDev: Check
2024-06-29 08:53:14,803 - INFO - Received message from user 'AsMo' to MDev: 1
2024-06-29 08:55:24,414 - INFO - Received message from user 'AsMo' to MDev: m
2024-06-29 08:55:31,128 - INFO - Received message from user 'AsMo' to MDev: M
2024-06-29 08:59:32,264 - INFO - Received message from user 'AsMo' to MDev: 0
2024-06-29 09:00:27,374 - INFO - Received message from user 'AsMo' to MDev: h
2024-06-29 09:00:37,591 - INFO - Received message from user 'AsMo' to MDev: H
2024-06-29 09:04:27,300 - INFO - Received message from user 'AsMo' to MDev: F
2024-06-29 09:04:34,586 - INFO - Received message from user 'AsMo' to MDev: W

I will keep tinkering but any guidance is welcomed.

@TheCommsChannel
Copy link
Owner

I've not done much testing with TCP, but seems like many others are having issues as well. Recommend serial only for now.

@ronnietucker
Copy link

I've not done much testing with TCP, but seems like many others are having issues as well. Recommend serial only for now.

I'm going to leave TCP running on mine for today and see if I can get others nearby to give it a test run.

@Craig-Hz
Copy link

I had success using Serial via TCP with a T3S3 but no luck using TCP with a Station G2 Nano.

@Phlat
Copy link

Phlat commented Jun 29, 2024

I'm using a WaveShare LoraWan Hat on a Raspberry Pi running Meshtasticd. The BBS is mostly working over TCP but of course there is not a Main help menu response to a direct message and only some of the commands work. I get Meshtastic API interface errors. It may have something to do with the pubsub topic. Unexpected error in deferred execution <class 'pubsub.core.topicargspec.SenderUnknownMsgDataError'>

@typicalaimster
Copy link

typicalaimster commented Jun 29, 2024

@Phlat try changing def receive_packet(packet) to def receive_packet(packet, interface) in server.py (Line 60). Seems like a bug there.

@Phlat
Copy link

Phlat commented Jun 29, 2024

Interesting that I no longer get that specific error however it does not fix the TCP issue. Still no reply to hello.

I switched to a Heltec Lora32 on the usb port, changed configs. It does produce the hello menu as before, however there are more bugs. The F fortune always works however sending a Hello throws an error:
2024-06-29 14:28:27,889 - INFO - Received message from user '4TWO' to YBBS: F
2024-06-29 14:29:12,296 - INFO - Received message from user '4TWO' to YBBS: Hello
2024-06-29 14:29:12,297 - ERROR - Unexpected error in deferred execution <class 'ValueError'>
Traceback (most recent call last):
File "/home/cms/TC2-BBS-mesh/venv/lib/python3.11/site-packages/meshtastic/util.py", line 283, in _run
o()
File "/home/cms/TC2-BBS-mesh/venv/lib/python3.11/site-packages/meshtastic/mesh_interface.py", line 1176, in
lambda: pub.sendMessage(topic, packet=asDict, interface=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cms/TC2-BBS-mesh/venv/lib/python3.11/site-packages/pubsub/core/publisher.py", line 216, in sendMessage
topicObj.publish(**msgData)
File "/home/cms/TC2-BBS-mesh/venv/lib/python3.11/site-packages/pubsub/core/topicobj.py", line 452, in publish
self.__sendMessage(msgData, topicObj, msgDataSubset)
File "/home/cms/TC2-BBS-mesh/venv/lib/python3.11/site-packages/pubsub/core/topicobj.py", line 482, in __sendMessage
listener(data, self, allData)
File "/home/cms/TC2-BBS-mesh/venv/lib/python3.11/site-packages/pubsub/core/listener.py", line 237, in call
cb(**kwargs)
File "/home/cms/TC2-BBS-mesh/server.py", line 61, in receive_packet
on_receive(packet, interface)
File "/home/cms/TC2-BBS-mesh/message_processing.py", line 92, in on_receive
process_message(sender_id, message_string, interface, is_sync_message=False)
File "/home/cms/TC2-BBS-mesh/message_processing.py", line 62, in process_message
handle_stats_steps(sender_id, message, step, interface, bbs_nodes)
File "/home/cms/TC2-BBS-mesh/command_handlers.py", line 108, in handle_stats_steps
choice = int(choice)
^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'HELLO'

2024-06-29 14:29:53,455 - INFO - Received message from user '4TWO' to YBBS: F`

@typicalaimster
Copy link

Interesting as I've had no problems TCP to both a T-Beam, Portdruno, and Radio Master.

@TyMi
Copy link

TyMi commented Jun 30, 2024

+1
Same here on a WSL(V3). Receiving all messages via TCP but (nearly) no response is sent out.
I had a bit more replies disabling meshtastic MQTT on WSL(V3) node. But far away from 100%...
Beside the already in other issues communicated errors, no specific error is raised after receiving and not sending reply.

@Phlat
Copy link

Phlat commented Jun 30, 2024 via email

This was referenced Jul 2, 2024
@chicagolandmesh
Copy link

I just wanted to add that TCP works fine for me (Tested using an Ubuntu VM and on Docker). The only thing that breaks it is if you reboot your node, then it won't automatically reconnect. Maybe if that could be fixed then TCP would work just a bit better. Thanks

@rj45jack
Copy link

I am having this problem, it might be related to this "Issue".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants