ブログ

ορεσικα ψομαναι κυσο βλογ

BeagleV-Fire にwindowsからやっとログインできた(ただしVirtualboxが必要)

本記事よりも良い接続方法がわかったので以下の記事にまとめた。

xx-prime.hatenablog.com

BeagleV-Fireとは

一言でいうと、RISC-VのCPUとFPGAが載った素敵シングルボードコンピュータ。未来しか感じない。

クイックスタートを見てみる

docs.beagle.cc

これまでのBeagleboneシリーズと同様に、PCとUSBで接続するだけでOKなように見える。が、実はそれはウソだ。

WindowsにBeagleV-FireをUSBで接続してみる

まず、十分な電力を供給できるUSBポートに、BeagleV-FIreを接続すると、Windowsの設定→デバイス→その他のデバイスにBeagleV-Fireが現れる。

BeagleV-Fire はその他のデバイスに現れるが、ドライバーは使用できませんと表示される

しかし、「ドライバーは使用できません」と出ている。 BeagleV-Fireのサイトを探してみたが、これ用のUSBドライバは今のところ見つからない。 これまでのBeagleboneシリーズだと、USBドライバが当たるとネットワークデバイスがwindows上に生成されるのが普通だったが、BeagleV-Fireはドライバがないためネットワークデバイスは生成されない。 ここで一旦あきらめて1ヶ月ほど放置した。

webサーチ

webサーチをしたところ、windows上でvirtualbox内にlinuxホストを動作させてBeagleV-Fireと通信できたという書き込みを見つけた。メモってなかったのでリンクは貼れない。無念。

VirtualboxのUbuntuにBeagleV-Fireをつないでみる

WindowsPCにBeagleV-Fireをつなぎ、その他のデバイスのBeagleV-Fireが出ている状態でVirtualboxのUbuntuを立ち上げ、USB接続の選択肢の中からBeagleboneを選ぶ。

Virtualboxに現れたUSB下のBeagleV-Fire

[0404]のがそれ。

USB接続を tail -f /var/log/syslog で見てみる

Virtualbox内のLinuxでsyslogをtailしながら上記のUSB接続を行った結果が以下。

2024-03-06T22:26:20.043974+09:00 dirac kernel: [  208.789837] usb 2-1: new high-speed USB device number 2 using ehci-pci
2024-03-06T22:26:20.543991+09:00 dirac kernel: [  209.291739] usb 2-1: New USB device found, idVendor=1d6b, idProduct=0104, bcdDevice= 4.04
2024-03-06T22:26:20.544023+09:00 dirac kernel: [  209.291749] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2024-03-06T22:26:20.544027+09:00 dirac kernel: [  209.291753] usb 2-1: Product: BeagleBone
2024-03-06T22:26:20.544030+09:00 dirac kernel: [  209.291756] usb 2-1: Manufacturer: BeagleBoard.org
2024-03-06T22:26:20.544032+09:00 dirac kernel: [  209.291762] usb 2-1: SerialNumber: 1234BBBK5678
2024-03-06T22:26:20.590730+09:00 dirac mtp-probe: checking bus 2, device 2: "/sys/devices/pci0000:00/0000:00:1f.5/usb2/2-1"
2024-03-06T22:26:20.592633+09:00 dirac mtp-probe: bus: 2, device: 2 was not an MTP device
2024-03-06T22:26:20.704368+09:00 dirac kernel: [  209.441959] cdc_acm 2-1:1.2: ttyACM0: USB ACM device
2024-03-06T22:26:20.704396+09:00 dirac kernel: [  209.450089] usbcore: registered new interface driver cdc_acm
2024-03-06T22:26:20.704400+09:00 dirac kernel: [  209.450098] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
2024-03-06T22:26:20.725160+09:00 dirac kernel: [  209.471220] usbcore: registered new interface driver cdc_ether
2024-03-06T22:26:20.802902+09:00 dirac kernel: [  209.547430] cdc_ncm 2-1:1.0: MAC-Address: 00:04:a3:e5:99:39
2024-03-06T22:26:20.802924+09:00 dirac kernel: [  209.548189] cdc_ncm 2-1:1.0 eth0: register 'cdc_ncm' at usb-0000:00:1f.5-1, CDC NCM (NO ZLP), 00:04:a3:e5:99:39
2024-03-06T22:26:20.802927+09:00 dirac kernel: [  209.551873] usbcore: registered new interface driver cdc_ncm
2024-03-06T22:26:20.818423+09:00 dirac NetworkManager[564]: <info>  [1709731580.7993] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/3)
2024-03-06T22:26:20.828452+09:00 dirac kernel: [  209.574797] usbcore: registered new interface driver cdc_wdm
2024-03-06T22:26:20.838001+09:00 dirac kernel: [  209.586804] usbcore: registered new interface driver cdc_mbim
2024-03-06T22:26:20.861940+09:00 dirac mtp-probe: checking bus 2, device 2: "/sys/devices/pci0000:00/0000:00:1f.5/usb2/2-1"
2024-03-06T22:26:20.863692+09:00 dirac mtp-probe: bus: 2, device: 2 was not an MTP device
2024-03-06T22:26:20.875373+09:00 dirac (udev-worker)[3931]: 2-1: Process '/usr/lib/snapd/snap-device-helper bind snap_cups_cupsd /devices/pci0000:00/0000:00:1f.5/usb2/2-1 189:129' failed with exit code 1.
2024-03-06T22:26:20.883280+09:00 dirac (udev-worker)[3931]: 2-1: Process '/usr/lib/snapd/snap-device-helper bind snap_cups_ippeveprinter /devices/pci0000:00/0000:00:1f.5/usb2/2-1 189:129' failed with exit code 1.
2024-03-06T22:26:20.904128+09:00 dirac (udev-worker)[3934]: 2-1:1.1: Process '/usr/lib/snapd/snap-device-helper bind snap_cups_cupsd /devices/pci0000:00/0000:00:1f.5/usb2/2-1/2-1:1.1 0:0' failed with exit code 1.
2024-03-06T22:26:20.916853+09:00 dirac kernel: [  209.664338] cdc_ncm 2-1:1.0 enx0004a3e59939: renamed from eth0
2024-03-06T22:26:20.933606+09:00 dirac (udev-worker)[3931]: 2-1:1.3: Process '/usr/lib/snapd/snap-device-helper bind snap_cups_cupsd /devices/pci0000:00/0000:00:1f.5/usb2/2-1/2-1:1.3 0:0' failed with exit code 1.
2024-03-06T22:26:20.935609+09:00 dirac (udev-worker)[3934]: 2-1:1.1: Process '/usr/lib/snapd/snap-device-helper bind snap_cups_ippeveprinter /devices/pci0000:00/0000:00:1f.5/usb2/2-1/2-1:1.1 0:0' failed with exit code 1.
2024-03-06T22:26:20.946584+09:00 dirac NetworkManager[564]: <info>  [1709731580.9461] device (eth0): interface index 3 renamed iface from 'eth0' to 'enx0004a3e59939'
2024-03-06T22:26:20.965150+09:00 dirac snapd[530]: hotplug.go:200: hotplug device add event ignored, enable experimental.hotplug
2024-03-06T22:26:20.974193+09:00 dirac (udev-worker)[3931]: 2-1:1.3: Process '/usr/lib/snapd/snap-device-helper bind snap_cups_ippeveprinter /devices/pci0000:00/0000:00:1f.5/usb2/2-1/2-1:1.3 0:0' failed with exit code 1.
2024-03-06T22:26:20.997747+09:00 dirac (udev-worker)[3933]: 2-1:1.2: Process '/usr/lib/snapd/snap-device-helper bind snap_cups_cupsd /devices/pci0000:00/0000:00:1f.5/usb2/2-1/2-1:1.2 0:0' failed with exit code 1.
2024-03-06T22:26:21.036539+09:00 dirac NetworkManager[564]: <info>  [1709731581.0118] device (enx0004a3e59939): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
2024-03-06T22:26:21.036755+09:00 dirac NetworkManager[564]: <info>  [1709731581.0204] settings: (enx0004a3e59939): created default wired connection '有線接続 1'
2024-03-06T22:26:21.058522+09:00 dirac (udev-worker)[3933]: 2-1:1.2: Process '/usr/lib/snapd/snap-device-helper bind snap_cups_ippeveprinter /devices/pci0000:00/0000:00:1f.5/usb2/2-1/2-1:1.2 0:0' failed with exit code 1.
2024-03-06T22:26:21.088057+09:00 dirac (udev-worker)[3931]: 2-1:1.0: Process '/usr/lib/snapd/snap-device-helper bind snap_cups_cupsd /devices/pci0000:00/0000:00:1f.5/usb2/2-1/2-1:1.0 0:0' failed with exit code 1.
2024-03-06T22:26:21.094902+09:00 dirac (udev-worker)[3931]: 2-1:1.0: Process '/usr/lib/snapd/snap-device-helper bind snap_cups_ippeveprinter /devices/pci0000:00/0000:00:1f.5/usb2/2-1/2-1:1.0 0:0' failed with exit code 1.
2024-03-06T22:26:21.182449+09:00 dirac NetworkManager[564]: <info>  [1709731581.1790] device (enx0004a3e59939): carrier: link connected
2024-03-06T22:26:21.186478+09:00 dirac NetworkManager[564]: <info>  [1709731581.1850] device (enx0004a3e59939): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
2024-03-06T22:26:21.219134+09:00 dirac NetworkManager[564]: <info>  [1709731581.2048] policy: auto-activating connection '有線接続 1' (134244d1-ebd4-3a8a-b6ee-b7e7b8c02e44)
2024-03-06T22:26:21.222714+09:00 dirac NetworkManager[564]: <info>  [1709731581.2225] device (enx0004a3e59939): Activation: starting connection '有線接続 1' (134244d1-ebd4-3a8a-b6ee-b7e7b8c02e44)
2024-03-06T22:26:21.224111+09:00 dirac NetworkManager[564]: <info>  [1709731581.2237] device (enx0004a3e59939): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
2024-03-06T22:26:21.229626+09:00 dirac NetworkManager[564]: <info>  [1709731581.2294] device (enx0004a3e59939): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
2024-03-06T22:26:21.239209+09:00 dirac NetworkManager[564]: <info>  [1709731581.2390] device (enx0004a3e59939): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
2024-03-06T22:26:21.252312+09:00 dirac NetworkManager[564]: <info>  [1709731581.2521] dhcp4 (enx0004a3e59939): activation: beginning transaction (timeout in 45 seconds)
2024-03-06T22:26:21.301247+09:00 dirac NetworkManager[564]: <info>  [1709731581.3011] dhcp4 (enx0004a3e59939): state changed new lease, address=192.168.7.1
2024-03-06T22:26:21.303763+09:00 dirac avahi-daemon[511]: Joining mDNS multicast group on interface enx0004a3e59939.IPv4 with address 192.168.7.1.
2024-03-06T22:26:21.306995+09:00 dirac avahi-daemon[511]: New relevant interface enx0004a3e59939.IPv4 for mDNS.
2024-03-06T22:26:21.307190+09:00 dirac avahi-daemon[511]: Registering new address record for 192.168.7.1 on enx0004a3e59939.IPv4.
2024-03-06T22:26:21.312555+09:00 dirac avahi-daemon[511]: Joining mDNS multicast group on interface enx0004a3e59939.IPv6 with address fe80::1683:8e58:dec3:f0c4.
2024-03-06T22:26:21.312749+09:00 dirac avahi-daemon[511]: New relevant interface enx0004a3e59939.IPv6 for mDNS.
2024-03-06T22:26:21.312860+09:00 dirac avahi-daemon[511]: Registering new address record for fe80::1683:8e58:dec3:f0c4 on enx0004a3e59939.*.
2024-03-06T22:26:21.403252+09:00 dirac dbus-daemon[512]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.10' (uid=0 pid=564 comm="/usr/sbin/NetworkManager --no-daemon" label="unconfined")
2024-03-06T22:26:21.403448+09:00 dirac NetworkManager[564]: <info>  [1709731581.3962] device (enx0004a3e59939): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
2024-03-06T22:26:21.404002+09:00 dirac systemd[1]: Starting NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service...
2024-03-06T22:26:21.546342+09:00 dirac dbus-daemon[512]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
2024-03-06T22:26:21.546732+09:00 dirac systemd[1]: Started NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service.
2024-03-06T22:26:21.568892+09:00 dirac NetworkManager[564]: <info>  [1709731581.5664] device (enx0004a3e59939): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
2024-03-06T22:26:21.581231+09:00 dirac NetworkManager[564]: <info>  [1709731581.5667] device (enx0004a3e59939): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
2024-03-06T22:26:21.581386+09:00 dirac NetworkManager[564]: <info>  [1709731581.5676] device (enx0004a3e59939): Activation: successful, device activated.
2024-03-06T22:26:31.973542+09:00 dirac systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.

ちょっとこのコードブロックの貼り付けかたには改善が必要だ。

なんかよくわからんがUSB接続のネットワークデバイスが生成されたように見える。

ip a でVirtualboxのLinuxホストのネットワークデバイスを見てみる

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:79:aa:df brd ff:ff:ff:ff:ff:ff
    inet 172.17.29.58/24 brd 172.17.29.255 scope global dynamic noprefixroute enp0s3
       valid_lft 6753sec preferred_lft 6753sec
    inet6 fe80::a00:27ff:fe79:aadf/64 scope link
       valid_lft forever preferred_lft forever
3: enx0004a3e59939: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:04:a3:e5:99:39 brd ff:ff:ff:ff:ff:ff
    inet 192.168.7.1/24 brd 192.168.7.255 scope global dynamic noprefixroute enx0004a3e59939
       valid_lft 949sec preferred_lft 949sec
    inet6 fe80::1683:8e58:dec3:f0c4/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

無事に192.168.7.1のネットワークデバイスが生成された。これでBeagleV-Fireの192.168.7.2にsshでログインできる。

VirtualboxのLinuxホストからBeagleV-Fireにsshでログイン

$ ssh 192.168.7.2 -l beagle
Ubuntu 23.04

BeagleBoard.org Ubuntu 23.04 Console Image 2023-10-16
Support: https://bbb.io/debian
default username:password is [beagle:temppwd]

