abstractfoundry / lumicube-daemon

10 stars 13 forks source link

Installation issues in Ubuntu 22.04.1 LTS #6

Open mfoo opened 2 years ago

mfoo commented 2 years ago

I've got the daemon running in Ubuntu 22.04.1 LTS now and I have some notes that could be useful for others. I'd quite like to turn them into a contribution guide or getting started guide in the repo README.md, but I've opened an issue here to discuss them first. I expect a bunch of these wouldn't have been an issue if I'd purchased the Pi addon!

Notes:

Other things it's worth noting for the contributing guidelines:

Sorry if this is a bit of a stream of consciousness - hopefully with some more information I can deliver some documentation changes and update this so it's clearer for anybody else who's having issues.

Findarato commented 2 years ago

Just ran into this exact same problem on Raspberry pi OS based on Debian 11.

sudo apt install pulseaudio-utils pulseaudio libalsaplayer-dev portaudio19-dev did not fully work, now I am at

pi@rpi-lumicube-01:~/AbstractFoundry/Daemon $ ./launch.sh 
Exception in thread "main" java.lang.IllegalStateException: Error installing virtual microphone source.
    at com.abstractfoundry.daemon.audio.VirtualMicrophone.<init>(VirtualMicrophone.java:50)
    at com.abstractfoundry.daemon.Daemon.<init>(Daemon.java:69)
    at com.abstractfoundry.daemon.Daemon.main(Daemon.java:113)

I would also say Debian 11, or at least the RPI version has jack installed and running which gets removed with the software you have to install. If I had easier access to the SD card I would try an older version, but man ripping this whole thing apart to get to the SD card is a P.I.T.A.

When I try and run the software manually ( as the PI ) I get serial IO errors

11:17:32.795 [Foundry Ingress] ERROR c.a.daemon.serial.IngressThread - I/O error.
com.fazecast.jSerialComm.SerialPortIOException: This port appears to have been shutdown or disconnected.
    at com.fazecast.jSerialComm.SerialPort$SerialPortInputStream.read(SerialPort.java:1494)
    at com.abstractfoundry.daemon.serial.IngressThread.run(IngressThread.java:51)
11:17:32.810 [Foundry Outbox Disruptor] WARN  c.a.daemon.serial.SerialDriver - I/O error whilst transmitting frame.
com.fazecast.jSerialComm.SerialPortIOException: This port appears to have been shutdown or disconnected.
    at com.fazecast.jSerialComm.SerialPort$SerialPortOutputStream.write(SerialPort.java:1591)
    at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
    at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
    at com.abstractfoundry.daemon.serial.SerialDriver.handleOutbox(SerialDriver.java:187)
    at com.lmax.disruptor.BatchEventProcessor.processEvents(BatchEventProcessor.java:168)
    at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:125)
    at java.base/java.lang.Thread.run(Thread.java:831)

Using legacy 32bit raspberry pi os LITE does help. You need the sudo apt install pulseaudio-utils pulseaudio libalsaplayer-dev portaudio19-dev or nothing works.

image

Successfully have lavalamp.

mfoo commented 2 years ago

For what it's worth in my case when I had the crash in the constructor of VirtualMicrophone, the pulse audio sink and source devices that the code installed didn't get deleted - you can see them with pacmd list-sources after the crash. When rerunning after installing packages this made it look like it was failing due to the original reason but it wasn't. I'm not an expert here so I just installed the packages and rebooted and I haven't experienced that issue since.

The device being disconnected might be a permissions issue. Do you have serial comms enabled in the boot command? Which users/groups can write to /dev/ttyS0 (in Ubuntu it's dialout)? Is the user you're running the command as part of that group?

mfoo commented 2 years ago

Oh, one of the other things you can do if you want to be able to swap OS on the Pi without taking the SD card out (since it's now inaccessible) is to update the bootloader. The Pi Imager tool has a bootloader update in the Misc category that first tries to boot from USB mass storage, then if one doesn't exist, tries to boot from SD card. You flash the bootloader updater, boot it, the screen goes green after a few seconds, then flash the OS back onto the SD card. Super simple. Want to try a new OS on the Pi for a while? Flash to USB and plug it in. Want to revert back? Unplug it.

sgutermann commented 2 years ago

Ubuntu 22.04.1 LTS is nowhere listed as supported, as far as I can tell.

In terms of Support and Help, check your Kickstarter update #24 and join on discord: https://discord.gg/Vw4GP74jyR

In terms of install problems on Raspian check out: https://github.com/abstractfoundry/lumicube/blob/main/community-documentation/raspberry_pi_os_lite_install.md

And yes, currently only use the 32bit Image for Raspian.