Wireless programming problems

Started by luisr320, February 22, 2015, 11:17:30 AM

luisr320

As my post was burried on a closed topic, I repost it here in hope for some help:

QuoteI finally decided to try to wirelessly program my moteinos.
For some reason, some nodes accept the programming that is not intended to them, even tough I am very careful with the node numbers on the python command.
For instance, issuing the following command, python wp.py -t 02 -f flash1.hex -s com9, I reprogram node 2, node 5 and node 4.
HELP please
:'(

Felix

That's very weird. You must check your listening Moteinos to ensure they are not in promiscuous mode. They should not accept messages that are not addressed to them.
Also the WP should pretty much not work if 3 nodes are responding to the programmer. It sounds impossible how this might even work.

luisr320

I do have promiscuous mode enabled on those nodes. One of the nodes was immune to the WP "contamination" and that one didn't had promiscuous mode enabled.
But shouldn't the python script target a specific node number as the destination of the WP? To be able to use promiscuous mode, should I insert the [CheckForWirelessHEX(radio, flash, true)] only after the [if (radio.TARGETID == NODEID)] on the main loop?
I don't have a particular reason to have promiscuous mode enable on these nodes and disabling it seem to be the starting point to solve this problem.

I thought of using promiscuous mode as a way to make a mesh-like network, where a node would be able to check if a data package was intended to someone else and would simply retransmit it if it wasn't, thus making the range virtually limitless.
Maybe this is not the best approach for this.

Anyway, going for a trip today, so no time for testing. But by Friday I will have some more info.

Thank you Felix

TomWS

Quote from: luisr320 on February 24, 2015, 02:51:55 AM
<...snip> and disabling it seem to be the starting point to solve this problem.

<snip...>
No, it's not the 'starting point' to solve this problem, it is the solution to the problem.

Promiscuous mode, as you already know, causes the radio to receive EVERY packet.  Unless you want to re-write the Wireless Programming library, the library will pick up EVERY WP update, whether it's intended for that radio or not.  You would have to put in a software filter into your own version of the library to ignore any targets that are not the specific node.  This isn't a problem on the transmit end, it's a problem on your node implementation. 

Tom

luisr320

That's great news.
And what  about having the [CheckForWirelessHEX(radio, flash, true)] only after the [if (radio.TARGETID == NODEID)] on the main loop?
Would that filter the WP to the intended node?

Thank you for your reply

Felix

CheckForWirelessHEX() has to be called as soon as possible, while the packet is still in the library buffers.

luisr320

Just to close the topic, everything is working just fine now. I did had promiscuous mode on on the "contaminated nodes" and that was allowing every node that was listening to accept the wireless programming not intended to it.
Anyway, now all works just fine.
Thank you for your help.