41 lines
1.0 KiB
Markdown
41 lines
1.0 KiB
Markdown
esp32-audio.service goes to ~/.config/systemd/users/
|
|
|
|
# Enable it so it starts automatically at login
|
|
systemctl --user enable esp32-audio.service
|
|
|
|
# Start it immediately
|
|
systemctl --user start esp32-audio.service
|
|
|
|
# Check its status
|
|
systemctl --user status esp32-audio.service
|
|
|
|
|
|
# Causes user login to linger
|
|
sudo loginctl enable-linger littlesophia
|
|
|
|
|
|
|
|
|
|
NEED TO LOCK IN ID OF ESP32 SO ITS ALWAYS THE SAME PORT
|
|
|
|
|
|
#Get ID
|
|
udevadm info -a -n /dev/ttyACM0 | grep serial
|
|
|
|
EXAMPLE RESPONSE
|
|
(radxa) littlesophia@radxa-cubie-a7z:~/serial_audio_catcher$ udevadm info -a -n /dev/ttyACM0 | grep serial ATTRS{product}=="USB JTAG/serial debug unit" ATTRS{serial}=="B4:3A:45:AD:CA:90" ATTRS{serial}=="xhci-hcd.41.auto"
|
|
|
|
CREATE rules file and add listing
|
|
sudo nano /etc/udev/rules.d/99-esp32.rules
|
|
|
|
add this line
|
|
SUBSYSTEM=="tty", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", ATTRS{serial}=="B4:3A:45:AD:CA:90", SYMLINK+="ttyESP32_A"
|
|
|
|
Now device should be locked at port "/dev/ttyESP32_A"
|
|
|
|
|
|
|
|
|
|
# Test Record
|
|
parec -d esp32.monitor --file-format=wav > test.wav
|