This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thread MQTT-SN Example publish and subscribe can not combine operations

Hi Nordic Team:

1.  I use this example "Thread MQTT-SN Example".

after i compile the code than i do the step below

1.Build the example according to the instructions in Building examples.
2.Turn the MQTT-SN gateway on according to the instructions in Thread Border Router.
3.Program a development board with the MQTT-SN Subscriber application.
4.Program another development board with the MQTT-SN Publisher application.
5.Let the clients find the MQTT-SN gateway by pressing Button 2 on both boards.

one of the FTD get kick out , when i do the 5 step

and the error message show up
"0> <error> app: Message of unsupported type has been received.
0>
0> <error> app: MQTT-SN message could not be processed."

Use one device of the MQTT-SN Subscriber application and other one device of the MQTT-SN Publisher application. (one publish device, one subscribe device)

I get the message_type is 1.

so the border router seems to be can only connect to one FTD

if i connect two devices in the same time one of FTD will be kick of

is there any reason may cause that? Or i miss some step need to be done?

2. if using two subscribers well the same problems too. do you have any advice that can solve the problems of two subscribers? Pls kindly help advise how to solve it?

3.I follow the WEB steps below Playing with Thread and MQTT-SN on Nordic nRF52840, I follow the WEB steps below Playing with Thread and MQTT-SN on Nordic nRF52840, Now I have two devices, wanted to combine operations publish and subscribe at the same time in the device.
Pls kindly help advise how to solve it?

Best Regards,

Rick.

Parents
  • Hi again,

    Here is a combined example that supports both publishing and subscribing to topics (modified in mqttsn_client_subscriber).

    • Press button 2 to search for GW.
    • Press button 3 to connect to the GW.
    • Press button 4 to subscribe to the topic.
    • Press button 1 to publish to the topic.

    Best regards,
    Jørgen

  • Hi Jørgen,
    Thank you for your reply.

    1. Can this combined example support two devices at the same time?
    If using only one device, it can work, but using two devices, it will display "message could not be processed" error.
    this is my step.
    a) device A subscribe to the topic of device B publish
    b) device B subscribe to the topic of device A publish
    c) device A Press button 2 to search for GW.
    d) device B Press button 2 to search for GW.
    e) device A will display "message could not be processed" error
    Pls kindly help advise how to solve it?

    2. you say "I tested this on my end, and I am seeing the same behavior. I believe that the unhandled event message happens because the second board is in a state where it does not expect to receive this event when the first board does a Gateway search. The examples are most likely not written with multiple publishers in mind." from "Thread Border Router networking fail", now I just search for GW, it display "message could not be processed" error.
    Pls kindly help advise how to solve it?

    Best Regards,

    Rick.

Reply
  • Hi Jørgen,
    Thank you for your reply.

    1. Can this combined example support two devices at the same time?
    If using only one device, it can work, but using two devices, it will display "message could not be processed" error.
    this is my step.
    a) device A subscribe to the topic of device B publish
    b) device B subscribe to the topic of device A publish
    c) device A Press button 2 to search for GW.
    d) device B Press button 2 to search for GW.
    e) device A will display "message could not be processed" error
    Pls kindly help advise how to solve it?

    2. you say "I tested this on my end, and I am seeing the same behavior. I believe that the unhandled event message happens because the second board is in a state where it does not expect to receive this event when the first board does a Gateway search. The examples are most likely not written with multiple publishers in mind." from "Thread Border Router networking fail", now I just search for GW, it display "message could not be processed" error.
    Pls kindly help advise how to solve it?

    Best Regards,

    Rick.

Children
No Data
Related