Skip to content

Conversation

@Sasszem
Copy link

@Sasszem Sasszem commented Sep 16, 2024

Note: This code is based on changes by our club members HA7CSK and HA5DNC done in 2020. I recently found them in the files, updated to the latest version and reworked the API a bit.

This PR adds 2 new queries to the "get parameter" command p:

  • RDS_STATION RDS_PS_NAME reports program service name (usually station text)
  • RDS_RADIOTEXT reports the radio text (usually name of the played song)

Example:

F 105300000
U RDS 1
p RDS_PI
p RDS_PS_NAME
p RDS_RADIOTEXT

@argilo argilo added the feature label Oct 17, 2024
@argilo
Copy link
Member

argilo commented Oct 19, 2024

Thanks. This looks like it could be useful. Out of curiosity, what have you used it for? An RDS scanner?

One issue I would anticipate: Gqrx's RDS decoder (a copy of gr-rds) reports partially-received program service name & radiotext. Thus there's a good chance that querying these values through the API will return incomplete data. Here in North America many broadcasters dynamically change the program service name to display scrolling text, and Gqrx will happily return a mixture of old and new data during changes.

Do you think it would be useful to modify gr-rds so that it only reports complete program service name & radiotext?

@argilo
Copy link
Member

argilo commented Oct 19, 2024

RDS_STATION

In the standard, this field is called "Program Service name" or "PS name". Maybe something like RDS_PS_NAME would be clearer.

@vladisslav2011
Copy link
Contributor

I've tested this PR and it works very well combined with my improved RDS decoder.
The only thing, that I have changed is the default value when no RDS is received - changed it to an empty string.

@Sasszem
Copy link
Author

Sasszem commented Oct 26, 2024

Thanks. This looks like it could be useful. Out of curiosity, what have you used it for? An RDS scanner?

We used to have a discord bot that can stream FM stations using GQRX, and it was used to report played song.

One issue I would anticipate: Gqrx's RDS decoder (a copy of gr-rds) reports partially-received program service name & radiotext. Thus there's a good chance that querying these values through the API will return incomplete data. Here in North America many broadcasters dynamically change the program service name to display scrolling text, and Gqrx will happily return a mixture of old and new data during changes.

I found that also, some stations do it as well. I'm not sure how could it be fixed tough. This was the reason I wrote "usually name of the played song".

Do you think it would be useful to modify gr-rds so that it only reports complete program service name & radiotext?

Again, I'm not sure how could it be done to work well, but worth a try, bud possibly in another PR.

@Sasszem
Copy link
Author

Sasszem commented Oct 26, 2024

In the standard, this field is called "Program Service name" or "PS name". Maybe something like RDS_PS_NAME would be clearer.

Renamed to that.

@argilo
Copy link
Member

argilo commented Nov 2, 2024

I'm working on some improvements to gr-rds that should make this work better: bastibl/gr-rds#86

@argilo
Copy link
Member

argilo commented Nov 8, 2024

I've pulled the gr-rds improvements into Gqrx here: #1394

@argilo
Copy link
Member

argilo commented Nov 8, 2024

I did some cleanup (d9727bd) and manually merged this.

As vladisslav2011 had done, I changed the default value for PS name and RadioText to the empty string. I also removed the string trimming, since I expect the improvements in #1394 make it unnecessary. Downstream applications can apply their own string transformations if they so desire.

Please let me know the names of the authors of this code so I can add them to the readme.

@argilo argilo closed this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants