Tenrec: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
mNo edit summary
 
Line 290: Line 290:


[[Category: Raspberry Pi]]
[[Category: Raspberry Pi]]
[[Category: Computers]]

Latest revision as of 15:12, 13 August 2023

Tenrec is a Raspberry Pi 4B

photo credit

2020-May-09 arrived from Newark

I set it up as a build machine, with its faster processor and more RAM and SSD on USB3 it runs circles around violet (Pi 3B+) and of course my little Pi Zeroes.


Hardware

Cable management is always an issue with the Pi, they stick out everywhere! :-)

  • Pi 4B with 4GB
  • Seeed heatsink kit so cute, had to have one. Probably superfluous.
  • 7" Pi touch screen from Element14
  • Multicomp Pro case, clear
  • Corsair GTX 240GB SSD
  • Startech USB3S2SAT3CB USB3.0-SATA3 cable w/UASP (lsusb id is 174c:55aa with ASMedia ASM1053E chipset)
  • Kensington USB3 hub

I drilled a couple holes in the bottom of the case, attached RAM mount hardware.

I got a Kensington USB3 hub and I run it on a separate 5V supply, so now it's powering the Apple keyboard and a Startech USB3 SATA cable.

The combination of USB3, SATA3, and a reasonably fast SSD is working well.

Quirks tests

set quirks=174c:55AA in /boot/cmdline.txt then run sudo ./Storage.sh and observe the results

     Category                  Test                      Result
HDParm                    Disk Read                 162.96 MB/s
HDParm                    Cached Disk Read          161.84 MB/s
DD                        Disk Write                163 MB/s
FIO                       4k random read             IOPS ( KB/s)
FIO                       4k random write            IOPS ( KB/s)
IOZone                    4k read                   15504 KB/s
IOZone                    4k write                  23439 KB/s
IOZone                    4k random read            15545 KB/s
IOZone                    4k random write           21437 KB/s

With quirks turned off, it's faster

     Category                  Test                      Result
HDParm                    Disk Read                 270.66 MB/s
HDParm                    Cached Disk Read          265.18 MB/s
DD                        Disk Write                166 MB/s
FIO                       4k random read             IOPS ( KB/s)
FIO                       4k random write            IOPS ( KB/s)
IOZone                    4k read                   16087 KB/s
IOZone                    4k write                  20849 KB/s
IOZone                    4k random read            16183 KB/s
IOZone                    4k random write           23324 KB/s


Screen and touch screen rotation

In this case, the 7" screen is upside down. You can fix this! https://raspberrypiprojects.com/raspberry-pi-rotate-touch-screen/ Also the image did not fill up the screen, perhaps it was defaulting to 640x480?

In /boot/config.txt,

lcd_rotate=2
framebuffer_width=800
framebuffer_height=480

On the login screen with these settings there is a white band on the right, one or two pixels wide but I don't care. It goes away after login.

Power

I had the lightning bolt low voltage warning almost continuously until I plugged in only a hub to the USB ports. I am using a 5V 4A switching supply and a USB-C cable. My power meter says it's pulling just over an amp. I kept turning up the voltage until the warnings stopped. About 5.4 volts. I suspect the cables are the real problem,

Software

2022-12-10 I have the current version loaded now, it seems fine. It's the one based on Debian Bullseye

2021-11-30 Today I am trying Ubuntu Server 64-bit, 21.10 I think it is. It works. The Raspios versions just white screened.

I have been using the Pi Imager, it is great. I have been installing directly onto a SSD instead of them wee SD cards.

Ubuntu settings

Locale? Try "dpkg-reconfigure locales".

sudo timedatectl set-timezone America/Los_Angeles

WiFi

With Ubuntu I cannot run raspi-config any longer. WiFi is in settings. It says WiFi is "unavailable". There are no "visible networks". It worked before I installed matchbox. Dang. I had to edit a file, the file 10-rpi-ethernet-eth0.yaml contains this:

network:
  ethernets: {}
  wifis:
    wlan0:
      dhcp4: true
      access-points:
        "wildsong":
          password: "somethingaboutturtles"

I don't know what it is for but when I do

netplan try

it comes right up. It is still not visible in Settings->WiFi

Bluetooth works.

Ubuntu packages

emacs matchbox xinit

foxtrotgps navit gpsd

Matchbox

Autologin: Edit /etc/gdm3/custom.conf

Settings

-> Location services -> turn on (What is Mozilla Location Service?)

-> Privacy -> Screen lock -> Don't blank, don't lock screen. don't lock on suspend

How can I make the icons bigger?

What is Fractional Scaling

Audio

For ALEXA, do not install pulseaudio it makes her sound crackly and talk slowly. (Seriously weird.) I hacked around with pulseaudio because it was not working. I used some notes from here, on StackExchange.

I am using a Logitech camera for its microphone and the built in audio line out.

Adding X11

I installed the window environment on the SSD. Also it goes without saying, emacs.

sudo -s
dpkg --configure -a
apt update
apt full-upgrade
reboot
apt install emacs-nox
apt install xserver-xorg xinit
apt install raspberrypi-ui-mods
reboot

Now I have a lightdm login screen, so I log in.

VNC Server

Let's try


sudo apt install tigervnc-standalone-server

It will be installed as /usr/bin/vncserver

It supports "reverse" connections, which might possibly work with a reflector???


It is saying it needs a session manager when I run it



In raspi-config I am supposed to be able to turn on Real VNC Server but it fails. I think this works, but it will not work with the reflector so why bother?

apt-get install realvnc-vnc-server
systemctl enable vncserver-x11-serviced.service
systemctl start vncserver-x11-serviced.service

instead, I am trying tightvnc.

I probably have to start X11 running to make this work. This installs about 1000 packages. Sigh. The price you pay to run vncserver. For full description, see https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-debian-10

Installing xfce4 as recommended in the above article will install pulseaudio, possibly breaking everything we need to make svxlink work. I should probably try matchbox instead. I guess it is running some version of Gnome, I don't care really.

apt-get install tightvncserver

Initialize the ~/.vnc settings by running "vncserver". Follow the instructions to set passwords. Then stop it by running "vncserver -kill :1"

I rebooted at this stage to see if I had hopelessly broken the computer. It's okay. My 7" LCD still does not work. I must have broken it at some point and it is staying broken.

Make it run after reboot,

sudo emacs /etc/systemd/system/[email protected]
sudo systemctl daemon-reload
sudo systemctl enable [email protected] # note the "1" which refers to the display
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target

[Service]
Type=forking
User=link
Group=link
WorkingDirectory=/home/link

PIDFile=/home/link/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver <mark>-depth 24 -geometry 1280x800</mark> :%i
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target

Adding Squeezelite

http://www.winko-erades.nl/installing-squeezelite-player-on-a-raspberry-pi-running-jessie/

Adding Alexa

Sample code is in /home/pi/alexa/.

I did a clean build after switching from Violet (Debian Stretch) to Tenrec (Debian Buster). Finally I did the build on the console on Tenrec after trying a few times from remote SSH sessions that got interrupted by random life events like dinner and walks.

 Wake word:                                                                 |
|       Simply say Alexa and begin your query.                               |
| Tap to talk:                                                               |
|       Press 't' and Enter followed by your query (no need for the 'Alexa').|
| Hold to talk:                                                              |
|       Press 'h' followed by Enter to simulate holding a button.            |
|       Then say your query (no need for the 'Alexa').                       |
|       Press 'h' followed by Enter to simulate releasing a button.          |
| Stop an interaction:                                                       |
|       Press 's' and Enter to stop an ongoing interaction.                  |
| Privacy mode (microphone off):                                             |
|       Press 'm' and Enter to turn on and off the microphone.               |
| Playback Controls:                                                         |
|       Press '1' for a 'PLAY' button press.                                 |
|       Press '2' for a 'PAUSE' button press.                                |
|       Press '3' for a 'NEXT' button press.                                 |
|       Press '4' for a 'PREVIOUS' button press.                             |
| Settings:                                                                  |
|       Press 'c' followed by Enter at any time to see the settings screen.  |
| Speaker Control:                                                           |
|       Press 'p' followed by Enter at any time to adjust speaker settings.  |
| Firmware Version:                                                          |
|       Press 'f' followed by Enter at any time to report a different        |
|       firmware version.                                                    |
| Info:                                                                      |
|       Press 'i' followed by Enter at any time to see the help screen.      |
| Reset device:                                                              |
|       Press 'k' followed by Enter at any time to reset your device. This   |
|       will erase any data stored in the device and you will have to        |
|       re-register your device.                                             |
|       This option will also exit the application.                          |
| Reauthorize device:                                                        |
|       Press 'z' followed by Enter at any time to re-authorize your device. |
|       This will erase any data stored in the device and initiate           |
|       re-authorization.                                                    |
|                                                                            |
| Quit:                                                                      |
|       Press 'q' followed by Enter at any time to quit the application.  

Hooking up some NeoPixels

https://www.instructables.com/id/Alexa-Assistant-With-a-10-Raspberry-Pi-Zero-W-and-/