python icon indicating copy to clipboard operation
python copied to clipboard

Dropping last message sent in send text commands

Open un-creatrix opened this issue 1 month ago • 1 comments

When I run this segment of code every item in the list is executed even printed out in the statement, however the last message in the array is always never arrives to the other node as if it is being dropped by the node or middle script.

The node I am using is the Heltec V4 and over serial although when tried over TCP behavior does not change.

un-creatrix avatar Nov 20 '25 19:11 un-creatrix

if I could get help to understand why this maybe happening in this code segment it would be greatly helpful

def lora_send_toUser(node, response):
    message_max = 200
    print(response)
    for message in response:
        for c in range(0, len(message), message_max):
            Segment = message[c:c+message_max]
            Radio_1.sendText(
                str(Segment),
                int(node),
                wantAck=True,
                wantResponse=False,
                channelIndex=20,
            )
            time.sleep(1.4)
            log.event("MESH", 0, "Message sent to "+str(node))

un-creatrix avatar Nov 20 '25 19:11 un-creatrix