Peer To Peer mode
Tagged: broadcast, mDot, Peer to Peer
- This topic has 11 replies, 3 voices, and was last updated 8 years, 2 months ago by
FARRUKH.
-
AuthorPosts
-
January 17, 2017 at 11:53 pm #16360
FARRUKH
ParticipantHello guys!
I’m struggling with sending message to specific mDot module in Peer to Peer mode of communication. I’ve configured three mDot modules with same settings for Peer to Peer mode, when one module sends message, other two receive that message, is there a way to send message to only specific mDot module?
On page 95 of AT command manual, it saysTo allow
communication between mDots, configure two or more mDots with the same network settings.But not explained how to send message to specific mDot, it seems to always send broadcast message.
If Peer to Peer mode can only send broadcast messages, is there any other mode that can send Unicast messages?Thanks for your time and any help will be highly appreciated.
Farrukh
January 18, 2017 at 6:55 am #16372Jason Reiss
KeymasterConfigure two dots with different addresses and change the address before sending the packet.
January 18, 2017 at 7:51 am #16377FARRUKH
ParticipantCan you please check which AT command to use for configuring mDot’s address? I’m unable to find any in AT command manual.
January 18, 2017 at 8:33 am #16378Martin Pelletier
ParticipantHi Farrukh,
i am developing hybrid system (canbus and rf in peer to peer) and i used one master (display) and up to 4 slaves (RF sensors). I use a my specific protocol. My master knows each address of each sensor. And i have my own ack (ex. 0xAA, ID low, ID high, CS).
And to avoid 2 send at the same time, i use a random timer for each one.If you want to use a specific address for each mdot, you need to get the bootloader firmware in order to make what you want.
January 18, 2017 at 9:03 am #16380Jason Reiss
KeymasterFor peer to peer mode you set the devices to the same settings.
The following settings must match:
AT+NA
AT+NSK
AT+DSKAT+NA (Network Address) can be different on each device.
Set the AT+NSK and AT+DSK to the same values.Then only AT+NA needs to be changed to address a specific dot.
January 18, 2017 at 9:14 am #16383FARRUKH
ParticipantAT+NA (Network Address) can be different on each device.
Set the AT+NSK and AT+DSK to the same values.Then only AT+NA needs to be changed to address a specific dot.
NA is for network address, how two mDots can communicate with each other if set different NA?
January 18, 2017 at 9:17 am #16384Jason Reiss
KeymasterYou have three dots addressed as 1, 2, 3
for 2 to send to 1
AT+NA=1
AT+SEND=DATA
AT+NA=2January 18, 2017 at 9:21 am #16385FARRUKH
Participanti am developing hybrid system (canbus and rf in peer to peer) and i used one master (display) and up to 4 slaves (RF sensors). I use a my specific protocol. My master knows each address of each sensor. And i have my own ack (ex. 0xAA, ID low, ID high, CS).
Right sir, that simply means there is no way to send Unicast messages, I have one master and around ten or even more slaves, all have same mDot, so is no option for slave to send unicast message destined for master, is troublesome, I’ve used low cost cc1101 chip before, that supports address field also.
January 18, 2017 at 9:28 am #16387FARRUKH
ParticipantYou have three dots addressed as 1, 2, 3
for 2 to send to 1
AT+NA=1
AT+SEND=DATA
AT+NA=2I understand that, three are mentioned for example only, in field, there will be many mDots,
I’ve to program same firmware for all slaves, so all slave mDots must have same NA, and other issue is, when each slave will be powered up, it will send a status message to master, slave must have same NA otherwise master will never receive message.January 18, 2017 at 9:35 am #16389Jason Reiss
KeymasterIf everything has to be the same then there is no way to filter on a specific dot outside of an id in the payload.
You seem to understand the network protocol. Now you need to implement an application protocol on top.
When multiple devices are connected in peer-to-peer it is equivalent to a ring network. All devices hear every message.
However peer-to-peer was designed as point-to-point so there may be issues with counter values from each end-point matching each other.
The device will filter out (drop) packets that have the same counter as the last packet received.AT+ULC and AT+DLC can be used to save and show the counter values.
AT+SS and AT+RS can be used to save the counters in the session to flash.January 18, 2017 at 3:43 pm #16398Martin Pelletier
ParticipantHi M.Hussian,
i used the node id. Each mdot has its own node id of 8 bytes (see the label). this ID is located into the flash. It is possible to modify it if you want but need a special firmware.once we use it, the master can receive all node messages but if it knows which ID is waiting it could filter all other messages.
Regards
January 18, 2017 at 9:14 pm #16403FARRUKH
Participanti used the node id. Each mdot has its own node id of 8 bytes (see the label). this ID is located into the flash.
But that will require handling all packets in user-application layer, Peer to Peer network not necessarily means BROADCASTING each and every packet, I’m not getting why addressing individual nodes at hardware-level is missing.
-
AuthorPosts
- You must be logged in to reply to this topic.