Introduction: Resolving Edison "Transfer Incomplete" Problem

Picture of Resolving Edison "Transfer Incomplete" Problem

After several days of working with an Intel Edison and Ardunio breakout board, the Ardunio programming development environment became unable to successfully transfer compiled sketches to the Edison. A message declaring "Transfer Incomplete" was the only clue that something had gone awry. This instructable will describe how to restore your Edison to a state ready to accept sketch transfers, and provide one method to avoid the problem in the future.

The starting assumption is that you have assembled and configured your Intel Edison with Ardunio breakout board so that it communicates with the computer you are developing the sketches on. See this other instructable for a beginners guide to performing that initial setup and configuration. Once you have gone through the setup, you should happily be able to use the familiar Arduino Development Environment to develop, compile, and transfer sketches to your Edison.

After a few days of working with the Arduino programming interface the compiled sketches were suddenly no longer being successfully transferred to the Edison. The message "Transfer Incomplete" would display in the status window of the programming dialog. Through the use of web searches of the Intel forums and my familiarity with Linux, I was able to resolve the problem using the following steps.

Step 1: Step 1: Access the Edison Linux File System

Picture of Step 1: Access the Edison Linux File System

The first step is to access the Linux command line of the Edison. A terminal emulator is required to log into the Edison. I chose to use the PUTTY program recommended in the original Edison configuration instructions. I have saved a profile in the PUTTY application to make logging into the Edison easier. It has the Connection Type set to Serial, the Serial Line set to the COM Port my Edison is connected to, and the communication speed set to 115200. Your Com port may differ from mine. You can find your Edison's COM Port on a Windows machine by using Device Manager to inspect the Ports selection for the value of the USB Serial Port.

Open the Connection, enter the user name of "root", and specify the password you created during your initial Edison configuration session.

Step 2: Step 2: Determine the Amount of Log Files Present

Picture of Step 2: Determine the Amount of Log Files Present

The debugging tip from the Intel developer forums was that the /dev/root, /, partition on the Linux installation was full. To verify that is the case, use the linux command

df -h

On the screen image included here, the percentage of space used for the /dev/root, '/', partition shows 78% on the top line. When the transfer problems were occurring, that percentage displayed as 100%.

The next debugging tip was to see how much space was being taken up by various log files. To do that, use the following Linux commands.

cd /var/log/journal

ls -l

The number of log directories present on my 78% full system is shown in the screen shot. Each of those long file names is a directory, under which a system log file is stored.

Step 3: Step 3: Clean Up the Log Files

Picture of Step 3: Clean Up the Log Files

The next step is to remove the log directories and files to free up space on the /dev/root file system.

Be very careful executing the following "remove", rm, command. It includes options to recursively delete everything under each subdirectory in the current directory. You must be in the /var/log/journal subdirectory before issuing the command that deletes everything inside that directory. If you issue the aggressive rm command from any other directory, you may remove critical system files from the Edison Linux installation. That would require a rebuild of the Linux installation as detailed in the original Edison configuration instructions

cd /var/log/journal

rm -r *

After issuing the recursive remove command against all subdirectories of the /var/log/journal directory there will once again be free space for transferring sketches to the Edison.

Step 4: Step 4: Reducing the Number of Log Files in the Future

Picture of Step 4: Reducing the Number of Log Files in the Future

After freeing the file space by deleting the logs, you should once again be able to transfer sketches to the Edison board. The fix will only be temporary, as a new log file will be generated everytime the Edison board is powered up or rebooted.

To make a more permanent fix to the problem of too many log files you can reconfigure the specifications for the Linux journaling system.

A basic file editor, vi, is included in the Linux installation on the Edison.

The vi editor is generally considered the lowest common denominator for text editors. It's available on every Linux installation and simple enough to function on the simplest of terminal emulators, such as provided by PUTTY.

The following commands will modify the journaling system to reduce the amount of space the log files can consume.

vi /etc/systemd/journald.conf

This will bring up the text editor for the configuration file.

The cursor will be at the top of the file. Down arrow the cursor until it is on the comment marker, '#', at the beginning for the SystemMaxFileSize line.

Press 'x' key to delete the comment marker, #.

Right cursor to the end of the SystemMaxFileSize= line and press 'i' key to enter insert mode.

Type 1M after the = sign

The file in the editor should look like the one in the screenshot shown here.

To save and exit the vi editor do the following key strokes

'Esc' key followed by colon, :, w and q keys

That will write the updated configuration file and exit the editor. Now your Edison journaling system will only allow a maximum of 1 megabyte of journal files to be stored. The oldest journals will be deleted once the 1M limit is reached and a new journal is needed.

That concludes this short instructable for keeping your Edison ready for accepting sketch transfers.

Comments

Jonathanrjpereira (author)2015-09-20

It still does not work.

heres the error message:

