Atmel Lightweight Mesh stack

Go To Last Post
566 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

djoshi wrote:
Is the switch done in the bootsector?
Yes, it is.

djoshi wrote:
So this boorloader is it a seperate project?
Yes, it is.

You can combine it with the normal application, if you want. Just make sure that bootloader is not present in the image you send OTA, bootloader cannot be updated.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Another way is Atmel Serial Bootloader.
IIRC some of the off-the-shelf wireless modules are supported (mega, XMEGA, SAM3).
Burn bootloader by ISP.
Burn initial app by serial port or USB (SAM3, DFU).
Subsequent app by wireless part of the current app into Adesto Technologies DataFlash.
Bootloader then runs, detects new app, burns that app, jumps to app.
Atmel AVR2054 Serial Bootloader (Atmel Gallery)

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is possible, but it would be a gross overkill. And it village be even bigger waste of time.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Alex

I see two folders in my directory

Bootloader

and

OTAServerDemo

I will have a look at both of them tomorrow.

I know that I have asked this before, but would like to know if anyone else experience with AT86RF230 --> AT86RF233

In my experience and for what I use in Lightweight stack i had to make no change to my firmware, has anyone else had such experience or am i missing something important.

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

djoshi wrote:
In my experience and for what I use in Lightweight stack i had to make no change to my firmware, has anyone else had such experience or am i missing something important.

RF233 is specifically designed to be backwards compatible with RF230, so there could be no second opinion, old code will just work. You won't get optional benefits of the new radio, of course.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am trying to figure out the maximum data throughput if I used a ATmega256RFR2 with the Lightweight Mesh in high data rate (2000 kbps) mode.

According the the data sheet, the maximum effective "raw" data rate for 2000 kbps mode is 1451 kbps. This would be using a full-size 127-octect PSDU.

My reading of the Lightweight Mesh document tells me that there are up to 24 octets of "header" data that must be included with each packet. That leaves a maximum "data payload" of 103 octets. My analysis is that the resulting maximum "application data" throughput would be 1177 kbps.

I assume that there are other considerations and that this maximum "theoretical" rate could not be achieved in reality. That said, does my analysis look correct? And, how close to this rate should I expect to get when using the Lightweight Mesh stack?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

High data rate mode is not suitable for mesh networks, but if you want to use it in peer to peer mode, then it is not a problem.
One more thing you are not taking into account is CSMA/CA and auto retries, which might add some delays (but will increase reliability, of course).

But if you just want to work in peer 2 peer mode, you can drop the network stack and use PHY driver directly. This will save you those 24 bytes.

You can disable CSMA/CA and retries as well.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Alex,
here is example of network:
- 2000 end devices, ATZB-24-B0
- 40 routers, ATZB-24-B0
- 1 coordinator, ATZB-A24-UFL
- routing table size:50
- end device sends aprox. 1 message every minute

Based on your experience with this stack, how the network of such parameters will behave, what will be the bottleneck?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

2000 messages per minute is almost impossible, especially if routing is involved. There are going to be a lot of collisions and retries, which will slow things down.

If you also need acknowledgments, then C must have routing table of at least 2000 entries.

2000 devices should be asleep, or have the transceiver off when they are not sending the data, otherwise this will not work at all.

And also be prepared to do some tuning, which might involve minor stack modifications.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Alex,

I am trying to understand to the security part of LWM and still missing some points.

Let’s assume

#define NWK_ENABLE_SECURITY
SYS_SECURITY_MODE = 0

If I get it right the process of encryption goes like this:
1) First 16 bits of nwkSecurityVector is encrypted with first 16bits of nwkIb.key.
2) (if payload is bigger than 16 bits block) First 16bits of frame payload is XORed with first 16 bits of encrypted nwkSecurityVector. Result is saved into the first 16 bits of nwkSecurityVector.
3) Point 1 - 2 is repeated until there is no data to encrypt.

It seems that only first 16 bits of AES key and SecurityVector are used. Is that true?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Where did you get bits from? It is 16 bytes everywhere, which is a full length of the security key.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh, my bad. Thank you.

Just a small comment: in "Peer2Peer" application, the APP_SECURITY_KEY is defined, however never set.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Alex,

I'm implementing a route score function, in the route table we have score and lqi, however is there a way to know (or measure) the number of hops it takes to the destination node? So I have a complete view of the route (score, lqi and no_hops).

Best,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, unless you extend Route Request and Route Response commands with this information. This should be pretty straightforward to do.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Many thanks Alex, would this information be included in some feature release?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is really hard to say, I'm no longer responsible for maintaining LwMesh. I personally would add it.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

With the current stack, is it possible to get into the testing modes for RF certifications for RF233? E.g. Sending random packets continiously?

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is no direct API for that, but you can reuse PHY register read and write functions to implement sequence from the datasheet.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Alex

