- This topic is empty.
September 10, 2014 at 10:38 pm #23159
A new version of the firmware updater software is now available:
This version supports auto-detection of hardware version, and auto-downloading of the latest firmware. We also removed a lot of unnecessary files and folders in the avr toolset, so the package is significantly smaller than before. When new firmwares become available in the future, you do NOT need to reinstall the updater software, instead, just click on ‘Update and Detect’ in the software and it will grab the latest firmware.
The software only supports OpenSprinkler 2.0, 2.1, and above.
Thanks to TechFan who proposed and implemented the ‘auto-downloading’ feature.September 11, 2014 at 4:20 am #28253
:). Glad to help!
Sent from my iPhone using TapatalkSeptember 11, 2014 at 7:43 am #28254
I got this error when clicking Update and Detect button on OSX:
java.io.IOException: Cannot run program “/Users/username/Downloads/osFirmwareUpdater”: error=13, Permission denied
Why would I be seeing this. . .if it has permission to run the first time, why after clicking the button?September 12, 2014 at 4:12 pm #28255
I can’t reproduce it. The only thing I can think of that would relate to ‘Permission issues’ would be if you were running the program in Linux and encountered USB permission issue. But it shouldn’t happen in Mac. What OSX version do you have?September 13, 2014 at 2:32 am #28256
10.9.4 on Macbook air 2011September 13, 2014 at 5:12 am #28257
I have the same version of OSX. After googling the error message, it looks like you may have a folder permission issue. The updater needs to grab osFirmware_info.txt and write it into the folder where the program is (this part is taken from the code you wrote), and you may want to check whether the program folder has write access.September 14, 2014 at 6:32 am #28258
Ok. It had to do with the path name. At first I thought it was permissions as well because I had allowed the process via the button on the security page instead of disabling the security completely like I did last time. But, that wasn’t it. I already had an updater in my downloads folder, so it got extracted to osFirmwareUpdater 2 instead of osFirmwareUpdater. It looks like the space in the folder name was the issue. I tested and found that the error is happening in the device detection routine.
It appears this line doesn’t like being in a path with a space in the osFIrmwareUpdater folder. . .I am not sure how to fix this one though. . .that is why I had different path detection logic in my script, because the .. folder navigation didn’t work when I was testing.
This is the line that fails on OSX if there is a space in the folder name:
\ Line added for debugging
println(“Now I am here – ” + sketchPath(“”) + “../avr-macos/bin/avrdude -C “+sketchPath(“”)+”../avr-macos/etc/avrdude.conf “);
command = sketchPath(“”) + “../avr-macos/bin/avrdude -C “+sketchPath(“”)+”../avr-macos/etc/avrdude.conf “;
}September 14, 2014 at 7:09 am #28259
Btw, the windows version also seems to have issues with the avr lines. . .September 15, 2014 at 6:22 pm #28260
I used the new updater over the weekend and it works great. I’m wondering if we can enhance the process to to read the existing configuration and then restore it after successfully flashing the device. I tried using the Chrome app to restore a profile, but it said I didn’t have one saved.September 15, 2014 at 10:11 pm #28261
Although unreleased at this point, I have updated my apps to do one of two things moving forward:
If you are using a device with file support (currently only desktop), you will have an export to file and import file options now. This is essentially a traditional backup/restore method.
If file support isn’t detected, a new import option has been added allowing a paste of the export email.
In addition to either of these methods, the previous method of using the app’s storage still exists and works.
Hopefully this will help the process!September 16, 2014 at 3:25 pm #28262
That will certainly help.
Thinking more about this, why not have a function in the firmware to save/restore settings to the SD card if available? Then the updater could do something like this:
1. Save settings to SD Card
2. Flash firmware
3. Restore settings from SD CardSeptember 16, 2014 at 4:53 pm #28263
The reason is the limited RAM on the device. The firmware can’t possibly keep track of all the different data storage methods of previous firmwares and convert them on update.
That’s why I’m handling it in the UI. I admit the process of using the updater to do this (grab config, flash, and upload back config formatted for the new firmware) is a good technique and something to explore.September 17, 2014 at 6:53 pm #28264
It looks like the space in the folder name was the issue.
OK, I am able to reproduce the problem as you said. This only happens on Mac (if the folder path has a SPACE character in it), because for some reason Processing assumes the ‘current directory’ on Mac is the home directory; whereas in Windows and Linux the ‘current directory’ is the folder where the executable program exists. Therefore for Windows and Linux you can use the relative path ./ or ../ to reference the firmware files. That’s also why on Mac the code has to use sketchPath(“”) to obtain the absolute path name of the ‘current directory’.
Anyways, the issue can be fixed by wrapping the path around quotes, something like this:
command = “”” + sketchPath(“”) + “../avr-macos/bin/avrdude” -C “”+sketchPath(“”)+”../avr-macos/etc/avrdude.conf “”;
this should solve the SPACE character issue. Will update the programs later today.
the windows version also seems to have issues with the avr lines. . .
Can you be more specific? I am not sure what you mean.September 17, 2014 at 7:06 pm #28265
Hm. I must have put the quote in the wrong place somehow because I thought I tried that without success.
On windows it fails to download files even when they are missing. . .and fails to run the avr command successfully when compiled. . .it seems I was able to get it to work when running from processing editor. . .September 18, 2014 at 2:41 am #28266
On windows 7 x86, this is the error I get:
java.io.IOException: Cannot run program “..avrbinavrdude”: CreateProcess error=2, The system cannot find the file specified.September 19, 2014 at 5:31 am #28267
I can’t reproduce this error. We’ve tested it on Windows XP, and Windows 8.1, and it works fine. I don’t have a Windows 7 machine right now but I can’t imagine how it works differently on Windows 7 than XP and 8.1.
Are you running the osFirmwareUpdater.exe in the ‘windows’ subfolder, or are you compiling and running the source code in Processing? If you are running it in Processing, the working directory will be different and hence the relative path would not work.September 19, 2014 at 5:40 am #28268
No, running compiled version from windows folder. Strange thing is that running in processing in parallel folder works.September 21, 2014 at 9:18 am #28269
I am not sure why it is working differently for me. I have tried it on two different Win7 computers. . .one x86 and the other x64. Both have the same problem. I did figure out what line is causing the issue, but I am not sure why and I don’t know why you aren’t seeing the problem. I guess I was also working on my OSX system that runs off SSD, maybe they are enough faster that they copy was complete before the next command started.
I commented out this line and the process works. . .it seems this command must still have the file locked when the next process starts which causes it to fail out. . .you added checks for success which is why it is stopping now when it would have just proceeded previously. I guess we need to take it out. . .I just wanted to maintain a backup copy since the process won’t start if this file is missing.
So, we either need something that can introduce a wait time to allow for completion or remove this line. In other tools, finding a sleep option was simple. . .doesn’t seem so with processing.
// saveStream(“../os_firmware_info_backup.txt”, “../os_firmware_info.txt”);
It seems like it should still run/start up even with that file missing. . .and then try to retrieve it. . .September 25, 2014 at 1:22 am #28270
@TechFan: ok, thanks for finding out the cause of the issue.
Tired of using Processing and learning about its quirks, we are now working on re-writing the updater program using Qt. Hopefully it will be done by this weekend.September 25, 2014 at 1:26 am #28271
K. Sounds good
- You must be logged in to reply to this topic.