Author Topic: sendwithretry to gateway fails after upgrade to v9 [solved]  (Read 809 times)

loseymark

  • Jr. Member
  • **
  • Posts: 57
  • Country: us
I upgraded to gateway 9 on a pi 3. The gateway app is working fine and weathermote nodes are working, but I get ACK:NOK from switchmote.

I downloaded new sketches from the guide for mightyhat and switchmote to no avail.

I implemented a new switchmote with the same behavior.

I loaded node and randomnumber sketches to the old switchmote moteino which was working fine before the gateway upgrade and sendwithretry prints nothing...

So this is one old and one brand new moteino 915Mhz WC doing the same thing.

Everything on switchmote functions except communication to and from the gateway.

Any suggestions on how I can troubleshoot further?
« Last Edit: July 31, 2019, 09:39:56 AM by Felix »

loseymark

  • Jr. Member
  • **
  • Posts: 57
  • Country: us
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #1 on: July 25, 2019, 07:01:37 PM »
I have verified a moteino USB for which  I haven't relaoded the sketch in a long time and it is functioning fine on the upgraded gateway.

So my weathermotes and moteino USB work, but not the new switchmote or the old switchmote which was working prior to the gateway upgrade.
« Last Edit: July 26, 2019, 11:47:47 AM by Felix »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #2 on: July 26, 2019, 11:50:18 AM »
One thing to note is the OLD P2 and NEW P3 SwitchMotes have different sketches.
Their EEPROM settings did not change, so all you should do is make sure your P3 has the P3 sketch. See this guide page for the P3 sketch link.
The older P2 - if untouched - and based on the fact you report other motes are working (same settings and everything matches) - should also work.

Did you happen to take a backup before the V9 upgrade?

loseymark

  • Jr. Member
  • **
  • Posts: 57
  • Country: us
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #3 on: July 26, 2019, 01:38:10 PM »
I tried the switchmote sketch in your link. No change.

I sill have the old gateway Raspberry PI untouched as a backup.

It seems no new moteino will talk to the gateway. Only the ones where no new sketch was loaded.

I tried with yet another spare moteino with the same results.

I've checked gateway serial communications and all is fine.

I loaded the MIGHTYHAT gateway sketch from the MightyHAT guide. I have R3. DO I need a new MightyHat?

How can I further troubleshoot? in minicom I see the weathermotes sending data back to the gateway. 

loseymark

  • Jr. Member
  • **
  • Posts: 57
  • Country: us
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #4 on: July 26, 2019, 04:01:06 PM »
I've made a little progress. I loaded an old weathermote sketch to one of the moteinos that was failing and it worked.

So I have a mismatch of sketch to gateway sketch I'm guessing. Any suggestions on what switchmote sketch I might want to load?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #5 on: July 26, 2019, 04:07:11 PM »
Look in the switchMote github directory: https://github.com/LowPowerLab/RFM69/tree/master/Examples/SwitchMote
R2 is for the older R2.
The SwitchMote.ino is for R3.

loseymark

  • Jr. Member
  • **
  • Posts: 57
  • Country: us
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #6 on: July 26, 2019, 07:27:36 PM »
and what gateway sketch should I use for gateway v 9 on a mightyhat R3?

loseymark

  • Jr. Member
  • **
  • Posts: 57
  • Country: us
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #7 on: July 26, 2019, 07:58:23 PM »
I pulled the switchmote sketch and the hightyhat sketch from github RFM69/examples and the results are the same. Previous moteinos are working and the new switchmote is not.

Next I'm going to pull all the libraries new from github and recompile and reload everything.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #8 on: July 27, 2019, 09:17:38 AM »
MightyHat sketch is the same. Nothing changed as far as firmware. Only the gateway software has changes. And for your p3 switchmote you need yhe proper sketch. And of course match all settings in the Gateway as before (or just keep your old settings file).

loseymark

  • Jr. Member
  • **
  • Posts: 57
  • Country: us
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #9 on: July 27, 2019, 03:35:08 PM »
I'm out of ideas. I've reloaded the gateway (mightyhat) and switchmote p3 sketches after replacing all the libraries with the latest versions from github.

When I load a weathermote script on my original switchmote moteino, it pops right up on the gateway as a new node. When I load a switchmote sketch or the randomnumber sketch onto the same moteino or the new switchmote, give the switchmote a never used node ID and do a reboot on the switchmote, and reset the switchmote, no new node pops up. If I manually add a new light switch node and click one of the buttons, the gateway reports ACK:NOK.

Would you say I am not talking over radio between the moteino and the gateway?

I manually entered the settings on the gateway v9, but nothing changed besides the IP of the gateway.

Any suggestions would be welcome.

loseymark

  • Jr. Member
  • **
  • Posts: 57
  • Country: us
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #10 on: July 27, 2019, 06:15:09 PM »
Found the problem with randomnumber sketch. I did not comment out HW.

Still don't know how to debug switchmote. I've gone over the EEPROM config settings and it looks right.

Would like to be able to debug the radio initialization and sendwithretry calls, but don;t know how.

sparky

  • Sr. Member
  • ****
  • Posts: 260
  • Country: us
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #11 on: July 27, 2019, 06:23:06 PM »
loseymark,
After loading the sketch, did you push any buttons?  It won't just pop up on the gateway unless you do.

loseymark

  • Jr. Member
  • **
  • Posts: 57
  • Country: us
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #12 on: July 27, 2019, 09:22:50 PM »
yes, I activated all the buttons plus reset

loseymark

  • Jr. Member
  • **
  • Posts: 57
  • Country: us
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #13 on: July 28, 2019, 08:30:24 PM »
I'm guessing it's an assembly issue. My soldering skills and equipment leave a lot to be desired, and that's being generous.

loseymark

  • Jr. Member
  • **
  • Posts: 57
  • Country: us
Re: sendwithretry to gateway fails after upgrade to gateway 9
« Reply #14 on: July 29, 2019, 02:52:15 PM »
So I purchased two switchmotes R3. I assembled the second one being very careful. It went together well. Tested the PCB. Pretested the moteino with the remotenumber sketch. All looked good. Loaded the sketch. Saved, rebooted, hooked to the MAINs. Same behavior as before. Activated all buttons plus the reset. The relays, switches, LEDs work. activating the buttons on the switchmote does not send any data to the gateway.

Manually added the node with httpendpoint. When a button is pressed on the node page, I get "GTWCMD:52:BTN1:1 ACK:NOK"

The only thing I can do now is to try the old gateway.

Still looking for a way to validate radio initialization and sendwithretry. Should this happen upon switchmote button press? If not, when?