Page 1 of 2

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 11:38 am
by rimai
Is it connected?
I can't seem to be able to see history of your controller.
It must be the space in your forum name or something else.

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 11:46 am
by Marshall O
rimai wrote:Is it connected?
I can't seem to be able to see history of your controller.
It must be the space in your forum name or something else.
Yes, its connected. My portal shows up fine? Here is how its coded:

Code: Select all

ReefAngel.Portal("Marshall%O");

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 11:47 am
by Marshall O
And I just checked, and I already have a Bus Lock :(

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 12:28 pm
by Marshall O
Just tried to update the firmware again, to make sure it went. I added
"@echo off
cmd"
to the Update.bat file to see what happened. Turns out it did not work. Here it is below:


C:\Program Files (x86)\Reef Angel Controller>avrdude -Cavrdude.conf -v -patmega3
28p -carduino -P\\.\COM3 -b115200 -D -Uflash:w:RF_Update_Bus_Check.hex:i

avrdude: Version 6.0, compiled on Apr 6 2012 at 19:29:19
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "avrdude.conf"

Using Port : \\.\COM3
Using Programmer : arduino
Overriding Baud Rate : 115200
Rebooting Reef Angel Controller
avrdude: stk500_getsync(): not in sync: resp=0x20

avrdude done. Thank you.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Program Files (x86)\Reef Angel Controller>


Am I missing something?

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 12:55 pm
by rimai
Did you edit the file to use the correct COM port?
Is COM3 the port you use to upload codes to your RA?
For you portal code, change it to this:

Code: Select all

ReefAngel.Portal("Marshall%20O");
It will enable you to get history in the correct forum id.

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 12:58 pm
by Marshall O
rimai wrote:Did you edit the file to use the correct COM port?
Is COM3 the port you use to upload codes to your RA?
For you portal code, change it to this:

Code: Select all

ReefAngel.Portal("Marshall%20O");
It will enable you to get history in the correct forum id.
Yes, I use COM3 to upload to RA.

And thank you, I will make that portal ID change now!

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 1:03 pm
by rimai
Make sure you unplug from the usb cable that connects to RA hub.
When you initially plug the programming cable, does the RF module blink red 3 times?

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 1:07 pm
by Marshall O
rimai wrote:Make sure you unplug from the usb cable that connects to RA hub.
When you initially plug the programming cable, does the RF module blink red 3 times?
To make sure we are on the same page, I unplug the USB on the RF, but have left the USB connected at the hub. Does that matter?

And yes, when I plug the USB-TTL into the RF module, it blinks red 3 times.

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 1:12 pm
by rimai
As long as it is not connected to RF, it doesn't matter.
Does it also blink three times when you execute update.bat?

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 1:14 pm
by Marshall O
Ok good.

It blinks red 3 times at each step while trying to update, as soon as it starts, twice while it tries to update, and once more once it is complete.

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 1:19 pm
by rimai
That's what it is supposed to do.
But it should upload in the middle.
Ahh..
Did you remove the RF module when uploading the code?

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 1:25 pm
by Marshall O
rimai wrote:That's what it is supposed to do.
But it should upload in the middle.
Ahh..
Did you remove the RF module when uploading the code?
Negative :( I have tried it at least 10 times. I even tried uploading the original firmware (RF_Update), and it does the same.


C:\Users\ohearn\Documents\Arduino\Original RF Firmware>avrdude -Cavrdude.conf -v
-patmega328p -carduino -P//./COM3 -b115200 -D -Uflash:w:RF_Update.hex:i

avrdude: Version 6.0, compiled on Apr 6 2012 at 19:29:19
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "avrdude.conf"

Using Port : \\.\COM3
Using Programmer : arduino
Overriding Baud Rate : 115200
Rebooting Reef Angel Controller
avrdude: stk500_getsync(): not in sync: resp=0x20

avrdude done. Thank you.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\ohearn\Documents\Arduino\Original RF Firmware>


I'm assuming if it worked correctly, it would do something besides saying "not in sync", correct?

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 2:59 pm
by rimai
You must remove the rf module to upload codes

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 3:20 pm
by Marshall O
rimai wrote:You must remove the rf module to upload codes
Sorry, I guess I did not understand your original question. I can't remember if the RF module was installed when I last uploaded my code. So I just did it again, with the RF module removed. I still could not get the RF module itself updated, but if your fix to the RF.cpp works, then I guess it won't matter anyways.

I will update either if I get another Bus Lock, or hopefully later on tonight with some success!

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 3:36 pm
by rimai
It is very important to remove the ecotech RF board from the module prior to updating the module or it will definitely fail.
Make sure to detach it and put it aside.

Re: Bus Lock Issues

Posted: Fri Dec 26, 2014 3:43 pm
by Marshall O
rimai wrote:It is very important to remove the ecotech RF board from the module prior to updating the module or it will definitely fail.
Make sure to detach it and put it aside.
Again, I misunderstood what you were asking! Now I understand :) I removed the Ecotech board, did the update (which of course now worked fine!), and reinstalled it. I guess I should be good to go now.

So sorry about the misunderstanding of physically removing the Ecotech board. Thank you so much for all of your help though!

Re: Bus Lock Issues

Posted: Tue Dec 30, 2014 8:40 am
by Marshall O
Following up on this, the firmware update works as it should, checking for Bus Locks every 5 minutes and then clearing. My question is, does the Bus Lock turn on relays for other people? Some of the times it just locks, and does not turn on or off any relays. Other times, it will turn on some or all relays that are off. This caused me to already have to change out my ATO pump, as it was dumping in gallons of water when the relay kicked on and stayed on for a couple of minutes before the bus lock was cleared. That and it is turning on my lights at times when then should be off. Last night they came on at about 9:45PM. Normally when the bus lock clears, it turns them back off. This time, they stayed on. I had to manually turn them off around 10:15PM after it was clear they were not turning back off. I am not sure if it changed the time on my controller, or what the problem was (I did it from my phone). When I woke up this morning, they were back to running in auto (and so they were off).

I am going to be going away on vacation for a week shortly. I certainly don't want to be worried about my lights being locked on throughout the night. That has already happened to me in the past, and I ended up losing a lot of corals. So, I am just seeing if this happens to anyone else, and if there is any kind of a fix.

Re: Bus Lock Issues

Posted: Tue Dec 30, 2014 9:21 am
by rimai
This is definitely not normal.
I think the bus lock is messing with your clock and that's why the lights kicked on.
But, you are getting way too many bus locks.
Are you using the original USB cable that came with the modules?
What other modules do you have?

Re: Bus Lock Issues

Posted: Tue Dec 30, 2014 10:03 am
by Marshall O
rimai wrote:This is definitely not normal.
I think the bus lock is messing with your clock and that's why the lights kicked on.
But, you are getting way too many bus locks.
Are you using the original USB cable that came with the modules?
What other modules do you have?
Yes, I am using all original USB cables that were supplied. I have the WiFi attachment, expansion hub, single water level, and RF module. I got at least 18 bus locks yesterday (I setup and email notification yesterday morning for it). I turned the email notification off this morning as I was getting way too many emails!

Re: Bus Lock Issues

Posted: Tue Dec 30, 2014 10:07 am
by rimai
Yeah, I know. I looked at your history.
Does the problem persist if you remove the RF module?

Re: Bus Lock Issues

Posted: Tue Dec 30, 2014 10:10 am
by Marshall O
As far as I know, yes. I only removed it when I was trying to update the firmware, but I did not have any bus locks during that time. If I do get a bus lock, I can just unattach the USB on the RF and it immediately clears it. I have tried three different ports on the expansion hub (I am not plugged into the side, as some saw less issues with it plugged in there), but this has not made a difference.

Re: Bus Lock Issues

Posted: Tue Dec 30, 2014 10:22 am
by rimai
Ok, let me try using a different library. Give me a couple days.

Re: Bus Lock Issues

Posted: Tue Dec 30, 2014 10:23 am
by Marshall O
Thanks Roberto!!

Re: Bus Lock Issues

Posted: Thu Jan 01, 2015 7:09 pm
by rimai
Ok, let's try this one.
Let me know how it goes.

Re: Bus Lock Issues

Posted: Thu Jan 01, 2015 8:09 pm
by lnevo
Roberto any improvements to this one or something specific for Marshall?

Re: Bus Lock Issues

Posted: Thu Jan 01, 2015 8:11 pm
by rimai
No improvements. I just used a different I2C library to see if the interferences go away. The bus locks are coming externally from something that is causing the signal to deteriorate.

Re: Bus Lock Issues

Posted: Fri Jan 02, 2015 7:02 am
by Marshall O
rimai wrote:Ok, let's try this one.
Let me know how it goes.
Thanks Roberto! I will do this tonight when I get home, and then update tomorrow :)

Re: Bus Lock Issues

Posted: Fri Jan 02, 2015 6:45 pm
by Marshall O
Well, the update did not go well. It immediately locked, and didn't clear itself. Tried again (I installed the original firmware, then re-installed the new update), and same thing. Immediately locked. So I re-installed the bus lock fix in the meantime. The only thing I can think of that would be causing my interference may be the microinverters for my photo-voltaic system. From the manual: "This equipment generates, uses and can radiate radio frequency energy..."

Re: Bus Lock Issues

Posted: Sat Jan 03, 2015 11:49 am
by rimai
Are you using the RF module for Radions or just vortech?

Re: Bus Lock Issues

Posted: Sat Jan 03, 2015 11:53 am
by Marshall O
rimai wrote:Are you using the RF module for Radions or just vortech?
Just Vortechs. (2) MP40s, (2) MP10s.