Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLEX Support? #1

Closed
MS3FGX opened this issue Jul 31, 2012 · 25 comments
Closed

FLEX Support? #1

MS3FGX opened this issue Jul 31, 2012 · 25 comments

Comments

@MS3FGX
Copy link

@MS3FGX MS3FGX commented Jul 31, 2012

Recently came across this project and very happy to see somebody taking up the challenge of getting multimon modernized. Was able to start it right up on my 64bit Mint machine with PulseAudio (so already worlds better than its predecessor).

Was wondering about the possibility of adding FLEX support in the future. As far as I know, there is no Linux software for decoding FLEX, only Windows applications like PDW. Would be nice not to have to run PDW in WINE all the time.

@EliasOenal
Copy link
Owner

@EliasOenal EliasOenal commented Jul 31, 2012

Nice to hear that you like it. Adding FLEX shouldn't be too hard and if someone implements it I will gladly take the patches. I might do it myself, but probably not too soon. To be honest I have so far only verified POCSAG operation, thus the other modes could still have (x64 related) problems.

@MS3FGX
Copy link
Author

@MS3FGX MS3FGX commented Jul 31, 2012

My mistake, GNU Radio does actually include a FLEX decoder. Of course, having something lighter than GNU Radio to do this would be great.

@EliasOenal
Copy link
Owner

@EliasOenal EliasOenal commented Mar 30, 2014

PDW has since been relicensed as GPL software.
https://github.com/Discriminator/PDW/blob/master/Flex.cpp

@jester-xbmc
Copy link

@jester-xbmc jester-xbmc commented Jul 31, 2014

I had a look at using the PDW flex.ccp and creating a patch for multimode-ng, but i'm getting nowhere, are you still looking at implementing FLEX ? it would be a great addition, specially for rasp-pi setups piping rtl_fm
Thanks

P.S. ERMES would also be nice, but FLEX is more used
https://github.com/Discriminator/PDW/blob/master/ermes.cpp

@craigshelley
Copy link
Contributor

@craigshelley craigshelley commented May 13, 2015

Hello,
Back in 2011, I hacked together a FLEX demod for multimon. If I remember, I took some code from gnuradio, but had to write the symbol synchronization and quantization code. I've just rediscovered the code while playing with gnuradio, and thought it ought to be made public. I recall spending a lot of time making it robust to cope with noisy/weak signals etc..
I was just wondering if the project was still alive and if anyone would be interested in the code.
The only snag is that the code is quite a messy hack, and would probably need some tidying up to bring it up to standard.

Regards,
Craig Shelley

@EliasOenal
Copy link
Owner

@EliasOenal EliasOenal commented May 15, 2015

I am pretty sure people would appreciate it, since I still get mails once in a while asking me about FLEX support. And while I personally don't have time to play with SDR anymore, I surely still accept pull requests.

@craigshelley
Copy link
Contributor

@craigshelley craigshelley commented May 15, 2015

Ok, I'll try to tidy up the code a bit. I've not had chance to try
multimon-ng yet, I'm hoping it should port across without much
modification.

Regards,
Craig
On 15 May 2015 12:04, "Elias Önal" notifications@github.com wrote:

I am pretty sure people would appreciate it, since I still get mails once
in a while asking me about FLEX support. And while I personally don't have
time to play with SDR anymore, I surely still accept pull requests.


Reply to this email directly or view it on GitHub
#1 (comment)
.

@jester-xbmc
Copy link

@jester-xbmc jester-xbmc commented May 15, 2015

Thanks, it will be a most welcome addition.

@boetersep
Copy link

@boetersep boetersep commented May 20, 2015

https://github.com/boetersep/multimon-ng, works on my pi, p2000 only

@craigshelley
Copy link
Contributor

@craigshelley craigshelley commented May 25, 2015

Flex support added, although not tested with all signal formats.
https://github.com/craigshelley/multimon-ng

@EliasOenal
Copy link
Owner

@EliasOenal EliasOenal commented Jun 15, 2015

If you think it's ready, please send me a pull request. Also I think it would be good to have a small sample, if you can provide any.

@chris021
Copy link

@chris021 chris021 commented Jun 26, 2015

Hi Craig, I have tried your fork with flex1600 with out any luck. Would it be possible for me to send you an audio sample?

@craigshelley
Copy link
Contributor

@craigshelley craigshelley commented Jun 26, 2015

Yes, sure please do. I'd like to get it working on all of the flex
formats.
On 26 Jun 2015 21:15, "chris021" notifications@github.com wrote:

Hi Craig, I have tried your fork with flex1600 with out any luck. Would it
be possible for me to send you an audio sample?


Reply to this email directly or view it on GitHub
#1 (comment)
.

@chris021
Copy link

@chris021 chris021 commented Jun 27, 2015

Here are 2 samples. Both contain a mix of POCSAG and FLEX

