Wireless Programming Randomly Aborts

Started by grinch65, January 07, 2016, 11:02:19 PM

grinch65

Hi All
Bit of a problem... During wireless programming, the process will just randomly abort (please see attached pic).
Two new recently purchased MoteinoMEGA's. 915Mhz with Serial EE chips.
All library/code is current, and I'm running both the example WirelessProgramming_gateway and ~_node sketches. Only change made is that I've updated to the radio.ACKRequested() method in the gateway code.
When I run the python script, it seems to be going fine for a while, then all of a sudden it will timeout- in random spots. sometimes 10 blocks in, sometimes 200...
There are no other Moteinos running that could be causing interference.
Strangely, both Moteinos seem to run the gateway/mode ping programs PERFECTLY with no noticed timeouts or retries.
Any help would be greatly appreciated as it's been a frustrating couple days!
Thank you.
Jeff

Felix

Just a couple of things to try:

- use a different starting frequency on both moteinos, ex with radio.setFrequency(917000000) //for 917mhz
- if you use RFM69_ATC, try it without
- swap moteinos
- try a different environment/location if possible
- perhaps try the GUI version of WP

My gut is this is interference or something like that. The libs and sketches are fine since other people use it without a hitch. Usually WP works flawlessly when it works. It's very rare that it fails, and if so it usually fails before it begins.

I would want to know more about your changes to ACKRequested() and why you needed that. It could be critical.

Last resort is to debug deeper into the 2 motes to see why it stops. Unfortunately not very easy and quick to do, usually i pull the logic analyzer and let it capture the whole thing and then analyze the SPI traffic, requires some register and library knowledge to identify the SPI bytes.

grinch65

#2
Hi Felix

Thank you for your quick reply.
In terms of radio.ACKRequested(), I didn't actually change the radio.ACKRequested() code in any way. I simply changed the one instance of radio.ACK_REQUESTED I found (in the gateway sketch) TO radio.ACKRequested(). There seemed to be several references I found mentioning that radio.ACK_REQUESTED had been deprecated. That's really it in terms of changes.

In terms of your suggestions:

- use a different starting frequency on both moteinos, ex with radio.setFrequency(917000000) //for 917mhz

   Once I figure out where to do it, I'll definitely try this.

- if you use RFM69_ATC, try it without

   The WirelessProgramming_gateway example (as written) doesn't seem to use this object (RFM69_ATC.h), so maybe I'll actually try to use it and see if it makes a difference. The Gateway and Node (Ping) sketches, on the other hand, do use it and they seem to work just fine for me.

- swap moteinos

   I have tried this, but I'll document my efforts a bit more carefully.

- try a different environment/location if possible

   I've moved the node-side all around the house, and it seems to have the same result. I'll try moving the Gateway-side as well.

- perhaps try the GUI version of WP

   I did try the GUI, but when I did, it just kept scrolling and scrolling without progress. I'll document this a bit more carefully as well.


I do have a Saleae logic analyzer, so if it came to that, I can certainly capture the traffic and provide it.

I'll let you know. Thank you.
Jeff

Felix

Jeff,
Thanks, sounds like you're doing everything right. So you're using the latest libraries and the 2 stock examples WirelessProgramming_gateway/node (with just the radio settings adjusted). Those should really work regardless of the ACK_REQUESTED change.
Does it always fail or just sometimes?
The WP GUI exe was updated recently so you might want to check that too. If that has any bugs please let me know also, it should work equivalent to the python script but there could still be bugs.

grinch65

Hey Felix

Where do you recommend that I put the radio.setFrequency(917000000)?
I tried it right after radio.initialize() and it seemed to freeze the process.

thanks!

Jeff

Felix

Should work anytime after radio.init(). But put it in setup after all init and other radio calls are done.