8 Replies Latest reply on Sep 8, 2015 11:26 AM by Laurentg91

    Various random errors on uploading (Ardunio 1.5.3 Intel1.0.4) Windows Server 2012

    Josh90301

      I have a Galileo Gen 2 board, and it was working correctly for about an hour, then it suddenly stopped sending data over the serial port and no longer accepts new code. Resets and reboots of both the device and the computer have failed, changing the com port failed to do anything, power cycling the Galileo failed to do anything (but I do get a different random error message almost every time I try something).

       

      Error messages occur on both firmware update and uploading of code.

      default com port is 4. changed to every port up to 10. (excluding 1 and 2).

       

      Error messages in short format:

       

      Line 24,28,34,40 (anything that refs dev/ttyS)

      Permission denied.

      No such file or directory.

      (Got another one, but can't replicate it just yet)

       

      ------------------

      Oddly enough, I just tried uploading a blank sketch to COM4 (board is currently set to com8, nothing is on com4)

      and it "worked."

      tried to send my program to COM4, it also "worked" as in it "sent" but didn't actually send to anything. So now I have ghost com ports, the program isn't running on the board, and there's no output to the serial monitor. not sure if this has anything to do with the errors above.

      I have no clue what is going on, or why it stopped working, or why I don't get the same error message.

       

      #!/bin/sh
      starting download script

      Args to shell: C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/tools/x86/bin C:\Users\ADMINI~1\AppData\Local\Temp\build849793941499300310.tmp/sketch_jan05a.cpp.elf COM8
      echo "starting download script"
      COM PORT 8
      echo "Args to shell:" $*
      Converted COM Port COM8 to tty port /dev/ttyS7

      Sending Command String to move to download if not already in download mode
      # ARG 1: Path to lsz executable.
      # ARG 2: Elf File to download
      # ARG 3: COM port to use.

      #path contains \ need to change all to /
      path_to_exe=$1
      fixed_path=${path_to_exe//\\/\/}

      #COM ports are not always setup to be addressed via COM for redirect.
      #/dev/ttySx are present. Howwever, COMy -> /dev/ttySx where x = y - 1

      com_port_arg=$3
      com_port_id=${com_port_arg/COM/}
      echo "COM PORT" $com_port_id
      tty_port_id=/dev/ttyS$((com_port_id-1))
      echo "Converted COM Port" $com_port_arg "to tty port" $tty_port_id

      Deleting existing sketch on target
      echo "Sending Command String to move to download if not already in download mode"
      echo "~sketch download" > $tty_port_id
      C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 24: /dev/ttyS7: No such file or directory

      #Move the existing sketch on target.
      echo "Deleting existing sketch on target"
      $fixed_path/lsz.exe --escape -c "mv -f /sketch/sketch.elf /sketch/sketch.elf.old" <> $tty_port_id 1>&0
      C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 28: /dev/ttyS7: No such file or directory

      # Execute the target download command

      #Download the file.
      host_file_name=$2
      $fixed_path/lsz.exe --escape --binary --overwrite $host_file_name <> $tty_port_id 1>&0
      C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 34: /dev/ttyS7: No such file or directory

      #mv the downloaded file to /sketch/sketch.elf
      Moving downloaded file to /sketch/sketch.elf on target
      target_download_name="${host_file_name##*/}"
      echo "Moving downloaded file to /sketch/sketch.elf on target"
      #$fixed_path/lsz.exe --escape -c "cp sketch /sketch/sketch.elf" <> $tty_port_id 1>&0
      $fixed_path/lsz.exe --escape -c "mv $target_download_name /sketch/sketch.elf; chmod +x /sketch/sketch.elf" <> $tty_port_id 1>&0
      C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 40: /dev/ttyS7: No such file or directory

        • 1. Re: Various random errors on uploading (Ardunio 1.5.3 Intel1.0.4) Windows Server 2012
          CMata_Intel

          Hi Josh90301

           

          Have you tried to re-install the drivers? Are you selecting the Gen2 Board in tools -> board?

          Also, you said that "Error messages occur on both firmware update and uploading of code." Were you able to update your firmware the first time or you haven't been able to do it yet?

           

          Regards;

          CMata

          • 2. Re: Various random errors on uploading (Ardunio 1.5.3 Intel1.0.4) Windows Server 2012
            Josh90301

            I did not try updating the firmware initially, so this is the first time I have attempted that. the gen 2 board is selected..

             

            Tried reinstalling the drivers, did not fix the problem. The current error message is still the "No such file or directory" (posted above).

            • 3. Re: Various random errors on uploading (Ardunio 1.5.3 Intel1.0.4) Windows Server 2012
              Josh90301

              Thanks to another post and a lot of experimenting, I have found the following things out:

              Permission Denied tends to be the result of:

              >not running the program as Administraor (despite being logged into that account)

              >running the program ONCE as a non-administrator

              >needing to restart the computer after installing or re-installing drivers

              >>>Fixing this:

                   The easy way: restart the computer

                   the other way: kill bash.exe and isz.exe

              ((UPDATE*)) this no longer fixes the Permission denied error. (error posted below for clarification).

               

              However, I have now expanded my testing to two different Galileo gen 2 boards and two different windows server 2012 computers (one is 2012, the other is 2012 R2 with Update.)

              At the current time, one computer is attempting to upload, but is "stuck" at this:

              ----------------------------------------

              cygwin warning:

                MS-DOS style path detected: C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/arduino/x86/tools/izmir/clupload_win.sh

              starting download script

                Preferred POSIX equivalent is: /cygdrive/c/Users/Administrator/Desktop/arduino-windows-1.0.4/arduino-1.5.3-Intel.1.0.4/hardware/arduino/x86/tools/izmir/clupload_win.sh

              Args to shell: C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/tools/x86/bin C:\Users\ADMINI~1\AppData\Local\Temp\build4677676268785205264.tmp/sketch_jan11a.cpp.elf COM8

                CYGWIN environment variable option "nodosfilewarning" turns off this warning.

              COM PORT 8

                Consult the user's guide for more details about POSIX paths:

                  http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

              #!/bin/sh

               

              echo "starting download script"

              Converted COM Port COM8 to tty port /dev/ttyS7

              echo "Args to shell:" $*

               

              Sending Command String to move to download if not already in download mode

              # ARG 1: Path to lsz executable.

              # ARG 2: Elf File to download

              # ARG 3: COM port to use.

               

              #path contains \ need to change all to /

              path_to_exe=$1

              fixed_path=${path_to_exe//\\/\/}

               

              #COM ports are not always setup to be addressed via COM for redirect.

              Deleting existing sketch on target

              #/dev/ttySx are present. Howwever, COMy -> /dev/ttySx where x = y - 1

               

              com_port_arg=$3

              com_port_id=${com_port_arg/COM/}

              echo "COM PORT" $com_port_id

              tty_port_id=/dev/ttyS$((com_port_id-1))

              echo "Converted COM Port" $com_port_arg "to tty port" $tty_port_id

               

              echo "Sending Command String to move to download if not already in download mode"

              echo "~sketch download" > $tty_port_id

               

              #Move the existing sketch on target.

              echo "Deleting existing sketch on target"

              $fixed_path/lsz.exe --escape -c "mv -f /sketch/sketch.elf /sketch/sketch.elf.old" <> $tty_port_id 1>&0

              ---------------------------------------------------------------------

              The other computer is still getting the no such file or directory error.

               

               

              ((UPDATE*))

               

              ------------------------------------PERMISSION DENIED ERROR (while run as Administrator, after manually killing bash.exe and lsz.exe prior to running)------------------

              #!/bin/sh

              starting download script

               

              Args to shell: C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/tools/x86/bin C:\Users\ADMINI~1\AppData\Local\Temp\build2671300318666315755.tmp/sketch_jan11a.cpp.elf COM8

              echo "starting download script"

              COM PORT 8

              echo "Args to shell:" $*

              Converted COM Port COM8 to tty port /dev/ttyS7

               

              Sending Command String to move to download if not already in download mode

              # ARG 1: Path to lsz executable.

              # ARG 2: Elf File to download

              # ARG 3: COM port to use.

               

              #path contains \ need to change all to /

              path_to_exe=$1

              fixed_path=${path_to_exe//\\/\/}

               

              #COM ports are not always setup to be addressed via COM for redirect.

              #/dev/ttySx are present. Howwever, COMy -> /dev/ttySx where x = y - 1

               

              Deleting existing sketch on target

              com_port_arg=$3

              com_port_id=${com_port_arg/COM/}

              echo "COM PORT" $com_port_id

              tty_port_id=/dev/ttyS$((com_port_id-1))

              echo "Converted COM Port" $com_port_arg "to tty port" $tty_port_id

               

              echo "Sending Command String to move to download if not already in download mode"

              echo "~sketch download" > $tty_port_id

              C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 24: /dev/ttyS7: Permission denied

               

              #Move the existing sketch on target.

              echo "Deleting existing sketch on target"

              $fixed_path/lsz.exe --escape -c "mv -f /sketch/sketch.elf /sketch/sketch.elf.old" <> $tty_port_id 1>&0

              C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 28: /dev/ttyS7: Permission denied

               

              # Execute the target download command

               

              #Download the file.

              host_file_name=$2

              $fixed_path/lsz.exe --escape --binary --overwrite $host_file_name <> $tty_port_id 1>&0

              C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 34: /dev/ttyS7: Permission denied

               

              #mv the downloaded file to /sketch/sketch.elf

              Moving downloaded file to /sketch/sketch.elf on target

              target_download_name="${host_file_name##*/}"

              echo "Moving downloaded file to /sketch/sketch.elf on target"

              #$fixed_path/lsz.exe --escape -c "cp sketch /sketch/sketch.elf" <> $tty_port_id 1>&0

              $fixed_path/lsz.exe --escape -c "mv $target_download_name /sketch/sketch.elf; chmod +x /sketch/sketch.elf" <> $tty_port_id 1>&0

              C:\Users\Administrator\Desktop\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 40: /dev/ttyS7: Permission denied

              -------------------------------------------------------------------------------------------------

              • 4. Re: Various random errors on uploading (Ardunio 1.5.3 Intel1.0.4) Windows Server 2012
                CMata_Intel

                Hi Josh90301 ;

                 

                I'm not sure if the problem could be more related to the OS than to the board, I saw different issues about USB ports on Windows Server. 

                Connected USB device is not detected in Windows

                USB devices stop working in Windows 8 or Windows Server 2012

                Take a look at that just to discard that the issue is with the OS.

                Also,  have you tried to boot the board using a SDcard? and, are you using USB2.0 or 3.0?

                 

                Regards;

                CMata

                • 5. Re: Various random errors on uploading (Ardunio 1.5.3 Intel1.0.4) Windows Server 2012
                  Josh90301

                  I guess I never posted a reply. Anyway, yes sometimes it's an os issue with the usb ports, ironically enough that didn't occur until about 5 restarts later (this whole problem was made harder to debug due to constant crashes from AMD's video card drivers).

                  Anyway, a few things I have found to help, I don’t want to call this fixed, because I think there are a lot of issues, and every time it starts working, I think I have fixed it, only to be disproven in roughly an hour.

                  I close out of the arduino IDE.

                  I now have the following PowerShell script on my desktop, which I run.

                   

                  kill -processname bash -ErrorAction Continue

                  kill -processname lsz -ErrorAction Continue

                   

                  Then I go into the device manager, and disable the device, then re-enable the device (COM4 in my case).

                   

                  Still able to send code, and it has been roughly 4 hours. I think I now have the “how”, but not the why, anyway, on to the next issue…

                   

                  restarting doesn't fix the issue ~95% of the time, or if it does, it randomly stops working, this is the longest I have ever been able to keep sending code.

                  Thanks for all your help!

                  • 6. Re: Various random errors on uploading (Ardunio 1.5.3 Intel1.0.4) Windows Server 2012
                    CMata_Intel

                    Hi Josh90301

                     

                    Another workaround; Go to device manager, right click on your USB port, Properties > Port Settings > Advanced and select a port number that it's not in use.

                     

                    Regards;

                    CMata

                    • 8. Re: Various random errors on uploading (Ardunio 1.5.3 Intel1.0.4) Windows Server 2012
                      Laurentg91

                      Upgrading to IDE version 1.6.5 fixed the issues