为什么我收到这条消息是在 Arduino IDE 中上传 Galileo 的草图?

Why I'm getting this message uploading Galileo's sketch in Arduino IDE?

我在 windows 10 使用 Arduino IDE 在 Galileo Intel 的 Arduino 中上传草图。由于 Arduino 运行s Linux,代码以某种方式从 "fit" 更改为 Linux。我成功地 运行 一张更大的 Linux 图像,并在 unplug/plug 板时使用 SD 卡注意到草图持久性。我也成功地在 Galileo 上上传了 blinky 演示。在 this tutorial 之后,当我将以太网电缆连接到电路板和我的 PC 时,我 运行 这段代码为它提供了一些 IP 地址(这是正确的吗?这段代码实际上做了什么?):

void setup() {
  system("telnetd -l /bin/sh");
  system("ifconfig eth0 192.168.1.80 netmask 255.255.0.0 up");
  }
void loop() {
  }

有了这个,我得到了以下信息:

#!/bin/sh

starting download script
# clupload script to invoke lsz 
# Copyright (C) 2014 Intel Corporation
# 
Args to shell: C:\Users\Gabriel\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader.6.2+1.0/x86/bin C:\Users\Gabriel\AppData\Local\Temp\build4196129373431759811.tmp/descobrir_ip.cpp.elf COM2
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
COM PORT 2
# License as published by the Free Software Foundation; either
Converted COM Port COM2 to tty port /dev/ttyS1
# version 2.1 of the License, or (at your option) any later version.
Sending Command String to move to download if not already in download mode
# 
# 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=
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=
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 downloadGalileo" > $tty_port_id
C:\Users\Gabriel\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader.6.2+1.0/clupload/cluploadGalileo_win.sh: line 42: /dev/ttyS1: 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\Gabriel\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader.6.2+1.0/clupload/cluploadGalileo_win.sh: line 46: /dev/ttyS1: Permission denied
# Execute the target download command

#Download the file.
host_file_name=
"$fixed_path/lsz.exe" --escape --binary --overwrite $host_file_name <> $tty_port_id 1>&0
C:\Users\Gabriel\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader.6.2+1.0/clupload/cluploadGalileo_win.sh: line 51: /dev/ttyS1: 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\Gabriel\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader.6.2+1.0/clupload/cluploadGalileo_win.sh: line 56: /dev/ttyS1: Permission denied
processing.app.SerialException: Erro ao abrir porta serial "COM2".
    at processing.app.Serial.<init>(Serial.java:127)
    at processing.app.Serial.<init>(Serial.java:71)
    at processing.app.SerialMonitor.<init>(SerialMonitor.java:93)
    at processing.app.SerialMonitor.open(SerialMonitor.java:93)
    at processing.app.AbstractMonitor.resume(AbstractMonitor.java:220)
    at processing.app.Editor.resumeOrCloseSerialMonitor(Editor.java:2431)
    at processing.app.Editor.access00(Editor.java:71)
    at processing.app.Editor$DefaultExportHandler.run(Editor.java:2407)
    at java.lang.Thread.run(Thread.java:745)
Caused by: jssc.SerialPortException: Port name - COM2; Method name - openPort(); Exception type - Port busy.
    at jssc.SerialPort.openPort(SerialPort.java:164)
    at processing.app.Serial.<init>(Serial.java:123)
    ... 8 more
Erro ao abrir porta serial "COM2".

有人知道发生了什么事吗?

错误不是指网络 itself.it 似乎您用于草图上传的端口已被使用。我会说尝试使用不同的。

关于网络部分。该命令用于设置静态 IP 地址。如果你只想找到你的 IP 地址,你可以将它打印到串行监视器

系统("ifconfig eth0 > /dev/ttyGS0");