Build options changed, rebuilding all
Sketch uses 76,327 bytes (0%) of program storage space. Maximum is 10,000,000 bytes.
#!/bin/sh
# clupload script to invoke lsz
# Copyright (C) 2014 Intel Corporation
starting download script
#
Args to shell: C:\Users\jonathanrjpereira\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin C:\Users\JONATH~1\AppData\Local\Temp\build6391031091587907914.tmp/Blink.cpp.elf COM4
# This library is free software; you can redistribute it and/or
COM PORT 4
Converted COM Port COM4 to tty port /dev/ttyS3
# modify it under the terms of the GNU Lesser General Public
Sending Command String to move to download if not already in download mode
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
echo "starting download script"
echo "Args to shell:" $*
# 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
echo "Sending Command String to move to download if not already in download mode"
echo "~sketch downloadEdison" > $tty_port_id
Deleting existing sketch on target
#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
1 [main] bash 2528 child_info_fork::abort: C:\Users\jonathanrjpereira\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0\x86\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x2C0000) != child(0x4D0000)
C:\Users\jonathanrjpereira\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: fork: retry: Resource temporarily unavailable
2 [main] bash 7268 child_info_fork::abort: C:\Users\jonathanrjpereira\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0\x86\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x2C0000) != child(0x380000)
C:\Users\jonathanrjpereira\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: fork: retry: Resource temporarily unavailable
2 [main] bash 4456 child_info_fork::abort: C:\Users\jonathanrjpereira\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0\x86\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x2C0000) != child(0x3A0000)
C:\Users\jonathanrjpereira\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: fork: retry: Resource temporarily unavailable
2 [main] bash 4060 child_info_fork::abort: C:\Users\jonathanrjpereira\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0\x86\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x2C0000) != child(0x3D0000)
C:\Users\jonathanrjpereira\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: fork: retry: Resource temporarily unavailable
2 [main] bash 5192 child_info_fork::abort: C:\Users\jonathanrjpereira\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0\x86\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x2C0000) != child(0x4D0000)
C:\Users\jonathanrjpereira\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: fork: Resource temporarily unavailable

This is what i had typed in putty
root@edison:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 463.9M 279.6M 148.5M 65% /
devtmpfs 480.2M 0 480.2M 0% /dev
tmpfs 480.5M 0 480.5M 0% /dev/shm
tmpfs 480.5M 500.0K 480.0M 0% /run
tmpfs 480.5M 0 480.5M 0% /sys/fs/cgroup
tmpfs 480.5M 500.0K 480.0M 0% /etc/machine-id
systemd-1 5.5M 5.1M 456.0K 92% /boot
systemd-1 2.2G 3.5M 2.2G 0% /home
systemd-1 1003.0K 19.0K 913.0K 2% /factory
tmpfs 480.5M 56.0K 480.5M 0% /tmp
tmpfs 480.5M 6.0M 474.5M 1% /var/volatile
/dev/mmcblk0p5 1003.0K 19.0K 913.0K 2% /factory
/dev/mmcblk0p10 2.2G 3.5M 2.2G 0% /home
/dev/mmcblk0p7 5.5M 5.1M 456.0K 92% /boot
root@edison:~# cd /var/log/journal
root@edison:/var/volatile/log/journal# ls -l
root@edison:/var/volatile/log/journal# cd /var/log/journal
root@edison:/var/volatile/log/journal# rm -r *
rm: can't remove '*': No such file or directory
root@edison:/var/volatile/log/journal# vi /etc/systemd/journald.conf
root@edison:/var/volatile/log/journal#

karlaa.lopez.9 (author)2015-04-08

Hello!! I was hoping you could help me. I was using Putty to flash my intel Edison and I got an IP address but as soon as that happened my computers battery ran out and shut down the system so the putty program closed. I charged my laptop and open putty again but the program said to login. once I try to log in with my username it asks for a password but it wont let me type anything. the only thing it allows me to type is the enter key and after that it says "login incorrect " and prompts me the same over again. I went on the web to the IP address it gave me but it doesn't show anything. i don't know what to do :(

DanielHugo4004 (author)2015-03-16

The journald logging issue you've described has been resolved for Release 2 of the BSP image, which for the moment is the ww05-15 image... find the latest Board Support Package for Intel Edison at http://www.intel.com/support/edison/sb/CS-035180.htm via a link called "Yocto complete image"

ChrisCharlton (author)2015-02-12

On Mac, my fix was simple: Eject the "Edison" drive before launching the Arduino IDE, then the /dev/cu.usbmodem*** serial port shows up.

About This Instructable

3,996views

11favorites

License:

Bio: I've been building up gadgets from scraps and re-missioned tech since the days when a 555 was considered high function silicon. People doing such ... More »
More by robotoys:Driving a New Bright Toy Bulldozer with an Intel EdisonPWMSwizzling an Edison Arduino Breakout to work with Grove Seeed Motor ShieldsResolving Edison "Transfer Incomplete" Problem
Add instructable to: