Wireless programming patches

Some users have reported having trouble with wireless programming so I have made some changes to the Wireless Programming libraries and the examples included in the RFM12B lib examples and the RFM69 lib examples.

They are mostly tweaks, bug fixes and simplifications of the sample code. Hopefully things will be smoother now. As always, please let me know if the libs are not performing and I will do my best to patch the code and fix the bugs.

10 thoughts on “Wireless programming patches

  1. This wireless reprogramming is cool.

    Question: If you have more than one remote Moteino do they all get reprogrammed with the same program or can you target individual Moteinos?

      • I’m not seeing it. I admit I’m not an expert programmer. I see how the check hex gets called but how is the node set to be expecting a wireless update? If you had that could in several remote Moteinos, wouldn’t they all receive the sketch sent from the gateway and be reprogrammed? I guess I’m not seeing how a particular node gets set into the mode to receive a new sketch. Could you layout the basic flow, ie this happens then this…

        • When you send a message only the target node receives it. Unless you use promiscuous mode where anyone can listen in on all the traffic.

          • OK, after looking over the code more I figured it out – the ID of the target Moteino is hard coded into the gateway Moteino sketch. So the process is: edit the gateway sketch to have the ID of the remote Moteino you wish to reprogram and upload it to the gateway Moteino, run the python program to upload the new sketch intended for the remote Moteino to the gateway, when the gateway receives it it sends it wirelessly to the remote Moteino which then flashes itself and reboots. I think I have this right, please correct me if I’m wrong.

            When I get my Moteinos I’m going to attempt to alter the python script and gateway sketch so you can just give the remote Moteino ID on the python command line, unless you want to do this, Felix.

  2. Hi Felix,

    Sorry if my question seems silly, but in your example sketch (WirelessProgramming_node), how can you distinguish an update sent by the gateway from “regular” wireless activities? in other words, my own code for receiving informations (not an update) has to be somewhere near CheckForWirelessHex()?


    • When you get a message it can be anything. So CheckForWirelessHex() simply checks if the pattern matches a wireless programming handshake pattern, and if YES then start the whole transmission. I am testing some updates to make the actual transmission working at a different frequency (ex FERQ-8Mhz) to allow the normal traffic to go on without jamming it. So far so good, it works well. Will post updates when I have them.

Comments are closed.