Skip to content

Tips for developers

IvarNilsson edited this page Aug 8, 2024 · 7 revisions

Here are some tips and good sources!

General

Swap space

Having issues with your machine crashing? Consider increasing the swap space: Increase swap space.

Wifi + ethernet = ❤️

Want to be able to google while running with arrays or udpreplay? Check mysteriousmonkey29.

Offline usage

As mentioned in the getting started page, you may not always want to run live with arrays and FPGAs connected, since it can be a hassle to set up. Instead .pcap files can be recorded with the help of Wireshark and replayed with udpreplay. Meaning, record once with FPGA and array, replay thousands.

Connect an ethernet cable from your computer to "itself". Hopefully you are using a docking station (docka): set one end of the cable directly in your computer and the other in the docking station. Set your wired settings with the IPv4 address 10.0.0.1, netmask 255.255.255.0 and gateway 192.168.1.2.

Start the program as normal in one terminal window, in another start udpreplay and watch the magic unfold!

.pcap files

Some .pcap recordings are available on the acoustic warfare google drive.

4m_hover.pcap Is a recording of a drone hovering four meters away from two FPGAs, each with one array. Its recorded in Studion with the latest implementation of acoustic warfare. Its recorded with the port 21875 to the left and 21876 to the right. See image.

4m_SideToSide.pcap Is a recording of a drone flying side to side four meters away from two FPGAs, each with one array. Its recorded in Studion with the latest implementation of acoustic warfare. Its recorded with the port 21875 to the left and 21876 to the right. See image.

frambakhög.pcap Is a recording of a drone flying front to back from two FPGAs, each with one array. Its recorded in Idrottshallen with the latest implementation of acoustic warfare. Its recorded with the port 21875 to the right and 21876 to the left. See image.

4m_hover.pcap 4m_SideToSide.pcap frambakhög.pcap

Docker & DNS

Some issues have risen with using Docker and the Telia network. It seems as the DNS has its own life...

You may need to add the following to the /etc/docker/daemon.json

{
    "dns": ["1.1.1.1"]
}

Audio

PA

Port Audio documentation

daemon.conf

Tips about configuring daemon.conf: endeavouros.com, overclock.net

Runtime errors

Errors when running such as:

connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dmix.c:1005:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1005:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1005:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1005:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
Expression 'GetExactSampleRate( hwParams, &defaultSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 895
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed

Is normal and does not disturb the performance. It mostly concerns devices not in use for this project and can be configured away if wanted.

Camera

If you don't find the external camera try finding it using mpv first. This can help locating the camera which then makes it able to be found by the beamformer. If the camera feed shows up when using mpv the camera works and should be found by the program.