Digimesh for node to node to node network

Hi!

I am trying to configure a network with digimesh. My idea is having a lot of nodes, connected forming a line:

node - node - node - node - … -node - coordinator

I want that all of them were able to send info to the coordinator. I have many xbee S1 modules (pro and normal) so I think the best idea is about using digimesh mode.

I want to know which parameters I have to set to make them staying in the same network (ID, CH, MY…) and what’s about one of them (for example the first) to have the possibility to send data to the coordinator through all the others node. I have read that data can “jump” between nodes until its target. Do I have to do something to configure this way? Or they discover the network alone and think the best path?

I will use arduino to take info and send it.

On the other side, in digimesh datasheet, I read also about sleeping modes. I think it would be useful to use sync sleep. Coordinator would send time each node has to wake up, send info and sleep again. Can I get awake the arduino through xbee?

I can set in coordinatos SM = 7 and the others node SM = 8… where do I set the sleeping time? any more parameters should be configured?

Thanks and sorry for my english and my so long post [:(]

I have read about differents parameters I should configure about sleep mode.

I understood WH, SM, SP and ST. But I don’t know what should I set on SO (for coordinator and normal nodes).

Also, I have some doubts about NH (number of hops)… what is the best? I think I will have a big big network… what is about NN, what is it for?

Also, I have some doubts about CE. In 802.15.4 I used CE=1 for coordinator and 0 for end nodes. Now, I have: Standard, NA and end device. What is for the node which configure sleep times, coordinate network… and what is for the others? I want that all nodes (except the coordinator) can re send data from other nodes or re send packets from coordinator.

I have another question, what is the pin I should use to wake up an arduino? If xbee wake up, I want it to wake up arduino too.

I want to add other one question. Which packets do I have to control by code? I am building a TX request to send data to other arduino and a receive packet to send as ACK.

Do I have to send packets for discovering network or something like that? or they automatic?

Anyone knows answer to my other questions?

Okay … DigiMesh. I am just starting work on this.

In my design, X2/X4 ‘gateway’ is the ‘sleep coordinator’. So it has:
SM = 7 (sleep compatible, but not sleeping)
SO = 0x05 (I am preferred sleep coordinator, and send API serial message to announce when the DM wakes/sleeps)
SP/ST then set the sleep/wake cycle for the ENTIRE network.

So each other node has:
SM = 7 or 8 (some node do not sleep, but need to be sleep graceful)
SO = 0x02 (don’t ever offer to be a sleep coordinator)
SP/ST can be anything - the ‘sleep coordinator’ over-rides these anyway.

To keep all nodes together, you need to CAREFULLY make sure they all share compatible values in ID, CH and SM. Unlike ZB, DM does not search all channels, so you need to set CH the same on all. As for SM, I think they all need to be either 0, or need to be either 7 & 8. This just means a ‘new node’ with good ID and CH, but SM=0 might not appear to join the SM=7&8 nodes until you also set its SM to 7 or 8.

I don’t think DM has a MY setting. You need to address nodes via the SH/SL long address. All of the discover is automatic. You can manually issue the ND if you wish to see a list of the devices out there, but that’s not required.

I don’t know much about the NH/NN/CE meanings. I would leave those default for now and study their effect once your other DM stuff is working. They are ‘tweaks’ for especially small networks, or for especially ‘dense’ networks. So imagine you have only 3 nodes, that allows very fast broadcast. Or suppose you have 100 nodes, but every broadcast can be seen by 60% of them, and thus perhaps only 5 of the nodes can be heard by all of them. There is no reason to have all 100 nodes repeat broadcasts, when maybe defining 95 of them to be CE=2 will prevent them from repeating broadcasts.

Anyway, setting the incorrect values in NH/MM/MR/BH/CE will break your system so treat that as something to do later.

Thanks for answer Lynnl.

I got them to talk each other. I had to set up the receiver as CE=2 (end device). Same ID, CH in both.

I read about sleep modes but not tried yet. I also think SM = 7 for coordinator and 8 for others. S0 = 2 for all except coordinator. For coordinator I read S0=0 but I will check 2 as you said.

My proffesor said me that I leave network hops at maximum value so I leave it at 0 (I think max hopes are 23).

I have to check how to calculate awake time for a network with X nodes in order to know which value I need to set.

And also I have to check how to wake up arduino through xbee before trying sleep mode hahaha

The CE=2 should not have had an impact on talking - sometimes DM seems to take a few minutes to ‘join’ the first time, especially when sleep modes are being used.

The wake time is tough since you need to not only count the (number of messages * time per message), but with multi-hop each hop multiplies this out.

So a fake example: if I can send 1 message per second and have 10 nodes, it would take 10 seconds for each to send 1 message without hops. But add 2 hops in the middle (like a dog bone) and now you’d need 30 seconds since each message needs to be repeated 3 times.