Page 1 of 1

Peer_to_Peer_ communication

Posted: Mon Nov 02, 2020 6:28 pm
by Hada Hamdi
Hi,

I am asking about peer to peer API https://www.bitcraze.io/documentation/r ... 2/p2p_api/

I tested it, I can see the sending of the message, but I cannot see its reception. where can be the problem ?

Also, how can I put them on the same channel !

Thank you!

Re: Peer_to_Peer_ communication

Posted: Tue Nov 03, 2020 9:56 am
by arnaud
It might be that your Crazyflies are not on the same channels.

To change the Crazyflie channel and address (you need to change both in that case) you can use the client: https://www.bitcraze.io/documentation/r ... figuration

You should set your crazyflie on 2 different addresses. for example 0xe7e7e7e701 and 0xe7e7e7e702.

Re: Peer_to_Peer_ communication

Posted: Mon Nov 09, 2020 8:34 pm
by Hada Hamdi
Hello,

I would like to know the time of transmission of the messages between crazyflies and the packets lost. Anything can help me!

Thank you!

Re: Peer_to_Peer_ communication

Posted: Tue Nov 10, 2020 8:38 am
by arnaud
Maybe you can tell us a bit more about what you want to do, most answer will depend of the context.

The only p2p packet implemented so far is the broadcast packet, this means that you will have to implement a protocol to detect and handle packet loss. For example you can have the receiver sending an ack packet when it receives a packet and the sender waiting for some time for this ack packet. If you want unicast packet, it has to be implemented in the nrf51 the same way broadcast packets are currently implemented.

As for the time of transmission, if you mean a timestamp, you can take a timestamp before sensing the packet using the "usecTimestamp()" function. If you need more precise timing, the nrf51 firmware will need to be modified to timestamp the packet.

Re: Peer_to_Peer_ communication

Posted: Wed Nov 11, 2020 8:48 am
by Hada Hamdi
Hi,

I tried the P2P api and I put crazyflies in the same channel, the led is just blinking red. It seems that crazyflies can send messages but cannot receive. What is the problem? . Please can you write to me steps to follow about P2P. I don't know if I did a mistake or something else. :|


If I use the terminal or st link/v2 to flash crazyflies, not the cfclient, how can change adresses of crazyflies and put them in the same channel, without using cfclient to configure and flash.

Thank you very much!

Re: Peer_to_Peer_ communication

Posted: Thu Nov 12, 2020 8:44 am
by kimberly
Btw, maybe connecting with one of the crazyflies with a USB cable instead to get the outputs of hte app on the cfclient. The p2p messages might interfere with the wireless connection of the crazyflie.

The link that Arnaud gave in the previous message contains the direct link to change the channel and address on the crazyflie.
1- Go to Connect>Configure 2.X which opens up a window.
2- You need to put in the channel in box for channel,and then
3- press the 'write' button and ...
4- restart the crazyflie in order for it to take into affect.
5- You can then scan the address of the crazyflie in the cfclient and then you will see that channel has been changed.

Changing the address/channel/bandwidth through the cfclient is the main way to do this. We at the development team use it ourselves too.

Re: Peer_to_Peer_ communication

Posted: Mon Nov 23, 2020 4:36 pm
by Hada Hamdi
Hi Kimberly,

Thank you very much for your reply!

It works well! I am trying to know the transmission time of a packet, what is the unit of time returned by the function usecTimestamp() !

Thank you!

Re: Peer_to_Peer_ communication

Posted: Tue Nov 24, 2020 9:03 am
by kimberly
usecs stands for μsec, which is microseconds