New Xposed for Lollipop 5.0 Update Fixes Major Bugs

Senior Recognized Developer rovo89 has patched Xposed for Lollipop 5.0 to … more

Download Sony’s new AOSP-like concept for Xperia Z3

Over in our forums, Recognized Contributor Jozinek has posted a very … more

OnePlus 2 vs Moto X Style: Which is The Better Flagship?

Two big industry names have announced their newest flagship phones within the … more

Making Your Own Xposed Modules Is Easier Than You Think

Close to the heart of XDA is the Xposed Framework by Rovo89. Most of … more

[APP][17FEB10]RDS FM Radio R&D: Get radio text, Alt Freqency, free TMC etc

357 posts
Thanks Meter: 0
By flywhc, Retired Recognized Developer on 26th March 2009, 05:05 PM
Post Reply Subscribe to Thread Email Thread
Microsoft hasn't defined a tuner API for Windows Mobile platform (yet) and manufactures such as HTC do not publish their API for FM radio.
GFMAPI is an FM Radio interface that designed to be used on different models of Windows Mobile devices.
It makes all FM RDS based applications such as Radio players, Radio Alarm, TMC navigation works on different devices.

What's new?
Download EtenTest and GFMAPI 1.0.
Currently it works with M900 and M800, tested with PowerRadio and hyperGPS.
This is for Eten/Acer devices only.

End-User and application developers (Downloads)

User should try to use the GFMAPI in the application package because it may need to signed with privileged certificate and version of interface may be different.
App Developers can find FMAPI.h and a test application APITest in the GFMAPI for HTC devices 1.6. Source code is included to help your development.
The interface is defined in C language with sample code.

Thank for NetRipper made a .Net CF library for GFMAPI.

Note: the latest FMAPI.h is in GFMAK and the GFMAPI will be updated. They only has minor differences.

