FMP24 with Linux and Wine

ianb

Member
Joined
May 12, 2020
Messages
18
Hello,

I've successfully been using the public release of DSD+ on Linux with Wine and external audio input from PulseAudio Virtual Sinks but after upgrading to the fast lane version noticed many new improvements when running FMP instead of an external audio source.

I'm wondering if anyone has any advice on configuring external input for DSD+ fast lane version, or even better how to run FMP24 on Linux so that I can take advantage of all the new features both applications have when communicating together.
 
Last edited:

lwvmobile

Member
Joined
Apr 26, 2020
Messages
109
Location
Lafayette County, FL
I may be entirely wrong, but I don't think there is any way for WINE to use the FMP24 as its looking for Windows devices and Windows drivers, etc. As far as I know, there is no implementation for USB devices to interact or be used with Windows software through wine, aside for some HID devices and symlinking for simple serial or parallel USB devices. DSD+ F/L works great in Wine as you mentioned with PulseAudio Virtual Sinks, but as far as I can tell you can't run the hardware directly through the software. Same issue when using Unitrunker, you can pipe audio into it, but you can't directly attach or use a Dongle through Wine.

This is as far as I got when testing it.

fmp24.png
 

ianb

Member
Joined
May 12, 2020
Messages
18
I may be entirely wrong, but I don't think there is any way for WINE to use the FMP24 as its looking for Windows devices and Windows drivers, etc. As far as I know, there is no implementation for USB devices to interact or be used with Windows software through wine, aside for some HID devices and symlinking for simple serial or parallel USB devices. DSD+ F/L works great in Wine as you mentioned with PulseAudio Virtual Sinks, but as far as I can tell you can't run the hardware directly through the software. Same issue when using Unitrunker, you can pipe audio into it, but you can't directly attach or use a Dongle through Wine.

This is as far as I got when testing it.

View attachment 92133
This is how far I get with FMP24 as well. It would be very interesting if we could manage a way to run FMP without Windows - but either way. I'm impressed with the updates to the Fast Lane version and already I'm benefiting from the improvements and will continue to use Pulse Audio as a source.
 

lwvmobile

Member
Joined
Apr 26, 2020
Messages
109
Location
Lafayette County, FL
Just for fun though, if you try any DSD+ Shenanigans with rtl_tcp or Airspy Spyserver, you get some of these fun messages. It will connect, will reject/disconnect when it sees that is isn't FMPx.
dsdplus_shenanigans.png
 

lwvmobile

Member
Joined
Apr 26, 2020
Messages
109
Location
Lafayette County, FL
This is how far I get with FMP24 as well. It would be very interesting if we could manage a way to run FMP without Windows - but either way. I'm impressed with the updates to the Fast Lane version and already I'm benefiting from the improvements and will continue to use Pulse Audio as a source.
The best chance of that happening would be for DSD+ to release a Linux Binary of FMPx or the entire software. Considering how small of a fraction that market it, and the need to make sure different distros are covered with dependency requirements, it most likely wouldn't happen. It would be nice though. I certainly don't see them releasing any of their software as open source either, since it is a pay subscription model, so you can most likely through that out the window.
 

a417

!#
Joined
Mar 14, 2004
Messages
1,664
Wine has no native/working libusb support. They have been kludging together support for nearly a decade (as you can see part of the way down the page that references kernel 2.6 kludges of XIPH) , and they haven't gotten it to a point that works with FMP24. Recently, there was a patch to bring something called "wineusb" support which will allegedly act like libusb support (that might/should/possibly work with FMP24), but it looks like it will be a long time coming.

FMP24 was written to work in a windows-environment DOS window with intrinsic USB support. I've gotten it to work on some simply awful hardware combinations going all the way back to Windows XP pre-SP1, and it does a fine job. It also works splendidly in the VMs i've toyed with on several different windows guest VM installations.

DSD FL is wine compatible, as it is entirely a userspace application - FMP24 not so much.

It would be interesting to see how nicely this wineusb support works, but I'm not holding my breath.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,361
Location
Talbot Co, MD
DSD FL is wine compatible, as it is entirely a userspace application - FMP24 not so much.

It would be interesting to see how nicely this wineusb support works, but I'm not holding my breath.
Sounds like the best chance of getting it to work would be for the DSDFL authors to write a Linux version of FMP24, but it's probably a very small market with little return on the time investment required.
 

a417

!#
Joined
Mar 14, 2004
Messages
1,664
Sounds like the best chance of getting it to work would be for the DSDFL authors to write a Linux version of FMP24, but it's probably a very small market with little return on the time investment required.
emphasis on very
 

ianb

Member
Joined
May 12, 2020
Messages
18
Thank you to all the replies. I've managed to get my solution working!

I now have 5 RTL-SDR's running on one machine capturing: analogue radio per transmission, parsing DSD+ events and rtl_433 JSON log files, to combine several radio sources into one friendly, low bandwidth, web page solution. Instead of 4 constant streams or repeated GET requests, this is a PUSH web socket system that reads new events and plays them individually, and allows you to quickly replay any message by clicking on it, also, LRRP events are added to a dynamic Mapbox view that has different layers with 3D buildings option.

This is my 'home made' command station and I'm still making many improvments.

1-> County DMR (DSD+)
2-> County DMR (DSD+)
1&2-> LRRP (DSD+) Combined)

3-> CN Rail (Analog FM)
4-> Honeywell Door Sensors (315 MHz)
5-> CYET Airport (Analog AM)

Screenshot from 2020-10-03 17-19-24.png
 

ianb

Member
Joined
May 12, 2020
Messages
18
Just for fun though, if you try any DSD+ Shenanigans with rtl_tcp or Airspy Spyserver, you get some of these fun messages. It will connect, will reject/disconnect when it sees that is isn't FMPx.
View attachment 92134
I was able to recreate this as well. Such a tease, as prefer Linux, but DSD+ Fast Lane has been a great upgrade even without FMP.
 

lwvmobile

Member
Joined
Apr 26, 2020
Messages
109
Location
Lafayette County, FL
This is my 'home made' command station and I'm still making many improvments.
Looks quite interesting, got any more info on how you have this all set up? Any tutorials or scripts to share? Are you running your dongles on the same box as DSD+ and your web server? I don't even know what questions to ask about this set up, other than I want to know what all your using.
 

ianb

Member
Joined
May 12, 2020
Messages
18
Looks quite interesting, got any more info on how you have this all set up? Any tutorials or scripts to share? Are you running your dongles on the same box as DSD+ and your web server? I don't even know what questions to ask about this set up, other than I want to know what all your using.
I have all 5 dongles hooked to a USB hub connecting to a computer running Linux Mint with two DSD+ instances and two instances of rtl_fm and sox that record audio when a signal is over a given threshold (see code snippet below). The same computer also runs a background service that I wrote with PHP and Ratchet WebSockets to monitor DSD+ logs, rtl_433 logs, and new files events that are pushed to the front-end website (that is also on the same machine.).

Another great thing is the longer a message is - the more space between it, which allows you to quickly scroll through and find the calls that have detail versus the shorter ("Roger", "Negative", "Copied") transmissions which provide less detail. It loads nice on mobile as well!

I'm not sure if that clarifies your question or not - but I'm all for helping create a similar setup and if you want parts of the software to play with or all of it to sort through feel to contact me.

1601782033070.png



This terminal command can monitor an AM or FM band and record individual, numbered wav files using rtl_fm and sox with a silence filter. You will need to tweak your parameters for your needs.

rtl_fm -d 3 -s 12k -A fast -g 30 -l 30 -M am -f 123.200M | sox --norm=-0 -t raw -r 12k -e signed -b 16 -c 1 -V1 - ".wav" silence 1 0.5 1% 1 0.5 1% : newfile : restart
 

lwvmobile

Member
Joined
Apr 26, 2020
Messages
109
Location
Lafayette County, FL
The same computer also runs a background service that I wrote with PHP and Ratchet WebSockets to monitor DSD+ logs, rtl_433 logs, and new files events that are pushed to the front-end website (that is also on the same machine.).
I think a lot of people would be interested in that PHP script and back end and front end alike for making custom setups like you have. Have you considered making a generic template for it and a github or anything like that?

Also, when you have sox make the wav files for you, are those saved in a folder and indexed by the webscript. How do they get linked to the events in your setup, and how do they get sent through the vocoder, or are they analog voice?
 

ianb

Member
Joined
May 12, 2020
Messages
18
I think a lot of people would be interested in that PHP script and back end and front end alike for making custom setups like you have. Have you considered making a generic template for it and a github or anything like that?

Also, when you have sox make the wav files for you, are those saved in a folder and indexed by the webscript. How do they get linked to the events in your setup, and how do they get sent through the vocoder, or are they analog voice?

rtl_fm / sox records a wave file into the current directory of the terminal window and uses numbered file names 1.wav, 2.wav, 3.wav etc. PHP then processes each Unix file timestamp and divides the file size by 24000k (sample rate) to generate the duration. The key to linking DSD+ events is by using the -Pwav flag to record individual files and use PHP to search the DSD+ recording directories that are date based such as '20201004' for October 4th, 2020, and file names are 24-hour clock formatted such as 4:14:13 PM would be 16:14:13 thus 161413_001_TIII(BS)_S3-8_DCC0_Slot1_GC_1100_1.wav . The issue I've noticed is the event log time and file are sometimes a second or two off and for this when a file isn't found the program checks for next second.

I'm working on some changes and will post a link and make the GIT repository public with some notes. It will not be a drop-in solution but fairly easy to get working. Also, I removed the dog theme and went a bit more generic with "Combined Events Monitor".



1601862010589.png
The "Dog Door" is actually a neighbours, but when it opens be warned that there will be constant barking from two little puppies.
 

lwvmobile

Member
Joined
Apr 26, 2020
Messages
109
Location
Lafayette County, FL
It took me a few minutes to figure out what you were talking about when you were talking bout the dog door. I thought you were talking about taht background picture. Anytime I've ever run rtl_433, all I've ever found is my own weather station.

Yeah, I wouldn't expect anything like this to be a drop in solution, but it seems doable and tweakable, just one of those things were I'm terrible at any sort of web coding like PHP. I can barely scrape by in Python and C, took me forever to figure out how to integrate NCURSES into a little rinky dink program that I forked a while back. I'm definitely much better at tinkering than I am at coding from scratch.

I will look forward to seeing the GIT repo when you get it up and running. That's one thing I can say, its easy to throw some code up on there, but its a pain to write up a readme file or tutorial that spells out how to configure and use something. I've started to write a tutorial on one of my projects a while back, and every time I start, I make a little progress, get tired of writing it, and just leave it unpublished.
 

ianb

Member
Joined
May 12, 2020
Messages
18
I've posted a public repository for anyone to checkout. It could use better documentation, explanation and has hard coded references to directories, but you should be able to figure it out and I can try to answer any questions.



Important Files to Edit
index.php
js/script.js
bin/server.php
src/eventprocessor.php



A startup scrip that takes care of opening DSD, sox/play, rtl_fm and Ratchet WebSocket

Bash:
#!/bin/sh

# Delete old Recordings on Startup
rm /home/sdr/Desktop/Recordings/CYET/*
rm /home/sdr/Desktop/Recordings/CN/*
rm /home/sdr/Desktop/Recordings/rtl_433/*

# Start rtl_fm with Recording and DSDPlus Minamized Windows
cd /home/sdr/Desktop

# Set DSD+ Output to unused Sink to ensure no interference from output/input

# 153.920
export PULSE_SINK="Virtual_Sink1"
gnome-terminal --tab --title="rtl_fm ( 153.920 MHz )" -- /bin/bash -c 'rtl_fm -d 0 -M fm -f 153.920M -s 12k -g 30 | play -r 12k -t raw -e s -b 16 -c 1 -V1 -; read'
export PULSE_SOURCE="Virtual_Sink1.monitor"
export PULSE_SINK="Virtual_Sink4"
gnome-terminal --tab --title="DSDPlus ( 153.920 MHz )" -- /bin/bash -c 'cd "DSDPlus v2.268"; wine DSDPlus.exe -F1 -rv -fr -Pwav; read'

sleep 5

# 159.225
export PULSE_SINK="Virtual_Sink2"
gnome-terminal --tab --title="rtl_fm ( 159.225 MHz )" -- /bin/bash -c 'rtl_fm -d 1 -M fm -f 159.225M -s 12k -g 30 | play -r 12k -t raw -e s -b 16 -c 1 -V1 -; read'
export PULSE_SOURCE="Virtual_Sink2.monitor"
export PULSE_SINK="Virtual_Sink4"
gnome-terminal --tab --title="DSDPlus ( 159.225 MHz )" -- /bin/bash -c 'cd "DSDPlus v2.268"; wine DSDPlus.exe -F2 -rv -fr -Pwav; read'

sleep 3

# Start CN Scanner - Record new wav per signal
gnome-terminal --tab --title="CN Rail (Edson)" -- /bin/bash -c 'cd /home/sdr/Desktop/Recordings/CN/ && rtl_fm -d 2 -s 12k -A fast -g 30 -l 38 -f 160.785M -f 161.195M -f 161.205M -f 161.415M -f 161.535M -f 162.000M | sox --norm=-0 -t raw -r 12k -e signed -b 16 -c 1 -V1 - ".wav" silence 1 0.5 1% 1 0.5 1% : newfile : restart; read'

sleep 3

# CYET Airport - Record new wav per signal
gnome-terminal --tab --title="CYET Airport" -- /bin/bash -c 'cd /home/sdr/Desktop/Recordings/CYET/ && rtl_fm -d 3 -s 12k -A fast -g 30 -l 35 -M am -f 123.200M | sox --norm=-0 -t raw -r 12k -e signed -b 16 -c 1 -V1 - ".wav" silence 1 0.5 1% 1 0.5 1% : newfile : restart; read'

sleep 3

gnome-terminal --tab --title="rtl_433" -- /bin/bash -c 'cd /home/sdr/Desktop/Recordings/rtl_433 && rtl_433 -d 4 -f 345000000 -G 4 -v -M level -F json:rtl_345.json; read'

sleep 3

# Web Socket
gnome-terminal --tab --title="Ratchet Socket" -- /bin/bash -c 'php /var/www/html/bin/server.php; read'

# Blank Tab for nicenesszz
# gnome-terminal --tab --title="Blank Tab" -- /bin/bash -c 'read'
With any success you will have something like this


Untitled.jpg
 
Last edited:

lwvmobile

Member
Joined
Apr 26, 2020
Messages
109
Location
Lafayette County, FL
Well, I cloned it, and so far I've been able to get the web interface to work, but I haven't had much luck getting anything to populate. I went through and tweaked the settings in the files you mentioned for the folders I'm using and running from localhost etc. I'm currently running only two dongles, I have going on rtl_fm/DSD and the second on rtl_433. I'll have to tinker with it some more when I have more time, then maybe I'll be able to figure out what all questions to ask.
 
Top