Community
cancel
Showing results for 
Search instead for 
Did you mean: 
MHamd2
Novice
1,897 Views

Galileo Gen 2 Cannot configure IP Static in Arduino IDE

I have Intel Galileo Gen 2 board, and then i want to configure IP static with arduino IDE

but i have a problem with that

here is the code :

void setup() {

// put your setup code here, to run once:

system("ifconfig eth0 192.168.1.28 netmask 255.255.255.0 up");

system("route add default gw 192.168.1.1 netmask 255.255.255.0");

}

void loop() {

// put your main code here, to run repeatedly:

and i got the message with error uploading :

Sketch uses 80386 bytes (0%) of program storage space. Maximum is 10000000 bytes.

# !/bin/sh

starting download script

Args to shell: C:\Users\Asus\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin C:\Users\Asus\AppData\Local\Temp\arduino_build_91467/sketch_may20a.ino.elf COM5

# clupload script to invoke lsz

COM PORT 5

# Copyright (C) 2014 Intel Corporation

Converted COM Port COM5 to tty port /dev/ttyS4

#

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

# This library is free software; you can redistribute it and/or

# modify it under the terms of the GNU Lesser General Public

# 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:" $*

Deleting existing sketch on target

# 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 downloadGalileo" > $tty_port_id

C:\Users\Asus\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadGalileo_win.sh: line 42: /dev/ttyS4: 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\Asus\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadGalileo_win.sh: line 46: /dev/ttyS4: 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\Asus\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadGalileo_win.sh: line 51: /dev/ttyS4: 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 "mv $target_download_name /sketch/sketch.elf; chmod +x /sketch/sketch.elf" <> $tty_port_id 1>&0

C:\Users\Asus\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadGalileo_win.sh: line 56: /dev/ttyS4: Permission denied

An error occurred while uploading the sketch

how to fix it? intel_admin

0 Kudos
12 Replies
FTinetti
Honored Contributor I
157 Views

Hi @marciarzky,

The problem is not related to the specific sketch (i.e. static IP sketch) but to the com port handling.

Make sure you set the right com port in the Arduino IDE (i.e. to the com port where your Intel Galileo is recognized by your computer.

Besides, you are using a rather old Arduino IDE, I'd suggest you install the newest Arduino IDE version and the Intel Galileo card in the Arduino IDE in order to avoid driver problem/s among other problems.

HTH,

Fernando.

MHamd2
Novice
157 Views

thank you for your solution. now i want to make a connection with intel system studio. but it doesn't work. how to fix it?

FTinetti
Honored Contributor I
157 Views

@marciarzky wrote:

thank you for your solution. now i want to make a connection with intel system studio. but it doesn't work. how to fix it?

I see... I didn't know you are planning to develop with Intel System Studio, in which case I'd suggest you follow the suggestion in your other thread ( ), .i.e

"

Take a look at /message/278665# 278665 Persistent Static IP configuration IoT devkit Image

"

HTH,

Fernando.

MHamd2
Novice
157 Views

how to get connman? because it doesn't found in my galileo. and if i already have it, can you explain step by step FGT

FTinetti
Honored Contributor I
157 Views

@marciarzky wrote:

how to get connman? because it doesn't found in my galileo. and if i already have it, can you explain step by step FGT

It's strange you don't have connman... it's in the yocto image provided by Intel... what yocto image are you using? where did you download the image from?

Fernando.

idata
Community Manager
157 Views

Hi Marciarzky,

 

 

Do you have any updates for this case?

 

 

I'd like to share this information that I think you'll find useful. The Intel Galileo can run on either the onboard flash drive or a microSD card, the last one allows you to develop using Java, JavaScript, C++, or Python, that is the one you need to use. On this site you can download the MicroSD card Image: https://software.intel.com/en-us/iot/hardware/galileo/downloads Intel® Galileo Board Downloads and in this other one you'll find the instructions to install it: https://software.intel.com/en-us/get-started-galileo-windows-step1 Getting Started with Intel Galileo Board.

 

 

That image includes connman, so in order to configure the static IP address I'd recommend to look at /message/278665# 278665 Persistent Static IP configuration IoT devkit Image, as FGT suggested before.

 

 

Just as a reference, I'm using this Yocto image: Linux galileo 3.8.7-yocto-standard # 1 Thu May 12 08:17:14 PDT 2016 i586 GNU/Linux, it is the output of this command line: # uname –a.

 

 

Hope this helps.

 

 

Regards,

 

-Yermi A.

 

MHamd2
Novice
157 Views

i get the yocto image in https://software.intel.com/en-us/get-started-galileo-windows-step1 IoT - Step 1: Make a bootable micro SD card | Intel® Software

FTinetti
Honored Contributor I
157 Views

@marciarzky wrote:

i get the yocto image in https://software.intel.com/en-us/get-started-galileo-windows-step1 IoT - Step 1: Make a bootable micro SD card | Intel® Software

Great, follow the guide in that link ("Write the image to your micro SD card" section), boot the Intel Galileo and check whether you have connman ot not. If you have the connman command then

"

Take a look at /message/278665# 278665 Persistent Static IP configuration IoT devkit Image

"

and let us know your results.

If you don't have the connman command then let us know.

HTH,

Fernando.

MHamd2
Novice
157 Views

how to check it? able or not the connman in SD Image Card ?

FTinetti
Honored Contributor I
157 Views

@marciarzky wrote:

how to check it? able or not the connman in SD Image Card ?

Your post above:

@marciarzky wrote:

how to get connman? because it doesn't found in my galileo. and if i already have it, can you explain step by step FGT

How did you know you don't have connman? How did you look for in your Galileo so that you wrote "it doesn't found in my galileo"?

Fernando.

idata
Community Manager
157 Views

Hi Marciarzky,

 

 

You can run the following command: connmanctl help, and the output should look like this:

 

 

 

If you see a message saying that "command not found" it states that connman is not installed.

 

Regards,

 

-Yermi A.
idata
Community Manager
157 Views

Hi Marciarzky,

 

 

Do you still need assistance in this case?

 

 

Regards,

 

-Yermi A.

 

Reply