https://onedrive.live.com/redir?resid=CE93060699F49335%21147


From: Craig Shelley notifications@github.com
Sent: Saturday, 27 June 2015 10:16 a.m.
To: EliasOenal/multimon-ng
Cc: chris021
Subject: Re: [multimon-ng] FLEX Support? (#1)

Yes, sure please do. I'd like to get it working on all of the flex
formats.
On 26 Jun 2015 21:15, "chris021" notifications@github.com wrote:

Hi Craig, I have tried your fork with flex1600 with out any luck. Would it
be possible for me to send you an audio sample?

Reply to this email directly or view it on GitHub
#1 (comment)
.

Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-115907098.

@craigshelley
Copy link
Contributor

@craigshelley craigshelley commented Jun 27, 2015

Hi Chris,

Both files appear to decode ok using the following commands:
$ multimon-ng -a FLEX -t raw paging01.raw
$ multimon-ng -a FLEX -t raw paging02.raw

The output looks like this:
FLEX: 2015-06-27 07:49:08 1600/2/A 00.096 [001234567] ALN THIS IS A TEST
PERIODIC PAGE SEQUENTIAL NUMBER 8251

The other FLEX messages appear to be emergency services pagers, which
I'm a little reluctant to post the decodes of.

paging01.raw contains 6 intelligible bursts of pager activity
1: at 0.2 seconds POCSAG1200
2: at 16.2 seconds FLEX1600/2 (no pages)
3: at 24.2 seconds POCSAG1200
4: at 46.3 seconds FLEX1600/2 (1 page) followed by POCSAG1200
5: at 86.2 seconds FLEX1600/2 (no pages)
6: at 100.6 seconds FLEX1600 (2 pages)

paging02.raw contains 4 intelligible bursts
1: at 5.6 seconds FLEX1600/2 (no pages)
2: at 20.6 seconds POCSAG512
3: at 40.6 seconds POCSAG1200 followed by FLEX1600/2 (2 pages) followed
by FLEX1600/2 (0 pages)
4: at 68.6 seconds POCSAG1200

Regards,
Craig

On Fri, 2015-06-26 at 22:20 -0700, chris021 wrote:

Here are 2 samples. Both contain a mix of POCSAG and FLEX

https://onedrive.live.com/redir?resid=CE93060699F49335%21147


From: Craig Shelley notifications@github.com
Sent: Saturday, 27 June 2015 10:16 a.m.
To: EliasOenal/multimon-ng
Cc: chris021
Subject: Re: [multimon-ng] FLEX Support? (#1)

Yes, sure please do. I'd like to get it working on all of the flex
formats.
On 26 Jun 2015 21:15, "chris021" notifications@github.com wrote:

Hi Craig, I have tried your fork with flex1600 with out any luck.
Would it
be possible for me to send you an audio sample?

Reply to this email directly or view it on GitHub

#1 (comment)
.

Reply to this email directly or view it on
GitHubhttps://github.com//issues/1#issuecomment-115907098.


Reply to this email directly or view it on GitHub.

@chris021
Copy link

@chris021 chris021 commented Jun 27, 2015

How Odd....

this is what i get:

root@raspberrypi:~# multimon-ng -a FLEX -t raw paging01.raw

multimon-ng (C) 1996/1997 by Tom Sailer HB9JNX/AE4WA

         (C) 2012-2014 by Elias Oenal

available demodulators: POCSAG512 POCSAG1200 POCSAG2400 FLEX EAS UFSK1200 CLIPFSK FMSFSK AFSK1200 AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI1 ZVEI2 ZVEI3 DZVEI PZVEI EEA EIA CCIR MORSE_CW DUMPCSV SCOPE

Enabled demodulators: FLEX

root@raspberrypi:~#

If i include POCSAG they decode fine.

I will try to reinstall.


From: Craig Shelley notifications@github.com
Sent: Saturday, 27 June 2015 9:02 p.m.
To: EliasOenal/multimon-ng
Cc: chris021
Subject: Re: [multimon-ng] FLEX Support? (#1)

Hi Chris,

Both files appear to decode ok using the following commands:
$ multimon-ng -a FLEX -t raw paging01.raw
$ multimon-ng -a FLEX -t raw paging02.raw

The output looks like this:
FLEX: 2015-06-27 07:49:08 1600/2/A 00.096 [001234567] ALN THIS IS A TEST
PERIODIC PAGE SEQUENTIAL NUMBER 8251

The other FLEX messages appear to be emergency services pagers, which
I'm a little reluctant to post the decodes of.

paging01.raw contains 6 intelligible bursts of pager activity
1: at 0.2 seconds POCSAG1200
2: at 16.2 seconds FLEX1600/2 (no pages)
3: at 24.2 seconds POCSAG1200
4: at 46.3 seconds FLEX1600/2 (1 page) followed by POCSAG1200
5: at 86.2 seconds FLEX1600/2 (no pages)
6: at 100.6 seconds FLEX1600 (2 pages)

paging02.raw contains 4 intelligible bursts
1: at 5.6 seconds FLEX1600/2 (no pages)
2: at 20.6 seconds POCSAG512
3: at 40.6 seconds POCSAG1200 followed by FLEX1600/2 (2 pages) followed
by FLEX1600/2 (0 pages)
4: at 68.6 seconds POCSAG1200

Regards,
Craig

On Fri, 2015-06-26 at 22:20 -0700, chris021 wrote:

Here are 2 samples. Both contain a mix of POCSAG and FLEX

https://onedrive.live.com/redir?resid=CE93060699F49335%21147


From: Craig Shelley notifications@github.com
Sent: Saturday, 27 June 2015 10:16 a.m.
To: EliasOenal/multimon-ng
Cc: chris021
Subject: Re: [multimon-ng] FLEX Support? (#1)

Yes, sure please do. I'd like to get it working on all of the flex
formats.
On 26 Jun 2015 21:15, "chris021" notifications@github.com wrote:

Hi Craig, I have tried your fork with flex1600 with out any luck.
Would it
be possible for me to send you an audio sample?

Reply to this email directly or view it on GitHub

#1 (comment)
.

Reply to this email directly or view it on
GitHubhttps://github.com//issues/1#issuecomment-115907098.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-115988952.

@chris021
Copy link

@chris021 chris021 commented Jun 27, 2015

i removed the src directory and ran the following commands to remake:

cd ~/src/
git clone https://github.com/craigshelley/multimon-ng.git
cd multimon-ng/
mkdir build
cd build
qmake ../multimon-ng.pro
make
make install

After this the result is the same POCSAG decodes fine, but no FLEX. Any idea what i am missing?

@craigshelley
Copy link
Contributor

@craigshelley craigshelley commented Jun 27, 2015

I am going to try building and running this on a raspberry pi. I suspect there is an endianness or 32/64 bit related bug somewhere. I'll keep you posted with what I find.

@craigshelley
Copy link
Contributor

@craigshelley craigshelley commented Jun 27, 2015

The wrong data type had been used for some the 64 bit integers, hence it not working on 32bit architectures.
Fix committed craigshelley@65e4a21

@chris021
Copy link

@chris021 chris021 commented Jun 27, 2015

Tested and working!!! Thanks heaps for this :) :)

I have noticed that all messages are decoded starting with 'ALN' which isn't in the transmission. What does this stand for?

@meshage
Copy link

@meshage meshage commented Jul 15, 2015

Many thanks to Elias and Craig for your work on multimon.

I've identified one small issue with the FLEX decoder:

It lets new lines in the page text through as is which means it's impossible to tell where pages containing new lines end.

I've changed

if (ch != 0x03)
verbprintf(0, "%c", ch);

with

if (ch != 0x03) { // Fill
if (ch == 0x0a) verbprintf(0, "%s", "<LF>"); // replace line feed with '<LF>'
else verbprintf(0, "%c", ch);
}

in three places in parse_alphanumeric which helps but I'm sure it's inelegant and less than an optimal solution.

Sorry I'm not a flash C coder and git non-compliant.

chris021: ALN stands for Alphanumeric; you'll also see TON for tone sometimes.

Thanks again.

@meshage
Copy link

@meshage meshage commented Jul 16, 2015

Embedded NULs cause trouble for downstream apps too so it may be worth considering using the translation code from the POCSAG decoder.

@EliasOenal
Copy link
Owner

@EliasOenal EliasOenal commented Nov 9, 2015

I've merged the pull request and will now close the issue. Though feel free to open new issues regarding problems using the FLEX decoder.

@EliasOenal EliasOenal closed this Nov 9, 2015
@craigshelley
Copy link
Contributor

@craigshelley craigshelley commented Nov 9, 2015

Sorry, it's been some time since I've been working on this, but I
remember there being a bug fix for 32 bit architectures. if I remember, I
applied it shortly after I sent my initial pull request. You might want to

check out my branch to confirm that you have this fix.

Craig
On 9 Nov 2015 13:09, "Elias Önal" notifications@github.com wrote:

I've merged the pull request and will now close the issue. Though feel
free to open new issues regarding problems using the FLEX decoder.


Reply to this email directly or view it on GitHub
#1 (comment)
.

@EliasOenal
Copy link
Owner

@EliasOenal EliasOenal commented Nov 9, 2015

I think it was actually part of your pull request:

https://github.com/EliasOenal/multimon-ng/pull/33/commits

EliasOenal pushed a commit that referenced this issue Sep 28, 2019
EliasOenal pushed a commit that referenced this issue Feb 16, 2020
Merge base code into Zanoroy's fork
EliasOenal pushed a commit that referenced this issue Nov 2, 2020
139 mod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.