Bus Lock Issues

Expansion modules and attachments
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post 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.
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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");
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post by Marshall O »

And I just checked, and I already have a Bus Lock :(
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post 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.
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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!
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post 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?
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post 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?
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post 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?
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post by rimai »

You must remove the rf module to upload codes
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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!
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post 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.
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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!
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post 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?
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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!
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post by rimai »

Yeah, I know. I looked at your history.
Does the problem persist if you remove the RF module?
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post by rimai »

Ok, let me try using a different library. Give me a couple days.
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post by Marshall O »

Thanks Roberto!!
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post by rimai »

Ok, let's try this one.
Let me know how it goes.
Attachments
RF_Update_NewI2C.zip
(423.74 KiB) Downloaded 422 times
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Bus Lock Issues

Post by lnevo »

Roberto any improvements to this one or something specific for Marshall?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post 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.
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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 :)
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post 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..."
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bus Lock Issues

Post by rimai »

Are you using the RF module for Radions or just vortech?
Roberto.
Marshall O
Posts: 24
Joined: Sat Apr 26, 2014 11:19 am

Re: Bus Lock Issues

Post by Marshall O »

rimai wrote:Are you using the RF module for Radions or just vortech?
Just Vortechs. (2) MP40s, (2) MP10s.
Post Reply