May 12, 2022
いわゆる直結を試みる
LANの直結を今まで試みていなかったのは、利便性が低下することと、色々やりかたを調べるのが面倒だったからだ、、、
しかし、やり残していることなのでやることにした。
さて、、、先立っての試験運用を何を使ってやるか。
LAN端子を2つ以上持っている機械は、うちにはapu2以外にない。メインシステムで試すしかないということだ。
トラブルがあっては面倒なので、apu2のSDカードをバックアップしておく必要があるかな、、、
普段からバックアップを取ってないのかといわれたら、どれがバックアップなのか分からなくなっているのだ。何をやってるのかまったく分からない。
そんなことを考えていたら、そういえば暫く前にBack EndのイメージをGoogleにアップしてたっけ、と思い出した。
あれを落としてきて試せばいいんじゃないの。
tc64-11-1-base1z-2020-04-05-PPAP-BE.img
https://drive.google.com/file/d/1kHhCtR4WCWs3_8i32JrVgGFin-YK9KIZ/view?usp=sharing
そういうわけで、ダウンロード。
カードに焼く。
物理的に遠くに離してあったMIddle EndをBack Endの近くに戻す。
まず状況。
( '>') /) TC (\ Core is distributed with ABSOLUTELY NO WARRANTY. (/-_--_-\) www.tinycorelinux.net tc@box:~$ ifconfig eth0 Link encap:Ethernet HWaddr 00:0D:B9:47:8A:40 inet addr:192.168.1.33 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:42922414 errors:0 dropped:2894 overruns:0 frame:0 TX packets:43024988 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:62288871488 (58.0 GiB) TX bytes:62314222899 (58.0 GiB) Memory:fe600000-fe61ffff eth1 Link encap:Ethernet HWaddr 00:0D:B9:47:8A:41 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Memory:fe700000-fe71ffff eth2 Link encap:Ethernet HWaddr 00:0D:B9:47:8A:42 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Memory:fe800000-fe81ffff lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) tc@box:~$
現在、IP固定の設定はしていない。DHCPサーバーからeth0にアドレスを取得している。
今回はeth1のIPを固定してみる。
ところで、どれが0でどれが2だったかいつも分からなくなるので写真を貼っておく。
シリアルケーブル端子に近い方が0である。

IP固定は昔、piCoreを使っていた頃はよく設定していた。
だけど、最近はしていないのですっかり忘れている。というか、Tiny CoreでのIP固定はしたことがない。
複数のイーサネットポートを扱うのも初めてだ。
どうなんだろ、piCoreみたく/optにeth1.shを作って置いといたらいいのかな、、、
Middle End の電源を落として、ケースの蓋を開ける。
SDカードを入れ替えて、起動する。
以下、sshでログインしてからの経過。
vi /opt/eth1.sh #!/bin/sh pkill udhcpc ifconfig eth1 192.168.10.2 netmask 255.255.255.0 broadcast 192.168.10.255 up route add default gw 192.168.10.1 # echo nameserver 192.168.10.1 > /etc/resolv.conf chmod +x /opt/eth1.sh sudo vi /opt/bootsync.sh #!/bin/sh # put other system startup commands here, the boot process will wait until they complete. # Use bootlocal.sh for system startup commands that can run in the background # and therefore not slow down the boot process. /usr/bin/sethostname box /opt/bootlocal.sh & /opt/eth1.sh & filetool.sh -b sudo reboot
viでeth1の設定ファイル「eth1.sh」を作成。IPを192.168.10.2で固定する。nameserverの記述は要らないのではないかと思ったのでコメント化した。
chmodで実行権限を与える。
bootsync.shファイルに「/opt/eth1.sh &」を書き加える。
filetool.sh -bで保存し、リブート。
リブート後、sshでログイン。
tc@box:~$ ifconfig eth0 Link encap:Ethernet HWaddr 00:0D:B9:47:8A:40 inet addr:192.168.1.33 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:562 errors:0 dropped:28 overruns:0 frame:0 TX packets:246 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:52631 (51.3 KiB) TX bytes:35785 (34.9 KiB) Memory:fe600000-fe61ffff eth1 Link encap:Ethernet HWaddr 00:0D:B9:47:8A:41 inet addr:192.168.10.2 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Memory:fe700000-fe71ffff eth2 Link encap:Ethernet HWaddr 00:0D:B9:47:8A:42 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Memory:fe800000-fe81ffff lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) tc@box:~$
eth1に「192.168.10.2」が振られている。
次はこれをMiddle Endにしていく。
過去エントリーを参考。
http://blown-lei.net/endive/blosxom.cgi/audio_diary/20210824a.htm
PPAP Back-Endをタンデム化
sudo vi /opt/bootlocal.sh /usr/local/bin/ncat -kl 4400 -e "/usr/local/bin/ncat 192.168.10.10 4400" filetool.sh -b sudo reboot
bootlocal.shファイルに上記のようにコマンド記載。Back EndのIPを「192.168.10.10」とする。
これで動くのかな、、、
合わせて、Back Endのほうも設定し直していくということになる。
Back Endのほうは、イメージを焼くのは飛ばしてsshにログインして設定した。
Middle Endでの試行でIP固定の設定ぐらいまでは出来そうな目星は付いたので。
(6月8日、下記の書き間違いを修正した)
vi /opt/eth1.sh #!/bin/sh pkill udhcpc ifconfig eth1 192.168.10.10 netmask 255.255.255.0 broadcast 192.168.10.255 up route add default gw 192.168.10.1 # echo nameserver 192.168.10.1 > /etc/resolv.conf chmod +x /opt/eth1.sh sudo vi /opt/bootsync.sh #!/bin/sh # put other system startup commands here, the boot process will wait until they complete. # Use bootlocal.sh for system startup commands that can run in the background # and therefore not slow down the boot process. /usr/bin/sethostname box /opt/bootlocal.sh & /opt/eth1.sh & filetool.sh -b sudo reboot
Middle Endと同じ手法で、eth1の設定を行っていく。
filetool.sh -bで保存し、リブート。
リブート後、sshでログイン。
tc@box:~$ ifconfig eth0 Link encap:Ethernet HWaddr 00:0D:B9:50:86:58 inet addr:192.168.1.89 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:44 errors:0 dropped:0 overruns:0 frame:0 TX packets:35 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:6283 (6.1 KiB) TX bytes:5919 (5.7 KiB) Memory:fe600000-fe61ffff eth1 Link encap:Ethernet HWaddr 00:0D:B9:50:86:59 inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Memory:fe700000-fe71ffff eth2 Link encap:Ethernet HWaddr 00:0D:B9:50:86:5A UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Memory:fe800000-fe81ffff lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) tc@box:~$
eth1に「192.168.10.10」が振られている。
さて、直結で機能するかどうか。
Back Endのeth0からLANケーブルを抜く。
MiddleとBackのeth1端子をLANケーブルでつなぎ、Midlle EndからsshでBack Endにログインしてみる。
tc@box:~$ ssh tc@192.168.10.10 The authenticity of host '192.168.10.10 (192.168.10.10)' can't be established. ECDSA key fingerprint is SHA256:eICMkwr/u6JIomP1WNI9YocJTnDxmI8M7ICHoj/oeEY. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '192.168.10.10' (ECDSA) to the list of known hosts. tc@192.168.10.10's password: ( '>') /) TC (\ Core is distributed with ABSOLUTELY NO WARRANTY. (/-_--_-\) www.tinycorelinux.net tc@box:~$
いけました、、、
次、ncmpcppからFrontのmpdに音楽再生の指示を出してみる、、、音は出ました!
はあ、、やってみたら簡単なものである。
もとのつなぎ方と直結、両者の違いを図にしてみた。

音質はどうか。
例えばベールが1枚はがれたようなとか、、薄皮1枚のベール?、、
前とあんまり変わらないような。
正直、違いが分からない、、、どうなんだろう。
まあ、耳が悪いということなのかもしれない、、、
まあ、でも、せっかく設定したのだし、暫くはこれで使っていこうと思う。
暫く使った後で戻したら、こんなに違うんだっけ!ということもあるかもしれないし。
早々だけど追記。
Back Endのeth0とeth2は止めた方がいいという話があって、今回は合わせて止めることにした。
参考にさせていただいたのはこちら。
不要なネットワークデバイスを黙らせる PCオーディオ実験室
http://flac.aki.gs/bony/?p=3681
/opt/bootlocal.shに下記追記した。
pkill udhcpc sudo ifconfig eth0 down pkill udhcpc sudo ifconfig eth2 down
これでeth1以外は寝付く。
更に早々に追記。
音は良くなっていると思う。
簡単に切り替えて比べるということは出来ないので記憶が頼りだけど。
音色の性格が、明瞭になったというか。音場の中で重層化されている様相が見えやすくなったというか、なにしろよい方向。前には戻れないと思う。
wikieditish message: Ready to edit this entry.
A quick preview will be rendered here when you click "Preview" button.