Moteino R2 Wireless Download Comments

Started by gbg, September 12, 2013, 04:58:02 PM

gbg

I just upgraded my original R2's with the additional flash memory and loaded the new Dual Optiboot code, so I thought I'd share my experiences:

The flash memory IC is straightforward to add-- use a small , low power soldering iron, position the chip and tack solder one pin only, until you get perfect alignment for all the pins,then finish the job.
I used an AVR ISP programmer similar to the one Felix described in his blog and made a socket to temporarily accept the Moteino R2 for programming the new dual optiboot loader-- very straightforward. Follow directions-- remember you are loading the Flash memory in the Moteino, not the EEPROM.
I loaded a new copy of Python 2.7.3 as I did not have it already on my Win Xp machine. It will NOT work as is. You need to also load the serial module for Python. (use http://sourceforge.net/projects/pyserial/ )

I downloaded the latest release of the RF12B, SPIFlash, and WirelessHEX libraries from https://github.com/lowpowerlab
unpacked them, and installed tjem in the Arduino\libraries folder. ALL are required.

The WirelessProgramming_gateway and WirelessProgramming_node sketches were loaded as is onto two Moteinos, after verifying that each Moteino worked with the send and receive examples. All operating at the 915 Mhz defaults. (The supplied lengths of wire were soldered in place as antennae.

Nothing worked, except the USB downloads to the Moteinos.
After much study of Python scripts to refresh old memories (mine), I tried shortcuts, replacement of files and folders to no avail.
As was mentioned in another thread, the only thing that worked was to edit the COM channel, baud rate, and file name to download all in the .py script. Scripts and files were all placed in the Python27 folder.

Now it worked after about 12 tries! The 2 Moteinos were about 18 inches apart on either side of my laptop. Experimentation revealed that physical placement/location of the Moteino (NOT distance between) was important to correct operation. After another morning of experimentation, I can add some small notes: The transmission is very much affected by pieces of metal nearby as well as people. I suspect that electrical noise from my fluorescent lights may have been affecting it too, but I am not sure.
By repositioning the antenna, and the Moteino I eventually could get to about 80-90% working consistency, but never 100%.
Height helps. Full vertical extension of the antenna helps. Placement away from any metal objects helps.

There are two very intermittent failure symptoms:
After completion of a good download, the next down load will fail to sync up after a few tries and time out. I tried lengthening the time out values and retry number of attempts in both the Python script and the on board sketches to no avail. The original library examples worked well. The next try following almost always worked!
The second failure was even less common, but did recur-- after a successful download, the Python script kept repeating an EOF acknowledge and then froze-- the way out at the command line level was a control-C.

I suspect that there are still synchronization/timing bugs in the code, and perhaps in the original libraries. The ack/nack flow needs to be more robust.

As an added comment: I had run the regular send/receive tests for hours on the Moteinos with no problems to report AT ALL.
That is why I suspect that other synchronization/timing problems exist.

And if you can't tell... I really like these Moteinos!   :)

Best Regards,
Geoff

Felix

Geoff,
Wireless programming is not perfect... but it works .. hopefully someone else can contribute as well.
Thanks for sharing  ;)