beagle@192.168.7.2's password:
Last login: Thu Oct 26 02:58:41 2023 from 192.168.7.1
beagle@BeagleV:~$

ようやく入れた!見ての通り、ユーザ名はbeagleでパスワードはtemppwdである。Ubuntu Linux 23.04が動いとる。RISC-Vで普通にUbuntuが動くなんて素敵すぎる。

BeagleV-Fireのネットワークデバイスを見てみる

beagle@BeagleV:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:04:a3:e5:99:37 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:04:a3:e5:99:36 brd ff:ff:ff:ff:ff:ff
    altname end0
4: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN group default qlen 1000
    link/tunnel6 :: brd :: permaddr 6ed6:9f50:72e2::
5: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:04:a3:e5:99:3a brd ff:ff:ff:ff:ff:ff
    inet 192.168.7.2/24 brd 192.168.7.255 scope global usb0
       valid_lft forever preferred_lft forever
    inet6 fe80::204:a3ff:fee5:993a/64 scope link
       valid_lft forever preferred_lft forever
6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:1e:54:73:cc brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

なんじゃこりゃー。なんかdockerが蠢いてるようだ。usb0が、今回のssh通信で使われているネットワークデバイスである。

しかし購入してからログインするまで1ヶ月かかるとはさすが俺としか言いようがない。

あのsyslogを丹念に見れば、windowsに当てるべきusb driverがわかるかもしれない。

夜も更けてきたのでここまでにしよう。

本記事よりも良い接続方法がわかったので以下の記事にまとめた。

xx-prime.hatenablog.com