Hello, After the Ubuntu2.1 upgrade for some reason my NEO M4 looses the program after reset and or the power is removed. I have a simple blink for 3 LEDs. Using a Mac to program the M4. I can program and reprogram while the power is on. As soon as I have a reset or remove the power the program is gone or at least is not running automatically. Anybody with the same problem? Thanks, -Jack
I will test later today, but what if you compile and upload the blink example from the Arduino IDE on the Neo do you have the same behavior after reboot? This to check if it is an error in the Mac M4 uploader. Does the file /var/opt/m4/m4last.fw.exists and not empty? From manual: Last Arduino Sketch When the system boot, it checks if a sketch compiled with the Arduino IDE is saved in the default location, which is /var/opt/m4/m4last.fw. You can modify this behaviour uncommenting and modifying the m4last variable in /boot/uEnv.txt.
I am using the Arduino IDE with a USB Cable not WiFi to program the M4. Arduino 1.6.12 - latest MacOS Sierra - latest I did not try to use the Neo Arduino IDE. On the road. I will look at the files you asked when I am back. Thanks Jack
I must confess we are in shortage of Macs at the moment. We have re-tested it on a PC and it works, there was a problem related to the other issue that @ektor5 has solved. Could you retry it? After the other issue being solved this problem should be solved too. I apologize for the inconvenience.
Andrea, I may help on test on Macs. Just need to give me some heads up if I am traveling, so I can take my Neo with me. As you can notice I have not touched it in a while. What exactly are you asking me to confirm/test? As of yesterday when I tested my Neo with MacOS Sierra, it was able to program using the Arduino IDE but as soon as reset the board or remove the power the M4 program was gone. That is, I can program it with MacOS Sierra Aurdio IDE 6.12, the problem is that the M4 Arduino program does not run after a reset or power is removed. Has any software changed since yesterday night Pacific Time, that you would like me to test? Thanks, -Jack
Edit 26Oct2016 Fixed this by Deleting /Users/<user>/Library/Arduino15 And installing the UDOO Neo Library. I was able to use the Aurduino IDEO 1.6.12 to compile abd upload to the NEO. But the M4 looses the program after a reset or power cycle. See this Thread for more details and eventually a fix. ------------ I am trying from another Mac running OSX Yosemite Installed Arduino 1.6.12 Then trying to add Neo Error downloading https://github.com/UDOOboard/udoofo....2/udooclient-1.2-x86_64-apple-darwin.tar.bz2 java.lang.RuntimeException: java.lang.Exception: Error downloading https://github.com/UDOOboard/udoofo....2/udooclient-1.2-x86_64-apple-darwin.tar.bz2 at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$1(ContributionManagerUI.java:176) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.Exception: Error downloading https://github.com/UDOOboard/udoofo....2/udooclient-1.2-x86_64-apple-darwin.tar.bz2 at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:113) at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:67) at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:110) at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$1(ContributionManagerUI.java:173) ... 1 more Caused by: java.io.IOException: Received invalid http status code from server: 416 at cc.arduino.utils.network.FileDownloader.downloadFile(FileDownloader.java:194) at cc.arduino.utils.network.FileDownloader.download(FileDownloader.java:128) at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:111) ... 4 more
Here are some more tests. All using Macs: Tried Blink from the Neo Linux (slooooow) Arduino 1.6.5 compilation side. It works. That is the M4 does not loose the program after reset or power cycle. Tried Blink from the Neo Arduino WebIDE, that is compile withing NEO and upload to the M4. It works. That is the M4 does not loose the program after reset or power cycle. Tried Blink from Neo Web Interface samples; that is just upload the file. It does not work. That is the M4 looses the program after a NEO Reset or power cycle Back to the Mac OS Sierra and Yossemite with Arduino 1.6.12. It does not work That is the M4 looses the program after a NEO Reset or power cycle It seems is indeed the Mac install with Neo that was failing and we have to use the work aoround. Also for some reason if I upload the samples from the NEO Web Interface the M4 looses the program after a reset or power cycle. Thanks, -Jack
Some more tests. I decided to copy the SD Card again just in case. So it is fresh. Tried Blink from Windows 10 and Arduino1.6.12. It is a hit or miss. Some times it work some times it does not work. That is the M4 some times looses the program after reset or power cycle. Other times it does not. Are you guys running Arduino 1.6.12 on Windows, Mac, and Linux? Is is the Aruduino M4 code running after you reset the NEO and or power cycle? -Jack
Hello, you may not believe this. Lets see if you can replicate. Background, I am using a 85Mbps SD Card 64G I am in the opinion that if you program the Neo M4 using Arduino 1.6.12 (latest version today) usin a Mac or Windows and you power cycle or reset the board short (lets say < 10 s) after you upload the program / it is running, the M4 will loose the Arduino code after reboot. But, if you wait ~ 45 s after you program the M4, it will not loose the program after a reset or power cycle. No kidding, I am have been playing with it while doing some unrelated work. I was able to replicate is pretty well. Now for those of you that really understand how the code is loded into Linux then in the M4, go figure why we need to wait ~45s before we can reset or power cycle Neo. In summary, I no longer think that the loosing the Arduino M4 Code after a reset or power cycle has to do with configuration on MacOS. At least for Arduino IDE 1.6.12, it has to do how long you wait until you remove the power from Neo o reset it. Have fun figuring out why. Can't wait to hear your explanation. Thanks, -Jack
Hello jack, I am going to try to test this on Windows this evening. What is your trigger < 10s? Is it 10s after the click on the IDE button upload or 10s after the IDE confirms the compilation/upload in the black text console?
Hello, Good question. After I see the confirmation from the IDE that the code was uploaded. The Blink LED starts right after the code is uploaded, I then trigger the stop watch on my phone. At 10s or earlier I press the reset Repeat the upload stopwatch process. Wait 45s. Press the reset
Just tested it and I see the same behavior but on all scenarios: On external IDE (Windows) but also on internal Neo IDE !! The file /var/opt/m4/m4last.fw gets size 0 bytes after a quick reboot. This file is used to load the M4 at boot with the last running compiled Arduino sketch. I created in the same folder a text file with random content and that also gets wiped at a quick reboot. I created a text file in my Linux Neo home folder /home/udooer and that also gets wiped at a quick reboot! So it has nothing to do with the uploading of the compiled sketches. Is this a Linux disk cache feature we stumble upon?
Aha. Thanks for testing. Glad someone confirmed. It will be interesting to figure this out. At this point maybe a note so the users will know that they have to wait 45s if they want to unplug the power or reset NEO, otherwise they wont have the Arduino code running. Now to the Udoo Team to take a look on this; why is Linux on Udoo NEO wipe clean the files/directory if the board gets a reset <10s after the Arduino code is uploaded to the M4. Glad to help. -Jack
Do we use Ext4 fs with delayed allocation on udoobuntu 2? http://www.pointsoftware.ch/en/4-ext4-vs-ext3-filesystem-and-why-delayed-allocation-is-bad/
Could you please try to add a "sync" between lines 154 and 155 in udooneo-m4uploader? https://github.com/UDOOboard/udooneo-m4uploader/blob/master/udooneo-m4uploader#L155
Francesco, I don't know how to do that. Why can't the Udoo Team test the fix? It is not OS or computer dependent. You don't need a Mac. Thanks, -Jack