无法使用 OTG 端口连接 google 珊瑚

unable to connect google coral using OTG port

当我 运行ning google coral 使用串行端口时,我能够 运行 演示应用程序,但是当我尝试 运行 google 珊瑚使用数据端口(c 型电缆)我无法连接开发板

rahul@ubuntu:~$ mdt shell 等待设备... 在 192.168.101.2 连接到 wishful-yarn wishful-yarn 上没有密钥 -- pushing

您似乎正在尝试连接到未连接的设备 通过 USB 连接到您的工作站,但没有此 MDT 生成的 SSH 密钥。 要连接 MDT shell,您需要先连接到您的设备 仅通过 USB。

问题是由 PyPI 包 mendel-development-tool 本身引起的。 'NonLocalDeviceError' 异常引发了此错误,如 command.py in the code of the package. Whenever the IP of the device does not start with 192.168.100, this exception is raised by sshclient.py 的第 83 行(第 86 行)所示。这适用于 Mendel Linux (chef) 的最后一个版本,因为 usbnet 连接的 IP 地址是 192.168.100.2。就我而言,2019 年 11 月晚些时候发布的新版 Mendel(day)具有 IP 192.168.101.2。要检查 IP,请检查

的输出
mdt devices

如果您使用 pip3 作为用户安装包,就像 documentation 推荐的那样(pip3 install --user mendel-development-tool),这可以通过快速本地补丁修复:

  1. 在您喜欢的文本编辑器中打开文件

    vim $HOME/.local/lib/python3.6/site-packages/mdt/sshclient.py +86
    
  2. 替换第86行,即

        if not self.address.startswith('192.168.100'):
            raise NonLocalDeviceError()
    

    通过以下代码

        if not self.address.startswith('192.168.10'):
            raise NonLocalDeviceError()
    

作者很可能会将 PyPI 包更新到此解决方案,因为 master branch of command.py 已经有建议的代码。软件包更新后,您只需在主机上更新即可。

pip3 install --upgrade mendel-development-tool

问题是 google coral dev 也在连接到 WIFI。

首先你需要使用 nmtui 删除 google coral 中的 wifi --> 编辑连接 --> 删除。

然后将你的上位机通过USB C OTG数据线连接到google珊瑚开发板

  1. 通过串口console到devboard,删除/home/mendel/.ssh/authorized_keys

    的内容
  2. 使用 mdt-keymaster 在 google coral devboard 中重置 mdt 服务 须藤服务 mdt-keymaster 重新启动

  3. 通过rm ~/.config/mdt/keys/mdt.key

    删除主机中的mdt密钥
  4. 如上更正 NonLocalDeviceError 中的 IP 问题

  5. 然后尝试mdt shell

如果没有任何效果,请使用以下程序重新刷新珊瑚板

  1. 通过串行电缆连接您的开发板并登录[Ist terminal]
  2. 登录后点击 sudo reboot-bootloader 将开发板置于快速启动模式。
  3. 打开第二个终端并执行以下步骤来刷新 mendel linux
cd $HOME/Downloads
curl -O https://dl.google.com/coral/mendel/enterprise/mendel-enterprise-chef-13.zip
unzip mendel-enterprise-chef-13
cd mendel-enterprise-chef-13
  1. bash flash.sh

Once Flashing the board complete shutdown google coral sudo shutdown now

再次连接开发板,然后再次执行前面的步骤 1-5。