Armadilloフォーラム

edisp-zからデータ収集する方法について

gt_2024

2025年4月3日 16時26分

==========
製品型番:
Debian/ABOSバージョン:Linux armadillo 6.1.112-at10 #1 SMP PREEMPT Tue Oct 29 17:01:18 JST 2024 armv7l GNU/Linux
カーネルバージョン:6.1.112-at10
3G/LTE モジュール情報 (Debianのみ):
その他:
==========

TeraTermでArmadillo-iot G3のコンソール画面に接続し、e-disp・Zからデータ収集を行うためにHowto(https://armadillo.atmark-techno.com/howto/aggregate-data-from-edispz)を参考にapt updateとapt installを行ったのですが、インストールがうまくできませんでした。解決方法をご教示いただきたいです。

以下、コンソール画面に表示されたログです。
root@armadillo:~# sudo apt update
Get:1 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Hit:2 http://ftp.jp.debian.org/debian bookworm InRelease
Ign:3 http://download.atmark-techno.com/debian bookworm InRelease
Hit:4 http://download.atmark-techno.com/debian bookworm Release
Get:5 http://security.debian.org/debian-security bookworm-security/main Sources [148 kB]
Get:6 http://security.debian.org/debian-security bookworm-security/main armhf Packages [231 kB]
Fetched 426 kB in 3s (138 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
root@armadillo:~# sudo apt install edispz-device-app
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package edispz-device-app

Armadillo-iot G3は無線LANに接続しており、ping 8.8.8.8で応答が返ってくることは確認済みです。

コメント

at_shota.shimoyama

2025年4月4日 14時59分

アットマークテクノの下山です。

申し訳ございませんが、edispz-device-appパッケージはstretchとbusterでのみ対応しているため、bookwormではご使用いただくことができません。
ご提示いただいているカーネルバージョンから、gt_2024様がお持ちのG3にはbookwormがインストールされているようですので、
もし edispz-device-app パッケージを使用する場合は、busterかstretchのインストールディスクイメージで初期化いただく必要がございます。
https://armadillo.atmark-techno.com/resources/software/armadillo-iot-g3…

ちなみに、bookworm でなければならない理由などはおありでしょうか?

よろしくおねがいします。

下山様 回答ありがとうございます。

bookwormでなければならない理由はとくにありません。(購入時、bookwormだっただけです。)
インストールディスクイメージでの初期化方法なのですが、マニュアルを見たところ(https://armadillo.atmark-techno.com/files/downloads/armadillo-iot-g3/do…)SDカードを用いる方法が記載されていましたが、SDカードを用意するのに時間がかかるため代替案を考えています。
USBを用いるなどSDカードを用いる以外にインストールディスクイメージを用いてG3の初期化をする方法はありますでしょうか。

以上、よろしくお願いします。

at_shota.shimoyama

2025年4月4日 20時09分

gt_2024 様

> インストールディスクイメージでの初期化方法なのですが、マニュアルを見たところ(https://armadillo.atmark-techno.com/files/downloads/armadillo-iot-g3/do…)SDカードを用いる方法が記載されていましたが、SDカードを用意するのに時間がかかるため代替案を考えています。
> USBを用いるなどSDカードを用いる以外にインストールディスクイメージを用いてG3の初期化をする方法はありますでしょうか。

手間はかかりますが、USBメモリで行う方法もあります。
https://armadillo.atmark-techno.com/blog/53/2802
こちらのブログを参考にしてください。

[ 5.936226] usb 2-1.3: Product: CP2102N USB to UART Bridge Controller
[ 5.944428] usb 2-1.3: Manufacturer: Silicon Labs
[ 5.953031] usb 2-1.3: SerialNumber: 4676e8c5c2d7ee11a5c25d8037b89984
[ 5.964018] cp210x 2-1.3:1.0: cp210x converter detected
[ 5.977749] usb 2-1.3: cp210x converter now attached to ttyUSB0
[ 6.544592] EXT4-fs (mmcblk2p2): recovery complete
[ 6.549450] EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Q uota mode: none.
[ 6.579598] /dev/mmcblk2p2: Can't open blockdev

BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs) [ 17.605615] usb 2-1.2: new high-speed USB device number 4 using c i_hdrc
[ 17.765888] usb 2-1.2: New USB device found, idVendor=2c7c, idProduct=0125, b cdDevice= 3.18
[ 17.774266] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber =0
[ 17.781619] usb 2-1.2: Product: Android
[ 17.785462] usb 2-1.2: Manufacturer: Android
[ 17.790998] option 2-1.2:1.0: GSM modem (1-port) converter detected
[ 17.797640] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 17.805049] option 2-1.2:1.1: GSM modem (1-port) converter detected
[ 17.811643] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 17.819100] option 2-1.2:1.2: GSM modem (1-port) converter detected
[ 17.825688] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB3
[ 17.833109] option 2-1.2:1.3: GSM modem (1-port) converter detected
[ 17.839652] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB4
[ 35.675637] VLDO2: disabling

(initramfs)
教えていただいたブログを参考にUSBを用いる方法を試したところ、上記のようなエラーが出て、(initramfs)の状態から抜け出せなくなりました。
おそらく、install.shに誤った記述をしたことが原因と考えています。一度、工場出荷時の状態に戻してそこから再度やり直したいのですが、どのようにすれば工場出荷時の状態に戻せますでしょうか。

at_shota.shimoyama

2025年4月10日 19時53分

gt_2024 様

すみません、USBメモリで行う方法を紹介した手前申し訳ないのですが、やはりSDカードを使用してインストールディスクを作成する方が確実で早いと思います。

工場出荷時の状態に戻すのも、インストールディスクによるインストールしかございません。

SDカードを用意するのに時間がかかるとのことでしたが、差し支えなければその背景などお聞かせいただいてもよろしいでしょうか?

工場出荷時に戻せなくとも、(initramfs)の状態から抜け出して、ログインする方法はないでしょうか?install.shを編集できれば問題は解消すると考えています。
SDカードについては、購入するための社内手続きに時間がかかるためです。

at_shota.shimoyama

2025年4月14日 20時36分

gt_2024 様

返信が遅くなりすみません。

> SDカードについては、購入するための社内手続きに時間がかかるためです。
かしこまりました。

> 工場出荷時に戻せなくとも、(initramfs)の状態から抜け出して、ログインする方法はないでしょうか?install.shを編集できれば問題は解消すると考えています。

お手数おかけしますが、USBにもう一度ルートファイルシステムを書き直して↓(initramfs)の状態から抜け出せますでしょうか?
https://armadillo.atmark-techno.com/blog/53/2764

もし抜け出せた場合は、
https://armadillo.atmark-techno.com/blog/1913/2426
の代わりに、以下の方法でブートローダ・カーネル・デバイスツリー・ユーザランドを書き換えてみてください。
今回は1回しか実行しないため、ブート時にインストールスクリプトが実行されるようにする必要はないので手動で実行します。
また、書き換え方法もより確実な方法に変えています。

以下をUSB上のルートファイルシステムから行います
1.ブートローダ・カーネル・デバイスツリー・ユーザランドを/imagesにダウンロード

root@armadillo:~# mkdir /images
root@armadillo:~# cd /images
root@armadillo:/images# wget --no-check-certificate https://armadillo.atmark-techno.com/files/downloads/armadillo-iot-g3/image/u-boot-x1-at25.bin
root@armadillo:/images# wget --no-check-certificate https://armadillo.atmark-techno.com/files/downloads/armadillo-iot-g3/image/uImage-x1-v4.9-at36
root@armadillo:/images# wget --no-check-certificate https://armadillo.atmark-techno.com/files/downloads/armadillo-iot-g3/image/armadillo_iotg_g3_m1-v4.9-at36.dtb
root@armadillo:/images# wget --no-check-certificate https://armadillo.atmark-techno.com/files/downloads/armadillo-iot-g3/debian/debian-buster-armhf_aiotg3_20241218.tar.gz
root@armadillo:/images# mv u-boot-x1-at25.bin u-boot.bin
root@armadillo:/images# mv uImage-x1-v4.9-at36 uImage
root@armadillo:/images# mv armadillo_iotg_g3_m1-v4.9-at36.dtb armadillo_iotg_g3_m1.dtb
root@armadillo:/images# mv debian-buster-armhf_aiotg3_20241218.tar.gz debian-buster-armhf.tar.gz

2./images/install.shの作成

root@armadillo:/images# vi install.sh

で、以下のスクリプトを貼り付け

#!/bin/sh
 
x1-bootloader-install /images/u-boot.bin
 
mount -t vfat /dev/mmcblk2p1 /mnt
cp /images/uImage /mnt/uImage
cp /images/armadillo_iotg_g3_m1.dtb /mnt/armadillo_iotg_g3_m1.dtb
umount /mnt
 
mount -t ext4 /dev/mmcblk2p2 /mnt
rm -rf /mnt/*
tar zxf /images/debian-buster-armhf.tar.gz -C /mnt
umount /mnt

3./images/install.shの実行

root@armadillo:~# sh /images/install.sh

お手数おかけしますが、よろしくお願いします。

debianをbusterにすることはできたのですが、その後、sudo apt update,sudo apt install edispz-device-appを行うと以下のようなエラーが出ました。証明書の問題かと思い、sudo apt-get update
sudo apt-get install ca-certificatesを行ったのちsudo apt update,sudo apt install edispz-device-appを行ったのですが同じエラーが出ました。どのようにしたら解決できますか?

root@armadillo:/# sudo apt install edispz-device-app
Reading package lists... Done
Building dependency tree
Reading state information... Done
edispz-device-app is already the newest version (1.2.1-1+deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up edispz-device-app (1.2.1-1+deb10u1) ...
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching source index from https://rubygems.org/

Retrying fetcher due to error (2/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see http://bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (3/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see http://bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (4/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see http://bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most
likely your system doesn't have the CA certificates needed for verification. For
information about OpenSSL certificates, see http://bit.ly/ruby-ssl. To connect
without using SSL, edit your Gemfile sources and change 'https' to 'http'.
dpkg: error processing package edispz-device-app (--configure):
installed edispz-device-app package post-installation script subprocess returned error exit status 17
Errors were encountered while processing:
edispz-device-app
E: Sub-process /usr/bin/dpkg returned an error code (1)