Sometimes you may feel the need to see what's going on behind the scenes in your Squeezebox. The menus may offer some test functionality already but for the curious that's not satisfying enough.
The Squeezebox models mentioned are based on Dropbear which is essentially a tiny linux designed for embedded SoC (System on Chip) hardware where performance is not exceptional. So it's really lightweight but still features an actual Linux kernel that supports multi-tasking, memory management and more, basically on just any hardware.
Linux, as most of you probably know, has great built-in support for networking. A root shell is available via SSH (Secure SHell) that you can connect to wirelessly or wired. It's not particularly user-friendly in that it's just a text-based console, nothing graphic about it. Those who are more experienced with Linux will immediately feel at home as a lot of the usual commands works, such as cd, ls, rm, top, cat, tail, and so on.
The risk of destroying anything is rather low as the file system that you are seeing in there is basically a RAM-disk and is always refreshed when the device is powered up after a cold start. You should still be careful and make backups of files you modify. Don't hold me liable if any of this goes south. Please continue only if you agree you do this on your own risk!
By the way, you won't notice any difference on the user side of your Squeezebox while the SSH port is open or being used. It will behave as always, depending on what you do in the root shell it might be a bit slower maybe.
So how is all of this done?
As usual, it's not just the push of a button.
First I need to disappoint all Transporter, Boom, Receiver, Classic, SliMP owners. SSH is not available on your platform. Unfortunately no way is known about how to connect to their kernel. Maybe it isn't possible at all, or only via JTAG debugging which is way out of my skillset.
So we are focusing here on the three models I know support SSH: Touch, Radio, and Controller.
All of these offer an option to enable the SSH port. By default it is off so the device won't be reachable via SSH at all. This is preferable if you fear that somebody in your network might hijack your Squeezebox. Turning the port off entirely is the best and safest way to ensure nobody gets in there.
Enabling the SSH Port (22)
The option can be found in the menu here:
- Settings (Einstellungen)
- Advanced (Erweitert)
- Remote Login (Remote-Anmeldung)
- Enable SSH (SSH aktivieren)
The screen shown in the last step also reveals what you need to specify to connect and authenticate:
So another reason to keep the SSH port closed is the very weak protection of the root account. I think the password cannot be permanently changed and even if it could, it might interfere with functions the Squeezebox relies on.
Our takeaways here are:
SSH user name: root
Password: 1234
IP address: (varies depending on your network configuration)
The port is open as soon as you click the Enable SSH menu and the little bright box appears to indicate the option is now active. You can toggle it off in the same place at all times.
Okay, so far for the Squeezebox part of this.
Accessing the SSH Shell
Linux
ssh 192.168.74.40 -oKexAlgorithms=+diffie-hellman-group1-sha1 -c aes128-cbc -o PasswordAuthentication=yes -o PreferredAuthentications=keyboard-interactive,password -o PubkeyAuthentication=no -l root
Windows
Once the Connection is Up (Linux and Windows)
Terminating the Connection
Looking around
Task Overview
Mem: 42156K used, 20220K free, 0K shrd, 7724K buff, 13604K cached CPU: 34% usr 2% sys 0% nic 63% idle 0% io 0% irq 0% sirq Load average: 0.25 0.40 0.21 2/39 709 PID PPID USER STAT VSZ %MEM %CPU COMMAND 579 1 root R 29580 47% 33% /usr/bin/jive 631 579 root S 8712 14% 2% jive_alsa -d default -c default -b 30000 -p 2 -s 16 -f 3 704 648 root R 2952 5% 1% top 554 2 root SW< 0 0% 0% [wlan_main_servi] 546 1 root S 3032 5% 0% /usr/sbin/inetd 533 1 root S 2956 5% 0% /sbin/syslogd -S 648 646 root S 2952 5% 0% -sh 581 1 root S 2952 5% 0% /sbin/getty tty3 9600 VC vt100 1 0 root S 2948 5% 0% init 535 1 root S 2948 5% 0% /sbin/klogd 580 1 root S 2948 5% 0% init 620 1 root S 2948 5% 0% udhcpc -R -a -p /var/run/udhcpc.eth0.pid -b --syslog -i eth0 -H SqueezeboxController -s /etc/network/udhcpc_action 646 546 root S 2644 4% 0% dropbear -i 277 1 root S < 2052 3% 0% /sbin/udevd -d 571 1 root S 1908 3% 0% /usr/sbin/wpa_supplicant -B -Dmarvell -ieth0 -c/etc/wpa_supplicant.conf 538 1 root S 1828 3% 0% /usr/sbin/watchdog 573 1 root S 1816 3% 0% /usr/sbin/wpa_cli -B -a/etc/network/wpa_action 163 2 root SW< 0 0% 0% [mtdblockd] 193 2 root SW< 0 0% 0% [s3c24xx-spi-gpi]
System Log
tail -f /var/log/messages
This will show you the last 10 lines in the messages file, and keep updating if new content is appended to the file. <Ctrl-C> terminates tail and you will be back at the prompt.
If you want to review the entire file, use:
less /var/log/messages
less allows you to browse the file line by line or page by page, or jump to the end of it with <G> for instance. There are many more capabilities in less (despite the name). However, it won't update if the file has changes. You need to re-issue the command in order to see the latest content. Less can be quit with the <Q> key.
dmesg will give you the kernel log that was written from the moment the kernel was booted far enough to have file system access. So this shows very early stages of the startup processes and might reveal valuable information if you suspect a malfuction. Usually, dmesg will just dump the entire log into your console (around 160 lines) and you have to scroll back to the top to see all of it. If you want to page through it, type in:
dmesg | less
SD Card Access
Most people don't even know it but there's actually an SD card slot hidden in the battery compartment of the Squeezebox controller!
The battery needs to be removed in order to access the slot. Unfortunately, modern SD cards appear unreadable, probably the firmware supports only very old versions. A Nokia 128MB MicroSD card from my collection can be read without any trouble and auto-mounts to /media/mmcblk0p1, whereas a newer 16GB SanDisk model won't mount at all:
# cd /media # ls mmcblk0p1 # cd mmcblk0p1/ # ls -la drwxr-xr-x 2 root root 512 Jan 1 1970 . drwxr-xr-x 1 root root 0 Jan 1 1970 .. -rwxr-xr-x 1 root root 60416 Sep 29 2013 HXCFE_V1_8_2_40.upd #
Cool, eh?
So you can now copy (cp) files from and to the card as you wish.
The Touch also has an SD slot which is more well-known because it is exposed. I'm speculating here but probably it can be accessed inside SSH.
If you would like to copy and store some files, maybe exchange them with a PC or whatever, and find scp to troublesome to use, the SD card might be a comfortable way out. I will investigate further about the compatibility to SD cards in general, and add information here. For now, I think the older the card, the better the chance to make it work, at least in the Controller.
The Touch will probably support much newer cards as well as higher capacities are certainly desirable for the built-in Logitech Media Server.
Thank you very much for this precise instructions. I hope I can use these to get my Squeezebox Radios working again. There have been some issues with updates of the Spotty Plugin.
ReplyDeleteThank you for your effort.
ReplyDeleteIt was very helpful.
This is the best instruction for getting access to your SB Radio. I need it at the moment to upgrade the firmware to 8.x Do you, by any chance have or know of any instruction how to access and install the latest community firmware for the Squeezebox Radio?
ReplyDeleteHi Joe
ReplyDeleteIch habe ein UE Smart Radio. Den Remote Login wie du beschrieben hast gibt es nicht.
Settings (Einstellungen)
Advanced (Erweitert)
Remote Login (Remote-Anmeldung)
Enable SSH (SSH aktivieren)
Eine Änderung zur Squeeze Box via Update nicht möglich.
Hast du einen Tipp?
Hi Joe
ReplyDeleteIch habe ein UE Smart Radio mit WLan Problemen seit ein paar Wochen. Nur ein Reboot bringt einen Connect, jedoch auch Abbrüche nach z.B. 15 Minuten.
Dort gibt es keine Möglichkeit für einen Remotezugriff wie Du beschrieben hast.
Settings (Einstellungen)
Advanced (Erweitert)
Remote Login (Remote-Anmeldung)
Enable SSH (SSH aktivieren)
Auch kann ich nicht von UE auf die Squeezebox upgraden oder umstellen. Wird nicht angenommen.
Hast Du einen Tipp?
LG
Joe
Hi, gemäß dieser Webseite hier
Deletehttps://forum.fibaro.com/topic/13629-logitech-ue-smart-radio/
muss man zum Freischalten des Developer-Menüs das Einstellungen (Settings)-Menü aufrufen und dann am Gerät die Tasten HOME (🏠) und FWD (⏩) gleichzeitig drücken. Dann erst erscheint das Developer-Menü, wo man SSH freischalten kann.
Hoffe, es hilft ^^ - sorry, ich kann es leider nicht überprüfen, habe gerade kein UE Radio zur Hand.
Grüße,
Joe