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

Distance for the Node to connect to the gateway MQTT-SN ?

Hi all,

I have a question.

When I try send message coap, it can send as mesh network.

But when I send search gateway msg, connect msg from publish (subscribe) Node to NCP. Seem it can't send as mesh network. I have to put Node in the coverage area of ​​NCP then it can discovery and connect to Gateway. If I put NCP --> Node 1 --> Node 2 in a straight line. Node 1 can connect to mqtt gateway, but node 2 can't . But I can ping from Node 2 to Node 1 and NCP. 

If I connect Node1 and Node 2 to MQTT gateway and put NCP --> Node 1 --> Node 2 in a straight line. I can send data from Node 1 and Node 2 to NCP as mesh network. 

I check message type of discovery and connect message. I saw it same with coap message. They are all used otUdpSend.

So Why is there such a difference?

Parents
  • Hi.

    But when I send search gateway msg, connect msg from publish (subscribe) Node to NCP. Seem it can't send as mesh network. I have to put Node in the coverage area of ​​NCP then it can discovery and connect to Gateway. If I put NCP --> Node 1 --> Node 2 in a straight line. Node 1 can connect to mqtt gateway, but node 2 can't . But I can ping from Node 2 to Node 1 and NCP. 

     Do you mean that if you create this network:

    NCP - Node1 - Node2

    Then:

    • Node 1 can connect to the MQTT-SN Gateway
    • Node 2 cannot connect to the MQTT-SN Gateway

    Please clarify this.

    If I connect Node1 and Node 2 to MQTT gateway and put NCP --> Node 1 --> Node 2 in a straight line. I can send data from Node 1 and Node 2 to NCP as mesh network. 

     I don't really understand this, can you please try to explain some more?

    It would be really helpful if you can provide traffic data using the nRF Sniffer for both situations. See here how to use it.

    Best regards,

    Andreas

  • Thank for reply,

    1. Yep, When I put NCP - Node1 - Node2 in a straight line. Node 1 can connect to MQTT Gateway but Node 2 can't. It mean Node 2 can't send  discovery and connect message to NCP.

    2. If I put Node 1 near NCP and connect Node 1 to MQTT Gateway. Then I put Node 2 near NCP and connect Node 2 to MQTT Gateway. Then I put NCP - Node1 - Node2 in a straight line. Node 2 can send data to MQTT Gateway and control Node 1 as pub-sub Node. 

    So I don't understand why Node 2 can send discovery and connect message to NCP.

    It all used otUdpSend function

  • Hi.

    Do you have any chance to provide me with some logs?

    Best regards,

    Andreas

  • Hi AndreasF,

    Sorry because slow reply. I very busy.

    When I put NCP -> Node 1 -> Node 2 in a straight line. Next, I send discovery message from Node 2 to NCP. The purpose is to Node 2 can connect to MQTTSN-GATEWAY via Node 1, If I turn off Node 1, Node 2 can't send any message. So when I send discovery connect from Node 2. I see in Raspi, It can receiver this message. But in Node 2 I see it run event MQTTSN_SEARCH_GATEWAY_NO_GATEWAY_FOUND.

    Below is log in Node 2 and raspi : 


    Thank you !!

  • Hi I checked and this is result.

    If I put NCP -> Node 1 -> Node 2 -> Node 3 -> Node 4.

    And I send discovery gateway from Node 4 . The message go to NCP, and NCP return a INFOGATEWAY. But this message go to Node 1 -> Node 2 -> Node 3. But Node 4 can't receiver. Although I have put Node 4 pole near Node 3. But Node 4 still can't receiver message. 

Reply Children
Related