I would say random delay 0-80 seconds would help a lot. If your devices are assigned sequential addresses, then I would simply use device address as delay in seconds. This way they all will line up nicely.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
Recently I had a problem where a particular Router node , a sleeping node and Coordinator Node, were just hanging in some loop , did not have debugger plugged so do not know where.
This was noticed after my area had a main power cut
My configuration is shown below,
“C†represents the node acting as the Coordinator. SN is the sleep node. And R as Router
Quote:
R1 --> R2--> C
SN1-->C
All nodes apart from R2 have a backup battery. R2 connects to the mains power via a DC power plug.
I am not sure if my theory would be correct, but please advise me on this…
If I am correct that on the application layer when you a message is being Tx, there are some intermediate message being sent before the actual message gets TXed e.g. routing message etc .
If during these intermediate a Router node passing a message was to lose its power, can it leave other nodes associated nodes hanging , as those nodes could be in some waiting state.
In my case if a messages was sent from R1 ->R2 -> C. And R2 was to lose power during intermediate message stage could it cause an issue to what I am experiencing?
A sleep node was also looped, maybe it’s also TX a message at the same time and was locked in some state as well.
Everything is working fine such issue, but wanted to know if my theory of the power loss could have caused this?
I am running lightweight mesh on an AtmegaRFA1. I have been trying to figure out why these devices occasionally hang and I finally caught one in the act. It is stuck in the first while loop because the TRX_STATUS_REG never goes to TRX_STATUS_TRX_OFf (8). It is always TRX_STATUS_PLL_ON (9). Any ideas?
I am running lightweight mesh on an AtmegaRFA1. I have been trying to figure out why these devices occasionally hang and I finally caught one in the act. It is stuck in the first while loop because the TRX_STATUS_REG never goes to TRX_STATUS_TRX_OFf (8). It is always TRX_STATUS_PLL_ON (9). Any ideas?
I thought it would make sense to create a new thread but didn't see how. This web site is different than the last time I used it.
It looks like this function is being called from the phy task manager and it is trying to force the transceiver to a particular state by first turning it off. I also see an ISR that may set this register to PLL_ON. My working theory is that the ISR ran between the line that turns it off and the line that waits for it to be off. I am trying a version that protects this code as a critical region.
It looks to me like that would work. Even if an ISR changes the state or the hardware doesn't respond the first time it would keep poking until the transceiver reports being off. I noticed that this particular function did not change at all in the latest lightweight stack release. It looks like a hazard, and I caught it hanging there once, but it doesn't look like other people have had this problem.
I played with ZigBit modules a couple of years ago, but found them a bit difficult to work with. Very good structure with callback functions etc, and really understandable. But difficult to start a project from the scratch, so someone should start a project, by editing WSNdemo or LowPower etc. There wasn't a template (blank project) to start with. Also what I didn't like was the fact that I had minor control of the code, I was writing code on application layer and everything else was hidden. I couldn't follow the code flow easilly. Finally those xml files or makefiles was a pain in the ***, because i was not familiar with GCC. My question is: from simplicity point of view, is LwMesh improved, compared to BitCloud?
Can someone explain what is the difference between :
Repeat reply, the old one ended up in some forum black hole.
NWK_PHY_NO_ACK_STATUS means that the frame was not acknowledged on a hardware level by the first hop in the route. Essentially this means that the frame was not sent, except for rare cases when the frame is sent, but the ack was not received due to some interference.
NWK_NO_ACK_STATUS means that the frame was not acknowledged on a network level, meaning that the entire multi-hop transaction is failed.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
Just a quick question about CRC. It looks like the stack never checks to see if the CRC flag (RX_CRC_Valid) is set or not. Is there any reason the CRC isn't used to determine if a packet is valid or not? or am I just missing it in the code?
In case I only need to have a star network topology, is it a way to optimise the transmission (time and power consumption) for the emitter by setting/modyfing some option/parameter?
Hi to all! I just stumbled upon the lightweight mesh stack and think this is exactly what I need for a good wireless serial connection. Unfortunaltely I developed the last years only with Bascom and only decided some weeks ago to change for C++ and Atmel Studio so sorry for asking beginners questions.
I loaded the Leightweight Mesh 1_2_1 and took the example Rcb231_ATmega_Rf231. My MUC is ATmega32 and my RF is ATRF231. As far as I understand things I have to adapt the hal layer which contains several includes and sources. The pin declarations however I found in iomxx0_1.h Is ist right that I only have to add the atmega32 to the declarations there? What other types of modification have to be done? I remembered reading that Alex mentioned the stack should run with minor changes on mega32.
Thanks a lot to point me in the right direction!
Olaf.
problems are not only just expected... they are welcome!
You really should not start learning C programming with LwMesh, you will waste a lot of time. Start from simpler projects.
You should not touch iomxx0_1.h. All you need to do is select the right MCU in the project settings and the right header file will be included automatically. Now you need to go into HAL and change definitions for your radio SPI and GPIO pins.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
Posted by steve_at_odi: Thu. May 14, 2015 - 01:03 AM
1
2
3
4
5
Total votes: 0
Hi, I have a question about the stack:
After setting up an endpoint like so:
NWK_OpenEndpoint(APP_ENDPOINT, appDataInd);
And after a packet comes in, this function is called:
static bool appDataInd(NWK_DataInd_t *ind)
Question: is *ind always the same memory address, always different, or neither?
Question: when does *ind get freed?
What I'm getting at is that I want to create a queue or list of received packets, and I want to do this with the least number of malloc's and memcpy's.
Question: is *ind always the same memory address, always different, or neither?
It is allocated on the stack, so it will be the same for the same program, but really unpredictable.
steve_at_odi wrote:
Question: when does *ind get freed?
As soon as indication function returns. You need to get anything you want to save out before returning.
steve_at_odi wrote:
What I'm getting at is that I want to create a queue or list of received packets, and I want to do this with the least number of malloc's and memcpy's.
You can use static buffers, but you will have to copy the data.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
Posted by steve_at_odi: Thu. May 14, 2015 - 01:23 AM
1
2
3
4
5
Total votes: 0
Thanks, you're the man Alex!
that was my guess, I saw that there was a NWK_DataInd_t allocated on the stack and then its address is passed to another function. Never seen that before haha.
Posted by MarcoScordo: Thu. Jun 18, 2015 - 08:31 AM
1
2
3
4
5
Total votes: 0
Hello,
I'm working at WSN demo application, I really don't understand how the software timers work, for example the appNetworkStatusTimer I use this configuration:
by the LWmesh protocol this means that every 6ms the timer handler is called right? but I don't understand how it counts, is it like an interrupt? Something is decremented like a timer counter?
Thanks a lot
Hello everyone,
I'm an italian student and I'm working for my master work with the ATmega128RFA1 microcontroller. Hope you can help me and sorry for my english :)
Why not look line the source code then? Software timers run from a single hardware timer. By default hardware timer is set up with 10 ms interval, so all software timers have granularity of 10 ms. So 6 ms interval will actually be 10 ms (or 0, the rounding is not guaranteed).
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
I watched (better) the source code and it seems that all the timer intervals are decremented of 10 when setted. So setting timer with values under 10 or not-multiple of 10 has no sense right?
Hello everyone,
I'm an italian student and I'm working for my master work with the ATmega128RFA1 microcontroller. Hope you can help me and sorry for my english :)
Posted by steve_at_odi: Tue. Jun 30, 2015 - 11:18 PM
1
2
3
4
5
Total votes: 0
Hi, I want to experiment with a very simple routing algorithm, and I am wondering if I can do this by only changing the NWK_RouteNextHop function to the following:
Do I have to create a static routing table or would this bypass the routing table, ie. the searching of the routing table? Would this bypass the native route discovery that does the broadcast messages, sets up a reverse path, etc?
Posted by steve_at_odi: Fri. Jul 24, 2015 - 11:47 PM
1
2
3
4
5
Total votes: 0
Hi Alex, is it possible for a device to send a NWK_DataReq to a device's own address? Like a HTTP request to localhost.
I have an a SAMD20 I2C slave, which takes all I2C packets and simply passes the data into a NWK_DataReq_t and does NWK_DataReq(). The first byte of the I2C is used as destination address, the rest is payload.
This SAMD20 is NWK_ADDR 0x0000
It's great, except when I want to send data to this particular device, NWK_ADDR 0x0000. This is particularly critical for joining the first other device to the network.
Sure I could add more I2C code to recognize that the packet is to be processed and not put into a NWK_DataReq_t.
But I would like to keep the I2C-to-NWK_DataReq module super simple. So what I want to do is send an I2C packet with the first byte = 0x0000. This would result in a NWK_DataReq_t with dstAddr = 0x0000; Then I can get at the payload inside of a DataInd() callback.
At first this didn't work because there was nothing in the routing table, and 0x0000 was trying to broadcast for route discovery. so I added this to nwkRouteInit()
But it still doesn't work; now, NWK_ADDR 0x0000 tries to send to 0x0000 4 times and gives up. I can see that in these packets, MAC Src = MAC Dst = NWK Src = NWK Dst = 0x0000. I tried setting the option NWK_OPT_ACK_REQUEST, still nothing. The DataInd() is not getting called.
No, there is absolutely no internal routing of any kind. The only frames that have a chance of being indicated to the application have to come from outside.
You can add this logic either on the application level (where it really belongs) or inside the stack.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
I may have found a serious security issue with v1.2.1 when using XTEA. The end result is that not all of the data is encrypted, and much data is sent plain-text. The issue is in SYS_EncryptReq(). "text" is a uint8_t, and so the call to xtea(&text[2], key) does not encrypt the last 64 bits of data as expected. The calls to swap around the text before this are also not working as intended. "text" must be typecast to a U32 to correct this issue.
This is a regression in v1.2.1 as v1.1.0 worked correctly.
Ah, you also on a slow radio.
I would say random delay 0-80 seconds would help a lot. If your devices are assigned sequential addresses, then I would simply use device address as delay in seconds. This way they all will line up nicely.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopThat's genius, I could avoid rand()
- Log in or register to post comments
TopHi Alex
Recently I had a problem where a particular Router node , a sleeping node and Coordinator Node, were just hanging in some loop , did not have debugger plugged so do not know where.
This was noticed after my area had a main power cut
My configuration is shown below,
“C†represents the node acting as the Coordinator. SN is the sleep node. And R as Router
All nodes apart from R2 have a backup battery. R2 connects to the mains power via a DC power plug.
I am not sure if my theory would be correct, but please advise me on this…
If I am correct that on the application layer when you a message is being Tx, there are some intermediate message being sent before the actual message gets TXed e.g. routing message etc .
If during these intermediate a Router node passing a message was to lose its power, can it leave other nodes associated nodes hanging , as those nodes could be in some waiting state.
In my case if a messages was sent from R1 ->R2 -> C. And R2 was to lose power during intermediate message stage could it cause an issue to what I am experiencing?
A sleep node was also looped, maybe it’s also TX a message at the same time and was locked in some state as well.
Everything is working fine such issue, but wanted to know if my theory of the power loss could have caused this?
Thanks
Regards
DJ
- Log in or register to post comments
TopI won't even read this unless you create another thread. This is a last warning.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopOk this in regards to the same stack, but an ways i will create an new thread.
Thanks
Regards
DJ
- Log in or register to post comments
TopAtmel has 3 or 4 stacks. It does not mean that there should be only 3 or 4 topics. Separate topics should be created for separate issues.
Also, quote from the first post of this topic:
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
Topok,new post just created
Thanks
Regards
DJ
- Log in or register to post comments
TopHi !
In LW_Mesh, channel and txpower, can they be changed on run-time(actually at any time) or they can only be set on start-up?
I use functions :
Thnak you !
- Log in or register to post comments
TopYes, they can be changed at any time.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopI am running lightweight mesh on an AtmegaRFA1. I have been trying to figure out why these devices occasionally hang and I finally caught one in the act. It is stuck in the first while loop because the TRX_STATUS_REG never goes to TRX_STATUS_TRX_OFf (8). It is always TRX_STATUS_PLL_ON (9). Any ideas?
static inline void phyTrxSetState(uint8_t state)
{
TRX_STATE_REG = TRX_CMD_FORCE_TRX_OFF;
while (TRX_STATUS_TRX_OFF != TRX_STATUS_REG_s.trxStatus);
TRX_STATE_REG = state;
while (state != TRX_STATUS_REG_s.trxStatus);
}
- Log in or register to post comments
TopOn which state is it when it's stuck?
If it's on SLEEP state, it won't work.
By the way, shouldn't you have created a new thread?
- Log in or register to post comments
TopI thought it would make sense to create a new thread but didn't see how. This web site is different than the last time I used it.
It looks like this function is being called from the phy task manager and it is trying to force the transceiver to a particular state by first turning it off. I also see an ISR that may set this register to PLL_ON. My working theory is that the ISR ran between the line that turns it off and the line that waits for it to be off. I am trying a version that protects this code as a critical region.
- Log in or register to post comments
TopI've never seen this, but I've seen code like this:
There might be a reason for this.
But again, I've never seen this happen before and I've never sen reports of anything like this.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopIt looks to me like that would work. Even if an ISR changes the state or the hardware doesn't respond the first time it would keep poking until the transceiver reports being off. I noticed that this particular function did not change at all in the latest lightweight stack release. It looks like a hazard, and I caught it hanging there once, but it doesn't look like other people have had this problem.
- Log in or register to post comments
TopBy the way what is the max message payload size?
Thanks
Thanks
Regards
DJ
- Log in or register to post comments
TopNWK_MAX_PAYLOAD_SIZE for not secured unicast and broadcast messages.
For multicast subtract NWK_MULTICAST_HEADER_SIZE.
For encrypted messages subtract NWK_SECURITY_MIC_SIZE.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopHi alexru.
I played with ZigBit modules a couple of years ago, but found them a bit difficult to work with. Very good structure with callback functions etc, and really understandable. But difficult to start a project from the scratch, so someone should start a project, by editing WSNdemo or LowPower etc. There wasn't a template (blank project) to start with. Also what I didn't like was the fact that I had minor control of the code, I was writing code on application layer and everything else was hidden. I couldn't follow the code flow easilly. Finally those xml files or makefiles was a pain in the ***, because i was not familiar with GCC. My question is: from simplicity point of view, is LwMesh improved, compared to BitCloud?
Thanks.
- Log in or register to post comments
TopNOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopHi all !
Can someone explain what is the difference between :
NWK_NO_ACK_STATUS = 0x10
and
NWK_PHY_NO_ACK_STATUS = 0x21
Thank you !
- Log in or register to post comments
TopRepeat reply, the old one ended up in some forum black hole.
NWK_PHY_NO_ACK_STATUS means that the frame was not acknowledged on a hardware level by the first hop in the route. Essentially this means that the frame was not sent, except for rare cases when the frame is sent, but the ack was not received due to some interference.
NWK_NO_ACK_STATUS means that the frame was not acknowledged on a network level, meaning that the entire multi-hop transaction is failed.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopI already use this stack with the original zigbit modules.
We are designing a new product with the new ATZB-S1-256-3-0-U. Is there support directly for this module with V1.2.1 ?
If not what is involved in porting to support new module, as it has integrated micro and phy ?
- Log in or register to post comments
TopI think that would make more sense as a new thread - with an appropriate title.
*Maybe so, but the split facility is broken, so until it is fixed it will have to stay here. Sorry. Ross*
Top Tips:
- Log in or register to post comments
TopBut nothing to stop pat180269 creating a new thread, and providing a link to it form here...
Top Tips:
- Log in or register to post comments
TopJust a quick question about CRC. It looks like the stack never checks to see if the CRC flag (RX_CRC_Valid) is set or not. Is there any reason the CRC isn't used to determine if a packet is valid or not? or am I just missing it in the code?
Thanks!
- Log in or register to post comments
TopThe stack is using the radio in a mode where broken frames will not be indicated, so no need to check CRC flag, it will always be true.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopHi,
Have one (silly?) question about lightweigh mesh.
In case I only need to have a star network topology, is it a way to optimise the transmission (time and power consumption) for the emitter by setting/modyfing some option/parameter?
Tell me if this question is not clear enough!
Thanks!
BR
- Log in or register to post comments
TopJust disable routing. No route discoveries will be performed and all devices will be assumed to be within direct link range.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopHas anybody ported Atmel Lightweight Mesh protocol stack to any non-Atmel SOC?
alexru, whit who I am supposed to talk about licence-policy for porting Atmel Lightweight Mesh to non-Atmel platforms?
- Log in or register to post comments
TopLicensing - see: https://www.avrfreaks.net/comment...
The licence specifically prohibits use on a non-Atmel MCU - so you could, in principle, use it on a non-Atmel radio but with an Atmel MCU...
But I would also be interested to know who to ask about these issues...
Top Tips:
- Log in or register to post comments
TopHi Alex,
You can send me the version 1.1.1 of lwmesh, I need to bootloader OTA and can not find it on the internet
thanks
ari@ari-K55A:~$ man woman
No manual entry for woman
- Log in or register to post comments
TopNOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopAttachment(s):
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopHi to all! I just stumbled upon the lightweight mesh stack and think this is exactly what I need for a good wireless serial connection. Unfortunaltely I developed the last years only with Bascom and only decided some weeks ago to change for C++ and Atmel Studio so sorry for asking beginners questions.
I loaded the Leightweight Mesh 1_2_1 and took the example Rcb231_ATmega_Rf231. My MUC is ATmega32 and my RF is ATRF231. As far as I understand things I have to adapt the hal layer which contains several includes and sources. The pin declarations however I found in iomxx0_1.h Is ist right that I only have to add the atmega32 to the declarations there? What other types of modification have to be done? I remembered reading that Alex mentioned the stack should run with minor changes on mega32.
Thanks a lot to point me in the right direction!
Olaf.
problems are not only just expected... they are welcome!
- Log in or register to post comments
TopYou really should not start learning C programming with LwMesh, you will waste a lot of time. Start from simpler projects.
You should not touch iomxx0_1.h. All you need to do is select the right MCU in the project settings and the right header file will be included automatically. Now you need to go into HAL and change definitions for your radio SPI and GPIO pins.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopHi Alex, firstly thank you for sharing your precious time to answer questions and help out in this forum!!!
Surely you are right, I had only two small test projects written by myself before I went into copy/paste/edit .
Nevertheless I am used to "cold water jumps" and your hint was very helpful.
Will test it and work my way through it...
Thanks a lot from Portugal
Olaf.
problems are not only just expected... they are welcome!
- Log in or register to post comments
TopHi, I have a question about the stack:
After setting up an endpoint like so:
NWK_OpenEndpoint(APP_ENDPOINT, appDataInd);
And after a packet comes in, this function is called:
static bool appDataInd(NWK_DataInd_t *ind)
Question: is *ind always the same memory address, always different, or neither?
Question: when does *ind get freed?
What I'm getting at is that I want to create a queue or list of received packets, and I want to do this with the least number of malloc's and memcpy's.
Thanks a lot!
- Log in or register to post comments
TopNOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopThanks, you're the man Alex!
that was my guess, I saw that there was a NWK_DataInd_t allocated on the stack and then its address is passed to another function. Never seen that before haha.
- Log in or register to post comments
TopSplit into separate thread. Please create separate threads for debugging issues.
- Log in or register to post comments
TopHello,
I'm working at WSN demo application, I really don't understand how the software timers work, for example the appNetworkStatusTimer I use this configuration:
appNetworkStatusTimer.interval =6; // default 500 //
appNetworkStatusTimer.mode = SYS_TIMER_PERIODIC_MODE;
appNetworkStatusTimer.handler = appNetworkStatusTimerHandler;
SYS_TimerStart(&appNetworkStatusTimer);
by the LWmesh protocol this means that every 6ms the timer handler is called right? but I don't understand how it counts, is it like an interrupt? Something is decremented like a timer counter?
Thanks a lot
Hello everyone,
I'm an italian student and I'm working for my master work with the ATmega128RFA1 microcontroller. Hope you can help me and sorry for my english :)
- Log in or register to post comments
TopWhy not look line the source code then? Software timers run from a single hardware timer. By default hardware timer is set up with 10 ms interval, so all software timers have granularity of 10 ms. So 6 ms interval will actually be 10 ms (or 0, the rounding is not guaranteed).
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopThank you alexru,
I watched (better) the source code and it seems that all the timer intervals are decremented of 10 when setted. So setting timer with values under 10 or not-multiple of 10 has no sense right?
Hello everyone,
I'm an italian student and I'm working for my master work with the ATmega128RFA1 microcontroller. Hope you can help me and sorry for my english :)
- Log in or register to post comments
TopThat is correct. All events will happen on 10 ms boundaries, no matter what the timer interval is.
You can decrease 10 ms to 1 ms, for example, at the expense of higher CPU load, of course.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopHi, I want to experiment with a very simple routing algorithm, and I am wondering if I can do this by only changing the NWK_RouteNextHop function to the following:
uint16_t NWK_RouteNextHop(uint16_t dst, uint8_t multicast)
{
if( dst > nwkIb.addr )
return nwkIb.addr + 1;
else if( dst < nwkIb.addr )
return nwkIb.addr - 1;
}
Do I have to create a static routing table or would this bypass the routing table, ie. the searching of the routing table? Would this bypass the native route discovery that does the broadcast messages, sets up a reverse path, etc?
- Log in or register to post comments
TopYes, this will work and will route things along the line.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopMore on licensing: https://www.avrfreaks.net/comment...
Top Tips:
- Log in or register to post comments
TopHi Alex, is it possible for a device to send a NWK_DataReq to a device's own address? Like a HTTP request to localhost.
I have an a SAMD20 I2C slave, which takes all I2C packets and simply passes the data into a NWK_DataReq_t and does NWK_DataReq(). The first byte of the I2C is used as destination address, the rest is payload.
This SAMD20 is NWK_ADDR 0x0000
It's great, except when I want to send data to this particular device, NWK_ADDR 0x0000. This is particularly critical for joining the first other device to the network.
Sure I could add more I2C code to recognize that the packet is to be processed and not put into a NWK_DataReq_t.
But I would like to keep the I2C-to-NWK_DataReq module super simple. So what I want to do is send an I2C packet with the first byte = 0x0000. This would result in a NWK_DataReq_t with dstAddr = 0x0000; Then I can get at the payload inside of a DataInd() callback.
At first this didn't work because there was nothing in the routing table, and 0x0000 was trying to broadcast for route discovery. so I added this to nwkRouteInit()
nwkRouteTable[0].dstAddr = 0;
nwkRouteTable[0].fixed = 1;
nwkRouteTable[0].nextHopAddr = 0;
But it still doesn't work; now, NWK_ADDR 0x0000 tries to send to 0x0000 4 times and gives up. I can see that in these packets, MAC Src = MAC Dst = NWK Src = NWK Dst = 0x0000. I tried setting the option NWK_OPT_ACK_REQUEST, still nothing. The DataInd() is not getting called.
I'm stuck! Any ideas?
- Log in or register to post comments
TopNo, there is absolutely no internal routing of any kind. The only frames that have a chance of being indicated to the application have to come from outside.
You can add this logic either on the application level (where it really belongs) or inside the stack.
NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopI may have found a serious security issue with v1.2.1 when using XTEA. The end result is that not all of the data is encrypted, and much data is sent plain-text. The issue is in SYS_EncryptReq(). "text" is a uint8_t, and so the call to xtea(&text[2], key) does not encrypt the last 64 bits of data as expected. The calls to swap around the text before this are also not working as intended. "text" must be typecast to a U32 to correct this issue.
This is a regression in v1.2.1 as v1.1.0 worked correctly.
- Log in or register to post comments
TopNOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.
- Log in or register to post comments
TopPages