Supported Devices
* BRF6350 Chipset:
HTC Diamond, HTC Raphael (not CDMA), HTC Blackstone, HTC Polaris, HTC Topaz, SE Xperia X1
NOTE: if your X1 has new media panel that integrated with FM Radio function, you may have to disable this panel (I don't know how).
Download GFMAPI for HTC devices 1.6

* BCM432x Chipset:
HTC Rhodium, HTC Leo, HTC Mega
Supports radio functions if renaming FMSDKWrapper.dll to FMS_API.dll with the above driver. RDS data cannot be received.
We are working on this device. Related thread: FM Transmitter on HD2

* SI470X Chipset:
HTC Artemis: NOT supported.
Samsung Omnia: Samsung i9x0 Omnia
Samsung Omnia II: GFMAPI.dll for Omnia II and its Cab format This is an excellent work done by phjz.
Eten/Glofiish/Acer M800/M900/V900/X900/X650/S200: see "what's new". Please help me test it.

Device adaption developers

Generic FMAPI Adaption Kit will help you implement the driver for your device. Use APITest in the GFMAPI to test your driver.
Please read readme.txt in the package. Feel free to ask me if you need help.

If you have a device that is not supported by GFMAPI
I currently only have a HTC Raphael so I need your help to get your device supported.

First of all, you should Search in this Thread to check anybody posted it before.
Extract FM radio related files and upload to the forum.
Note: You cannot simply copy files from/to device. You need dump the ROM then extract files from the ROM. Search this forum to find how.

If you have good VC++ and IDA pro with ARM skills, please join us to discover FM Tuner API on those devices then make RDS application working on your device.

* HTC Rhodium/TP2, HTC Leo/HD2, HTC Mega/Touch2:
Rhodium Test
Current status: 6Fg8 identified that raw RDS data is in the Broadcomm BTTray process, not in the FmRadioSDK.DLL. Still not trace it down to function/module level.

* Artemis:
Artemis Test
Far far away from any progress and not many users.

BBCBBA uploaded FM radio related file for Gigabyte GSmart S1200. This device supports RDS by using deviceIoControl directly communicating with the driver. I can see it is possible to make a GFMAPI driver just need a lot of effort.

Applications based on GFMAPI
* FM TMC driver for navigation: Beember's HyperGPS.
* A powerful RDS FM Radio application: 6Fg8's Power Radio

This project focuses on RDS API now. TMC related topic has been moved to the TMC thread because it is too attractive and posts will flood the thread.

Origin research project
Many people ask questions related to FM radio in the forum have been solved by this project:

* Does FM Radio supports RDS text and traffic information?
* Does FM Radio supports more than 20 saved channels and give a friendly alias, such as "BB Radio 4" rather than 920.2MHz ?
* Does FM Radio supports automatically or manually change frequency when signal getting pool during traveling?
* Does FM Radio support RDS-TMC traffic information for navigation system?

The answer is yes. The Bluetooth/FM radio chip BRF6350 on your phone is very powerful but HTC FM radio only provides basic functionality.
Unfortunately HTC doesn't publish FM Service API to us.
So I disassembled FM player by using IDA pro and know usages of FMS api.
After a week sleepless night, I wrote my FM radio tool, xFMRadio, utilizes most functions provided by FMS API, provides RDS and other data for further research.

With help from this thread, we have exposed most secret of FM and RDS system on HTC devices and we can make useful applications now.

This application is written for research so that UI is not nice. It only works on BRF6350 based HTC devices.

Download xFM Radio v0.4

If doesn't have sound on your device, try xFM Radio v0.4B, which removed audio volume initialization.

Brief user guide for xFMRadio

Default settings: Audio Source: 1 (earphone), RDS =1, Verbose =1, AF = 1. ( but I don't know if automatic AF is working. have to verify during long distance traveling.)

Verbose: 0 -no log; 1 - status only; 2 - TMC raw data; 3 - all types of log

Row 1: Input argument. Set Frequency in KHz, AF list: alternative frequencies for the current station.
Row 2: Frequency, station name, Band: World/Japan - use this to listen police station etc
Row 3: Signal Strength, Stereo/Mono, UTC Date/Time (update once per min if supported)
Row 4: -100KHz, Previous Channel, Next Channel, +100Hz, Mute, Mono/Stereo
Row 5: Headset/Speaker, De-emphasis, Stereo blend
Row 6: Radio Text
Row 7: status such as Music/Speech, TP, TA, PTY, TMC etc

Check if the channel support TMC: ROW 7 should display [TMC]. You can see TMC data by setting the top left input box to 2, and click on Menu->Verbose.
The current xFMRadio v0.4 does not display RDS raw data anymore.
You can use Save log menu to save log data.
FMS API version is displayed in the About dialog. Mine is 1.2.

xFMRadio 1.4 Debug

Please Buy me a cup of tea here.

Thanks donators for supporting this project. Please leave message in paypal with your forum ID if you prefer to have your ID in the list.
auxaux _________________ 3 Apr
IBX1 ___________________ 6 Apr
dunkelfalke _____________ 13 Apr
torpie13 _______________ 18 Apr
stepan1117 ____________ 18 Apr
pelroig _________________ 22 Apr
EMERSON VIER (name) ____ 2 May
David Przypadlo (name)___ 2 May
jackleung ______________ 6 May
Tobbi __________________ 6 May
quserdy ________________ 6 May
Ido Werkhoven (name) ____ 7 May
mhemart ________________ 8 May
Herbert Kegel (name) _____10 May
Wolfgang Nitzsche (name)_ 10 May
Volker Kirchner (name)____ 14 May
PWJ Cremers (name) _____ 15 May
Michael Varga (name) ____ 18 May
GJAman________________ 04 June
Michael Schaden (name) __ 06 June
Robert Bredereck (name) _ 07 June
Carlos Talegon Alonso (name) 09 June
Tintin _________________ 19 June
Thom Rietbergen (name) ___28 June
Stefan Popov (name) _____ 28 June
Josť Malpica (name) ______ 08 July
Schmeichler _____________ 02 Aug
glueckimunglueck _________ 03 Aug
Mathias Adler (name) ______ 07 Aug
Jens Weber (name) _______ 22 Aug
hansi ___________________ 22 Aug
bmhvanbenthum __________ 03 Sep
Daniel Sieberth ___________ 14 Sep
erups ___________________ 8 Nov
Ruut Brandsma (name) ____ 14 Nov
Markus Muszeika (name) ___ 28 Nov
MacNett1 _______________ 30 Nov
boiacchi ________________ 21 Dec
Eldarik _________________ 26 Feb

Part of donations I have given to other contributors of RDS-TMC navigation system as I pledged.
Attached Thumbnails
Click image for larger version

Name:	xFM03.jpg
Views:	85590
Size:	22.1 KB
ID:	177510  
Attached Files
File Type: zip - [Click for QR Code] (8.7 KB, 5787 views)
File Type: zip - [Click for QR Code] (20.5 KB, 13251 views)
File Type: zip - [Click for QR Code] (13.2 KB, 3566 views)
Last edited by flywhc; 1st March 2010 at 11:07 AM.
26th March 2009, 05:06 PM |#2  
OP Retired Recognized Developer
Flag London, UK
Thanks Meter: 0
* Cannot start
Make sure your device is in the supported device list.
Try soft reset?
Sony X1 has to turn off FM Radio panel.

* No sound
Plug your earphone in before running this app
Turn volume up
Try Soft reset?

* No RDS data
Please place your place in an area that have strong FM Radio signal.
Wait for longer time
Check Raw RDS output
Soft Reset

1. What is RDS?
Radio Data System, FM radio station sends digital data during broadcasting.
Search in wikipedia to know more.

2. What digital data does RDS transfer?
* PS - Name of channel. 8 ANSI characters. Fixed length
* AF - Alternative frequencies: you can choose one or radio itself automatically choose a better frequency when signal getting poor
* PT - Program type
* RT- Radio text. can be replaced or appended.
* TA - Traffic Announcement: when radio program starting announce traffic info, it reminds you.
* TMC - Traffic Message Channel: provide digital traffic information like TOMTOM traffic.
* CT - clock time
...And more you can find from wikipedia

3. where can I find those radio stations support RDS?
RDS is a EU standard so it is popular in EU.
US has a modified version of RDS, RBDS, which has very light difference.

4. What is xFMRadio?
It is a analytical tool help me validate FMS API, and RDS data.
It supports RSSI, PS, AF, RT, PI, Raw RDS data etc.

I don't know what name shall I use so I use a letter x. eXperience, xda-developers.. whatever.

5. What is...
RSSI: Received signal strength indication. Maximum value still unknown. I guess it is 32.
PI: Programme Identification the unique code that identifies the station.

6. what is format of raw RDS?
RDS is a complicated format to broadcast narrow band with repeat data.
Its transfer speed is just 1.1Kbps, with large proportion of flow control bits.
e.g. when it sends a station's name, it sends every two ANSI characters in a 104 bits coding structure, and usually do not consequently send all strings together.
The RAW RDS format is different from RDS standard. each data package is in a form of 16 bits data + 8 bits type, instead of 16 bits data + 10 bits offset.
You can find kolomparrudi's analysis in this thread.

7. Can I use it without earphone?
Theoretically yes.
FM Radio wave length is much longer than GSM/BT/WIFI etc so it needs a long antenna e.g. USB cable.

Also FM module is switched off when earphone is unplugged.
Maybe HTC ExtUSB to 3.5mm audio adapter (YC A300) works.
Many HTC devices driver disable FM audio output as soon as unplug headset.

Power cable or USB cable that connects to PC introduce interference so that you may need low pass filter such as capacitors.

12 Feb 2010
Eten GFMAPI Beta 8 and new APITest.
First version that working on M800/M900.

19 Jan 2010
EtenTest and GFMAPI Beta 4.
Attempt to fix band and audio path. (Beta 3 has regression)

18 Jan 2010
EtenTest Beta 2
Try to solve seek/set frequency issues

13 January 2010
Uploaded Generic FMAPI Adaption Kit for FM driver development.

7 January 2010
Beta version of GFMAPI for Acer/Eten devices is available!
If you find any problem, please use EtenTest in the zip file to get logs.
It has to be signed with privileged developers certificate in order to use with HyperGPS.

04 January 2010
Happy new year.
Uploaded test app for Eten/Glofiish/Acer M800/M900

30 July 2009
Published test application for HTC Rhodium and HTC Artemis.

16 July 2009
GFMAPI for HTC devices 1.6
- Improve power consumption when no event subscription.
- solve mute problem on Topaz
- partially support Rhodium. Cannot receive RDS data

29 June 2009
GFMAPI for HTC devices 1.5B
- Fix defect that RDS error flag was set to wrong format
- Fix set frequency defect

23 June 2009
GFMAPI for HTC devices 1.4
- Fix misspelling of FMGetNotification
- Fix return error of FMGetNotification
- Support FMBAND_WIDEJPN (76.0 - 108.0 World wide)

Thank NetRipper for pointing out defects.

11 June 2009
GFMAPI 1.3 has been released.
Thank for 6Fg8's careful testing.
Bugs of Mute, Volume and Mono are fixed.

17 May 2009
GFMAPI 1.2B Released
* Using notifications (windows message or event) instead of callback functions
* Add FMPROP_POWER (read only)
* Fix FMClose timeout issue.

5 May 09
beemerTPPC made an alpha version of TMC driver:

It is alpha so has a lot issues and not user friendly.
Please read all other posts after beember's post before ask.

Generic FM API 1.01 (do not directly use it with HyperGPS):

Update on 22 April 09:

xFMRadio 0.4
Implemented AF parser
Improved AF selection usability
Support TMC status - so you don't have to change verbose to check if a station supports TMC
Integrate with system volume control
Setting of RSSI search level - default 10.
Fix bug: Application didn't show at foreground if run app again.

Update on 18 April 09:

xFMRadio 0.3.
Use RDS parser. It gets much more information and must faster from RDS than build in API now.
Add Bigger box for RT.
Add Status box for TP, TA, PTY etc
Display station Date/Time and timezone
Display TMC raw data if verbose >=2
Display ProgramItem, paging id, language id etc in log if the station supports them.

Radio 0.3 API
Note: methods in IFMEvents are running in another thread from FM API functions.

Update on 5 April 09:
I've uploaded FMRadioAPI wrapper.
It is a C++ class. Please read comments in the header file, which should provide sufficient information to use it.
You may implement FMRadioAPI::IFMEvents::eek:nFMRadioRDSData(const FMRadioAPI::TFMRDSData & aRDSData) to get raw RDS data.
Note that event functions are running in different thread so you may need synch objects.

xFMRadio 1.2 This version uses FMS_API events to get PS, RT etc.

References (credit: Midnight_Rambler, johnpatcher, kolomparrudi, iseeka): ( £68 if buy that book!) Open TMC specification A presentation that how to DIY a RDS-TMC system Open TMC standard The TMC packet coding in RDS stream described in ISO 14819-1 standard TI BRF6350 Bluetooth/FM radio chipset The broadcaster's guide to RDS A list of RBDS/RDS features

Interesting thread about TOMTOM:
Last edited by flywhc; 13th February 2010 at 02:11 AM.
26th March 2009, 05:19 PM |#3  
Senior Member
Flag Sofia
Thanks Meter: 8
Go go go
So, does this mean, that iGO will find TMC info and use it, because it currently doesn't find any TMC hardware.
26th March 2009, 05:23 PM |#4  
Senior Member
Flag Sydney
Thanks Meter: 10
the most desired thing would be using TMC on iGO or TomTom; definitely possible but no one knows exactly how; there is already a thread:

26th March 2009, 05:25 PM |#5  
Senior Member
Flag Sydney
Thanks Meter: 10
Originally Posted by Spiderm@n_

Go go go
So, does this mean, that iGO will find TMC info and use it, because it currently doesn't find any TMC hardware.

well, its not about finding hardware, there are already iGO versions finding the correct fm transmitter on my touch hd, if not you can easily edit sys.txt.

The issue is simply that it cant extract the required information.

@flywhc: would be great to see you coming up with some results! Thx!

26th March 2009, 07:58 PM |#6  
Senior Member
Thanks Meter: 8
Donate to Me
To be honest I'm not keen in a gui, you should concentrate on the code itself. I would really love to have TMC in iGO8 . I guess this will be much more easy than implementing it for TomTom, as it has already TMC support (and even has detected the hardware).

Have you took a look at this document already?

Which driver (FMS & FMS_API) have you used? I guess the one in the Blackstone 1.21 rom is the latest, it differs from the 1.19 one, so I will attach it here, maybe there is something new / different in it?

As far as I know the Nav'n Go support has written that it is impossible to retrieve TMC information with these devices, so they are proven to be wrong, really a shame!

Really great work!
Attached Files
File Type: zip - [Click for QR Code] (39.7 KB, 1256 views)
Last edited by johnpatcher; 26th March 2009 at 08:08 PM.
26th March 2009, 08:26 PM |#7  
kaefert's Avatar
Senior Member
Flag Vienna
Thanks Meter: 185
hey flywhc!

that is really a great app you produced here!
can you give us some details on what commands take what parameters?

and also it would be very cool if you could give us some details on your implementations; what libraries did you use to talk with the fm hardware? would you mind sharing your work (source code)?

i've got about another month of hard work on other stuff before me, but afterwards i would be ready to help.
27th March 2009, 02:55 AM |#8  
OP Retired Recognized Developer
Flag London, UK
Thanks Meter: 0
Thanks for supporting.

I am using a radio player from Rhodium Manila project, should be the latest.

I will publish API in the future once I have confidence with it, and remove code may have copyright issues.
27th March 2009, 05:00 AM |#9  
Senior Member
Flag Seattle
Thanks Meter: 15
Nice job! I'll watch this thread for your progress
27th March 2009, 07:50 AM |#10  
kaefert's Avatar
Senior Member
Flag Vienna
Thanks Meter: 185
Originally Posted by flywhc

Thanks for supporting.

I am using a radio player from Rhodium Manila project, should be the latest.

I will publish API in the future once I have confidence with it, and remove code may have copyright issues.

Okey, that sounds great!
BTW: you asked if your app works on blackstone: yes it does

One other thing: There is a free TMC service form some radio stations in austria, so if you include a feature to save a log of the recieved RDS messages I can give you TMC data that won't be encrypted
27th March 2009, 11:03 AM |#11  
SaBo's Avatar
Senior Member
Thanks Meter: 5
Originally Posted by flywhc

* Provide free traffic to TOMTOM
That is a dream but technically feasible.
RDS traffic info is encoded even encrypted. I have lack of document and knowledge.
And then we need to somehow crack TOMTOM to get traffic info from our FM radio not network.

You should concentrate on implementing GNS TMC protocol as it is supported by almost all navigation softwares (iGo, Navigon, Destinator, Falk, Medion, Route66 etc.)
There is a gpstmc.dll for controlling it (see attachment, it's from Navigon MN|7.3.1)

Originally Posted by 4irm

well, its not about finding hardware, there are already iGO versions finding the correct fm transmitter on my touch hd

iGo doesn't need to find a FM transmitter but a FM receiver.

Originally Posted by johnpatcher

I would really love to have TMC in iGO8 . I guess this will be much more easy than implementing it for TomTom, as it has already TMC support (and even has detected the hardware).

If GNS protocol is implemented and a COM port can be assigned to the TMC stream then almost all navigation softwares would be able to use TMC from internal RDS receiver.

Originally Posted by kaefert

There is a free TMC service form some radio stations in austria, so if you include a feature to save a log of the recieved RDS messages I can give you TMC data that won't be encrypted

There is free TMC in most western european countries.
There is even a tool TMCview which offers the possibility of making TMC stream readable on PDA (including all necessary decoding stuff).

Attached Files
File Type: zip - [Click for QR Code] (46.6 KB, 538 views)

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes