How to receive 2 information



  • Re: Unable to receive 2 information

    Hi there, how can i receive two information from two lopy? Anyone know about this? Thank you in advance.



  • Depends on your application especially how often do you want to collect that information but as a suggestion just have the main "collector" node listening all the time and then the Pytrack nodes send their position based on some movement threshold - or at random time intervals.

    What you want is to minimise the chance of on-air collisions due to the PyTrack nodes trying to send their location at the same time.



  • thank you @jmarcelino.

    I applying this for tracking the location of both person using Pytrack+ Lopy which it will send the latitude and longitude to the lopy+expansion board. How can i solve in order to have both set of latitude and longitude?



  • @mj
    The problem is you're triggering both nodes to send on receiving 'A' from the main node. If you use different triggers so that the nodes transmit at different times you'll be OK.

    But I don't know what is your purpose around measuring time difference so this may not be what you want.



  • Thank you @jmarcelino.

    1. Is it mean that it will not working for receiving the time difference?
    2. How if i have 2 (Pytrack board + Lopy) that handle by different person such as person A and person B that travelling in totally different place and both of their location will be sending to the Lopy+expansion board ? Which mean the Lopy+expansion board will received 2 locations. Is it still working?

    Thank you.



  • @mj
    Thank you.

    So from what I understand you have two nodes trying to transmit on the same frequency with LoRa as soon as they receive a signal from the Lopy+Pytrack board (also on LoRa)

    The problem is the time difference between the two will likely be extremely short so the two nodes are effectively trying to transmit on the same frequency at the same time and in doing so interfering with each other. At SF7 packet transmission of a single byte payload will still take about 20ms (dominated by preamble)

    Also I imagine you'll have a relatively large timing inaccuracy between the stack and MicroPython especially with loops involved so I'm not sure what is the practical application of this value.

    Time difference of arrival in LoRa - for geolocation purposes - is normally done with a SX1301 gateway frontend which can listen on 8 frequencies at the same time (so no clashes ) and driven by a FPGA for timing accuracy across the preamble.



  • Hi @jmarcelino , Currently i wish to get the information from 2 (lopy+expansion board) to received by the another (lopy+pytrack board) but i only manage to received only 1 information.

    For Lopy+Pytrack Board (For receiving information):
    0_1519750128492_659c7f49-f9c7-4e0e-8005-b0b391d0f913-image.png

    For Lopy+Expansion Board (transmit information):
    0_1519750148717_9c79c2a5-40b7-4df2-8545-5f660b7b45dd-image.png

    For Lopy + Expansion Board (Transmit information)
    0_1519750169830_c20bae6e-de2a-484a-9ff5-e4886a0fa5a7-image.png

    • i using IF statement but yet i only can received the 1 information instead of 2 information provided the first IF statement is true.
    • i also tried to make it as comment for the either 1 of the receiving 'D' or 'E' it can only show the information that i want. (also displaying 1 information)
    • i also use ELIF statement but it cannot received any things.

    Result :

    1. Running full coding :
      0_1519750231237_737ef0aa-e3b4-4e2b-9dae-cd6ff7054ad4-image.png

    2. Running with only Lopy+Expansion (power up for B where only B connected) :
      0_1519750265827_066e95d2-a704-4d19-8502-3feb777f29c3-image.png

    3. Running with only Lopy+Expansion (power up for C where only C connected) :
      0_1519750286066_720c1bcd-004a-42af-a599-4602d35170d8-image.png

    4. Running only C with the "#' of B :
      0_1519750313263_99acffd5-b9cd-49aa-8a0d-07b1ddddca92-image.png

    May i know how can i solve this kind of problem? Thanks.



  • Hi @mj

    Can you explain a bit better what you mean? Where is the information coming from?

    Thanks


Log in to reply
 

Pycom on Twitter