Thanks

I will use the PHY function,

I would like to know that can I setup this test while in the lightweight application mode?

I would like to have my master node set another node into this testmode, with the desired freq and power. This way using my application I can select any node on the network for it to be tested.

Once all register are set for this test mode(as shown in datasheet), I can get the avr to seat in a infinite loop to insure application does not run. Till a user rst is pressed.

But is there anything I need to keep in mind?

How do I insure packets are being Txed from this test mode? Anyway of testing this?

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Am I correct that I must use the following

static void phyWriteRegister(uint8_t reg, uint8_t value)
{
phyWriteRegisterInline(reg, value);
}

And


static uint8_t phyReadRegister(uint8_t reg)
{
return phyReadRegisterInline(reg);
}

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

djoshi wrote:
I would like to know that can I setup this test while in the lightweight application mode?
You will have to make functions that you mention in the next post non-static or create equivalent functions in the application, but otherwise, yes, you can do that from the application.

djoshi wrote:
But is there anything I need to keep in mind?
There is no coming back from the test mode, radio must be reset and properly setup again. So application must be prepared that once this test is triggered remotely, device will disappear from the network.

djoshi wrote:
How do I insure packets are being Txed from this test mode? Anyway of testing this?
In CW test mode, there is no packets, it is a simple continuous wave, just as advertised :)

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thats great,

When coming out of test mode, i will use a HW reset.

I need to send pseudo random packets.

I need to also send messages via Router in the application I would like to test this.

How can I force packets being Tx to go via a router instead of going directly.

If i am correct the path with least hop is taken?

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The path with best link quality is taken. You can add routing records directly, but you will have to coordinate all devices to do so, routing is a distributed process.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a router and node close by , but the Cord is far away.

The node finds that going directly to the far away cord instead of going to the router. Is this meant to be a the best link quailty? Is a hop also accounted for a link quailty.

Thanks

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, by default only LQI value from the chip is used as a link quality. Far away does not necessarily means bad link quality.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

that makes sense,

What alters LQI or what does LQI depend on>

As the node when next to my cord is 255 and so is router and node that are far away also 255.

Would have thought the node and router further away would be less LQI compared to the one nect to cord.

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

LQI is an output from the correlator looking for a start of frame delimeter. It shows how hard demodulator will have to work to receive the frame. It is not an indication of distance, just how "easy" it was to receive the frame.

Without noise (absolute ideal conditions) LQI will stay 255 for almost 900 meters in 2.4 GHz range, so even in realistic noise environment, it will stay 255 for quite a long distance.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'm no longer responsible for maintaining LwMesh.

Does this mean no-one is, or someone else is?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:
Does this mean no-one is, or someone else is?
Someone else is. But I now I have the same amount of information of when something might or might not happen as everyone else.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And I suppose that someone else will not be present here to the extent you have, excellently supporting LwMesh users answering question and giving advice?

Let me take this opportunity, then, to express my warmest thanks for the work and support you have done on LwMesh! You should be very proud of yourself regarding this.

Thank You!

And best wishes with whatever lies ahead of you now.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is now maintained by the same people that do the rest of software development. So expect the same amount of presence as for other software :)

I'm still here, at Atmel, and I'm still supporting wireless software, just not developing it, since I was not supposed to be developing it in a first place, that is technically not my job.

The problem with supporting stuff that you don't control is that I can't apply fixes directly or commit to any schedule on new features.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On the other hand, in my spare time I'm working on even better wireless stack. The goal is scalability out of the box - 10000 should just work with no extra work from a user. I also want it to have standard profiles and be completely free and open. It will also be much more complete and offload more from the user.

This is a research project, so no timelines. I'm doing a lot of thinking and rethinking of existing technologies. At this point I'm experimenting with a bunch of heuristics, since strict algorithms don't work very well on that scale.

Also, that's why I've created a simulator - I don't have enough room for 10000 nodes :)

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Alex

How do you create a simulator for 1000 nodes?

1.)I need to show my signal strength on my GUI . IS RSSI the best to use a represent it as percentage ?

2) Am I correct in saying node that sleep should not have routing enabled? I experience an usually problem when nodes had routing enabled.

My nodes would somehow make their parent address to 0xFFFF. This would indicate there next hop. So when message are being sent from the device they would not reach is destination.

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
How do you create a simulator for 1000 nodes?

Create a simulator for 10 nodes and then scale it up by a factor of 100? :wink:

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is it a software or a hardware that sends multiple packets?

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

djoshi wrote:
How do you create a simulator for 1000 nodes?
Using slightly improved version of this.

