WP problems

Started by mzv72m, January 23, 2016, 10:45:02 PM

mzv72m

I have been working with the Moteinos for a few years now, but have not used WP.  I am now setting up a node to monitor my sump pump, which is in a crawl space.  I would prefer not to have to crawl down there if I need to make a minor change to the sketch on the node.  So I have been trying to setup and test WP while I still have the node on my bench.  Well it is not working for me.  I have read all the forum entries and blog posts on the subject and I am using the newest version of the OTA Programmer (1.2), and have updated all the libraries.  I keep receiving the error "No response from moteino programmer, is it connected to COM16?". 
Attached is a screen capture of the error.

This is probably something very simple that I am missing.  Hopefully someone more experienced with WP can point me in the right direction to find my problem.

Thanks,

Dan
Dan

syrinxtech

Quote from: mzv72m on January 23, 2016, 10:45:02 PM
I have been working with the Moteinos for a few years now, but have not used WP.  I am now setting up a node to monitor my sump pump, which is in a crawl space.  I would prefer not to have to crawl down there if I need to make a minor change to the sketch on the node.  So I have been trying to setup and test WP while I still have the node on my bench.  Well it is not working for me.  I have read all the forum entries and blog posts on the subject and I am using the newest version of the OTA Programmer (1.2), and have updated all the libraries.  I keep receiving the error "No response from moteino programmer, is it connected to COM16?". 
Attached is a screen capture of the error.

This is probably something very simple that I am missing.  Hopefully someone more experienced with WP can point me in the right direction to find my problem.

Thanks,

Dan

Are you running the updated OTA gateway code on the Moteino you have connected to your laptop?  Since Felix updated the OTA programmer, HEX libraries and the gateway software, just make sure you're running the latest version of all 3.

mzv72m

Everything should be at the current version:
  - OTA Programer v1.2
  - Moteino connected to laptop using the most current WPG sketch
  - All Libraries updated especially WirelessHEX69
  - Also updated the remote moteino manually after it did not work, so its using the current versions of the libraries

I think I have another Moteino to swap out the WPG, which is the next step I am going to try (If I do have another)

Dan

Dan

Felix

Basically it looks like your WPG moteino is simply not responding to the FLX? handshake request from the GUI.
So thats the very first thing that happens. If that doesn't work I would debug the serial connection.

syrinxtech

Dumb question, but at what baud rate did you program the WPG Moteino?


Felix

WP assumes 115200 which is pretty standard on all my stock sketches.

mzv72m

Quote from: syrinxtech on January 25, 2016, 04:44:11 PM
Dumb question, but at what baud rate did you program the WPG Moteino?

I used 115200  based on the default setup.  I also tried a 2nd WPG moteino with the same  error.

Quote from: Felix on January 25, 2016, 01:20:06 PM
Basically it looks like your WPG moteino is simply not responding to the FLX? handshake request from the GUI.
So thats the very first thing that happens. If that doesn't work I would debug the serial connection.

When I get a chance I'm going to use a different usb cable and see if that solves the problem.

Thanks for the help guys,

Dan
Dan

Mobsens

I had this situation several times and here is my short checklist to avoid problems:

1. Make sure to have your modified  Gateway and Node sketches running fine on two Moteinos  updated with your specific values on IMPORTANT 
   SETTINGS.  I usually also set TRANSMITPERIOD to 5000 to slow things down when displaying Moteino GW connected to COMport  in Serial Monitor.
   Also make sure to have added the check for wireless statement in the Node sketch.

             if (radio.receiveDone())
            {CheckForWirelessHEX(radio, flash, true);


2. Then upload latest WirelessProgramming_gateway sketch to Moteino GW making sure that IMPORTANT SETTINGS are matched to node.
    Open COM port to check in Serial monitor that GW  it is waiting for wireless programming and close Serial Monitor again.

3. Now compile modified Node sketch with Export Binary to send the hexfile to new Node folder.( works in Arduino 1.6.7)

4. Start WirelessProgramming.exe , check COM port and browse to hexfile , enter TargetID and press Start.

5. Now things usually work , maybe you have to press Start more than one time.

6. Design your own node sketches making sure that the listening loop is always running to listen for WP message.
    Take care if you use watchdog reset in your loop as loop is not running during programming period.

mzv72m

Felix,

I see there is a new version of the OTA Programmer v1.3

Comments say 'fix bug for DEBUG mode'

So is there a debug mode for the programmer?  And if so how do you enable it?

You also mentioned to Debug the Serial Connection.  I am not really sure how to do that.

I'm a programmer (mainframe) but this is outside my area of knowledge.
Dan

Westy87

OK I followed the instructions to upgrade speed to 3 HEX file lines per RF packet :
1. Updated  WirelessHEX69 lib (I'm  using Codebender, so to be double sure, I put latest WirelessProgramming.zip into "Personal Libraries"
2.Uploaded latest WirelessProgramming_gateway sketch to Moteino GW (making sure that IMPORTANT SETTINGS are matched! )
3. Downloaded Wireless Programming GUI app v1.3

I get successful OTA/WP uploads at 1 line per packet only. 2lpp and 3lpp give me OUT OF SYNC: retrying...errors
Obviously, I've done something incorrectly.
Any ideas?

Felix

@mzv72m,
Yes I just updated the WP GUI to make it work with DEBUG on.
WP Debug mode is enabled by passing true as the last parameter in the function (default is false):
CheckForSerialHEX((byte*)input, inputLen, radio, targetID, TIMEOUT, ACK_TIME, true);

That makes it more verbose.
Your WP programmer Moteino is not talking to the GUI. There's some problem with the serial connection. Make sure you pick the right serial port. Use a serial echo example to test the serial connection:
https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

@Westy87,
Make sure you run the latest lib from github, the codebender stuff might be grossly out of date.
Then update your WP Gateway example.

mzv72m

Quote from: Felix on January 28, 2016, 11:03:34 PM
@mzv72m,
Yes I just updated the WP GUI to make it work with DEBUG on.
WP Debug mode is enabled by passing true as the last parameter in the function (default is false):
CheckForSerialHEX((byte*)input, inputLen, radio, targetID, TIMEOUT, ACK_TIME, true);

That makes it more verbose.
Your WP programmer Moteino is not talking to the GUI. There's some problem with the serial connection. Make sure you pick the right serial port. Use a serial echo example to test the serial connection:
https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

Felix,

Thanks for the help. 
I did not think of using SoftwareSerial for debugging.  I will give this a try when I get home tonight.

When trying I was watching the WPG and its LED.  The LED will blink listening for something.  Then when I select Start on the OTA Programmer the LED will go dark for a second or two then the error pops up and the LED will start blinking again like its waiting on something to do again.

I will see if I can put together a SoftwareSerial debug sketch.  Just did not know how I was going to debug the serial line while using the same serial line.

Thanks again,

Dan
Dan

syrinxtech

Has anyone gotten OTA working with the RFM69 ATC library? 

Ever since I upgraded my outdoor weather station to ATC I cannot use any form of OTA updates.  I tried using the old Python script and all versions of the Windows tool. 

All I get repeatedly is "No response from Moteino programmer....".  Yes, the serial is working.....

The LED on the programming Moteino is blinking at a fast pace and never stops.

Tried all 3 speed settings.  Different USB cables, different Moteinos.  I even added the ATC library to the WP sketch with no luck.

The first time I run the program I get a "target set error".  I run it again and then I get the "no response" error message.

mzv72m

I will need to try WP after commenting out the ATC on the node I have been working with.  This is my first try with WP and so far it has not worked.  It will be interesting to try after disabling the ATC on the node.  Easy to do since I have not deployed it yet.
Dan

Felix

I added RFM69_ATC to my local WirelessProgramming_gateway and WirelessProgramming_node samples.
I ran WPGUI v1.3, speed "3", worked first try.
I think the problems being reported here must be doing with the WirelessHEX69 lib being out of date.
Again here is the changeset that added support for the 50% WP speed increase. Ensure you have this lib running in your IDE.
Then please try the original WP sample sketches without changes other than the radio settings. If it works with ATC it must work without it too.