LXMF Basic Question #46
-
Hi all, actually I'm struggling with getting LXMF to work. Here a code snippet that seems to work except the message sent is never delivered.
within the level 7 log the following appears endlessly:
So it seem everything is well. How ever, the delivery callback gets never called. I tried a more coplex example sending a message accross a single hop. I guess there is something essential missing in my understanding, but what? Any help would be appreciated. Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Some insights I gained. To send a message something like this is required:
DIRECT instructs LXMF to use Link to transport the message. With that larger messages are possible as with OPORTUNISTIC. The both destination objects are required. It would be very helpful if we could create a RNS.Destination object from a given Identity and Destination Hash and/or the message function would accept hash/id OR a fully set up destination object for both destinations. With that snippet the log came to live with way more information about the transport beeing processed then before. How ever, the delivery callback still gets called only if assigned to a message and not to the router. Question: Cheers |
Beta Was this translation helpful? Give feedback.
-
I am going to just paste the answer here, that I wrote as a reply to your issue #4 on LXMF, since it is the most clear answer to this :) |
Beta Was this translation helpful? Give feedback.
-
This is working as intended ;) Until globally routed multicast is implemented in Reticulum, the only way to send LXMs to GROUP destination is via propagation nodes: lxmessage = LXMF.LXMessage(
destination=destination_to1,
source=destination_from,
content=message_text,
title=message_title,
desired_method=LXMF.LXMessage.PROPAGATED
)
lxrouter = LXMF.LXMRouter(storagepath=LXMF_STORAGE_PATH)
lxrouter.set_outbound_propagation_node(bytes.fromhex("3308bc1aa72e9761fca2")) Produces the following result:
This is all more or less impossible to figure out without the LXMF documentation being published, so I'm impressed you made it that far ;) In general there is a lot of things related to group messaging that is not completely ready yet, and that is why you are running into all those problems and the other errors you reported. Give it a month or so, and it will be there, with a well documented API. Until the it's gonna be a bit rough sailing, and things might very well change API wise during that time ;) |
Beta Was this translation helpful? Give feedback.
-
TLDR: In general there is a lot of things related to group messaging that is not completely ready yet. Give it a month or so, and it will be there, with a well documented API. Until the it's gonna be a bit rough sailing, and things might very well change API wise during that time. |
Beta Was this translation helpful? Give feedback.
-
Just to complete the answer how to receive LXMF messages: To get a delivery receipt that the message has been successfully delivered one needs to register a delivery callback with the message sent like this:
The registered handler may look like this:
To get a Callback in case a message is delivered to a destination one need to register a proper Link handler to the destination like this:
That link handler then (at least) needs to set a appropriate resource strategy and a packet handler to digest the received resource.
This works nicely if the message does not exceed the capacity of a single RNS Packet. To retrieve the message content you need to read and process that file. |
Beta Was this translation helpful? Give feedback.
This is working as intended ;) Until globally routed multicast is implemented in Reticulum, the only way to send LXMs to GROUP destination is via propagation nodes:
Produces the following result: