Open mfoo opened 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.
Successfully have lavalamp.
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?
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.
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.
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:
I can see the following comment at the top of
install.py
:It might be worth considering pointing this to the GitHub repo and manage releases using GitHub - saves on hosting costs and it has a well defined release process that other projects follow.
I couldn't get
install.py
to succeed and eventually figured it would be simpler to build it myself with Maven. Issues encountered:install_system_dependencies
doesn't install enough packages.pulseaudio-utils
,pulseaudio
,libalsaplayer-dev
, andportaudio19-dev
.psutil
python module manually, and while I haven't tested if it fixes it yet, the scrolling clock plugin currently fails telling me that thePIL
module is not installed.install.py
, to use Python'srequirements.txt
process? It's a bit like a pom file for Python applications and it'd makeinstall.py
simpler, as well as making testing Python changes simpler by using the library without the daemon. There's some documentation here that explains it.raspi-config
in the Ubuntu repositories is old. It seems that Ubuntu has moved the/boot/config.txt
to/boot/firmware/config.txt
and so the calls modify UART settings etc failed and I had to apply them manually.install.py
encountered errors in the subprocesses (like callingraspi-config
) it ignored them. Is it worth adding some error handling?Other things it's worth noting for the contributing guidelines:
java -cp foo -Dlogback.configurationFile=log.xml Bar
) for local testing/developmentSorry 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.