djoshi wrote:
1.)I need to show my signal strength on my GUI . IS RSSI the best to use a represent it as percentage ?
If you actually need to present signal strength, then RSSI is what you need to show. If you need to present quality of signal (like mobile phones do using "bars"), then you need to use LQI.

djoshi wrote:
2) Am I correct in saying node that sleep should not have routing enabled? I experience an usually problem when nodes had routing enabled.
It needs to have address with the highest bit set. It may or may not have routing enabled, it does not matter.

djoshi wrote:
My nodes would somehow make their parent address to 0xFFFF. This would indicate there next hop. So when message are being sent from the device they would not reach is destination.
0xffff returned by NWK_GetNextHop() means that there is no known route to the destination.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
0xffff returned by NWK_GetNextHop() means that there is no known route to the destination

Why is this?

This happens when a node has routing enabled. When its disabled its next hop is always 0x0000(Cord). Please explain bit more about that highest bit?

Should I routing enabled for only router and not Cord or sleeping nodes?

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

djoshi wrote:
Why is this?
Because it has not been discovered yet, for example. Or it has been discovered previously and was removed because of routing errors.

djoshi wrote:
When its disabled its next hop is always 0x0000(Cord).
It is not always 0, it is equal to the input parameter. When routing is disabled the only thing you can do is send directly and hope there is someone there.

djoshi wrote:
Please explain bit more about that highest bit?
Just as described in the documentation, if node's address has highest bit set to 1, that node will not be used in a routing chain. This means it can go to sleep or disappear and it will not break routing for other nodes.

djoshi wrote:
Should I routing enabled for only router and not Cord or sleeping nodes?
Network parameters must be the same on all nodes in the network.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks

The doc for the stack mentions that sleeping nodes do need routing enabled?

To insure there is no ffff what must be done?

How comes no route was found? From what i have understood there is discoverying process?

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

djoshi wrote:
The doc for the stack mentions that sleeping nodes do need routing enabled?
It is implied. Routing is not only passing frames though, it is also a route discovery for your own frames.

djoshi wrote:
To insure there is no ffff what must be done?
Send a frame to that node and let stack discover the route.

djoshi wrote:
How comes no route was found? From what i have understood there is discoverying process?
NWK_GetNextHop() does not discover anything. It returns information from a local routing table. If there is no entry in the table for specified address, then 0xffff is returned.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Or how can i speed up the process of discovery so when a msg is tx the correct path is there?

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When the route is known, there is not going to be a discovery, there is nothing to "speed up". And when route is not known, there will be a discovery and there is nothing to you can do to speed it up.

Do you have some specific problem you want to solve?

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

djoshi wrote:
What happens at power up when all routing table is empty.
Route discovery happens when you try to send a frame.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes a node power on sends msg to cord. Msg also shows that node next hop is ffff from it parent id variable.

Now the cord wants to send that node a msg but the msg never get to it.

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

djoshi wrote:
Yes a node power on sends msg to cord. Msg also shows that node next hop is ffff from it parent id variable.

Now the cord wants to send that node a msg but the msg never get to it.

Please use full words instead of "msg" and "cord".

When you receive a message on the coordinator ind->srcAddr indicates address of the sending node. Send the response to that address.

I don't see how using NWK_GetNextHop() makes any sense here.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alexru wrote:

Please use full words instead of "msg" and "cord".

When you receive a message on the coordinator ind->srcAddr indicates address of the sending node. Send the response to that address.

I don't see how using NWK_GetNextHop() makes any sense here.

I am not using NKW_GetNextHop(); when sending a message.

Each node has a static address assigned to it , so when I send a message the right node get it.

I am going to re enable routing and see how if my issues are still there.

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Alex

I send a message and then wait for an ACK return for that message, but if ACK is failed message, how long would I wait in a network before seeing it as a failed message.

At the moment I have set it to 5secs but it there a calculation for more accuracy?

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alexru wrote:
djoshi wrote:
I would like to know that can I setup this test while in the lightweight application mode?
You will have to make functions that you mention in the next post non-static or create equivalent functions in the application, but otherwise, yes, you can do that from the application.

djoshi wrote:
But is there anything I need to keep in mind?
There is no coming back from the test mode, radio must be reset and properly setup again. So application must be prepared that once this test is triggered remotely, device will disappear from the network.

djoshi wrote:
How do I insure packets are being Txed from this test mode? Anyway of testing this?
In CW test mode, there is no packets, it is a simple continuous wave, just as advertised :)

I am required to send pseudo random, can this be done with RF233?

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If there is no ACK, then confirmation handler will be called in NWK_ACK_WAIT_TIME ms. You should always rely on the confirmation handler, not on some side timer.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

djoshi wrote:
I am required to send pseudo random, can this be done with RF233?
Yes, the procedure is described in the DS.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

Pages