3.237.44.242
Samsung I8000 Omnia II TMC Driver
85698 visit from 2010.01.07.

I8000 TMC
The Samsung SDK has a public interface to the radio driver ( Samsung SDK ), but unfortunately the RDS part implemented as a simple registry read for four possible entries, like Station Name,etc. Therefore to solve the problem first were necessary decompile the fmradio.dll to know how deeply the RDS functions implemented there...

2010-01-17: Sucessfully implemented the GFMAPI, so the PowerRadio and moreover the iGO with TMC support is working with HyperGPS.

To setup it :
Download and install my gfmapi.CAB ver.2.1 [2010-09-30] Finally the audiopath seems to be working!! The trick was that depending the jack state, the selected audio device must be:

Older versions:

gfmapi.CAB ver.2.0 [2010-09-18] Major version update

There are two different way to use it:

New Testing Method:

2010-09-29: Reincarnation of the old rdsradio program which were developed at the very beginning......
To help determine the quality of the TMC reception and enable to use the IGo,etc. TMC feature without the HyperGPS installed, here is the rdsradio.CAB [2010-09-30]. Because the present solution use static COM6 as TMC port and for the serial driver installation must reboot the device, here is a program without the serial driver: rdsradio_noserial.CAB [2010-09-30] - in this version no COM6, so the TMC tab disabled; this program cannot act as TMC driver, otherwise all feature working.

In the case anybody has trouble with the GFMAPI, I strongly suggest to use rdsradio to check - if you have no 10:2 /s below the RDS text, the receive quality is bad. The quality of the RDS reception NOT in directly proportional to the signal level, at very strong signal the RDS error rate can be high also!!!
To remove the installed COM6 port, you need to delete all entries within HKLM/Drivers/Builtin/Serial6, soft-reset the device, delete the /Windows/phj_virtcomm.dll and remove the Serial6 entry also.
The final version the rdsradio.exe will be used as checking tool and parameter setup program, and another little C++ program will transfer the tmc data ( this is a .NET C# one ) - and somehow the serial driver activation/deactivation must happen run-time.

Top: the received signal level bar, below the radio chip informations
between 87.5 and 108 is the frequency trackbar
ST=stereo, TA=Traffic announcement, AF=frq lock EON=Enhance Other Network RDS=Radio Data System indicators, Yellow when active.
Past the RDS indicator may be a red number, this indicate the amount of corrected RDS errors by the chip, in the case it is 6 means uncorrectable number of errors.
Run* : * means countinous RDS reception from GFMAPI, W means no RDS data, ! means error
93.9 Mhz is the tuned frequency, 41 dBuV is the received signal strenght, the first zero is the received number of RDS packets in the last second, past the : is the same, but for TMC data. For normal operation these numbers must be 10-11 and 3-4.
The <   << and >   >> buttons is for tuning the radio ( seek down,step down, step up, seek up)
The orange MR2 is the radio station name (here oscillating PETOFI and MR2 )
The gold line with numbers are the alternate frequencies for the tuned radio station
The two green line is the radiotext, contains informations the playing items. There is no any data validation, therefore the erroneus characters
The vertical trackbar is the sound level, the blue button is for the switch from/to the Speaker and the Ear. Because of the unknown reason, it is working just and only when the jack inserted...
The white lines is the decoded TMC informations.
At the bottom the four hex word is the last sampled RDS info, below the Group type in number and text.
The Stop button closes everything, including the radio, the Quit button leave the radio open..

COM6 is the installed virtual comm port
The Navigation button open a dialog box, here you can select the navigation program to start. The selected program placed the line below for reference and stored in the registry (prog).
The Start Navigation button starting the above selected program and from this point receive the Royaltek command and send the RDS data and the status over the virtual COM port. When the program started, the button text will be Stop Navigation-pressing kill the navi program, otherwise wait for the end of the navi prog.
For testing the sent/received Royaltek messages appear in this tab.

Original Method:

Download and install from: PowerRadio the radio program ( optional , not required for TMC reception)
Download and install HyperGPS , From Program Files/ or My Storage/Program Files or Storage Card/Program Files/ ( depends on the installation ) /PowerRadio directory delete the gfmapi.dll.

To simplify the above process, created two CAB files from the original ones ( thanks to BeemerTPPC and 6Fg8 for the original CAB's ).

Old versions :
ver 1.13[2010-02-21] to avoid the keypress sound, send just the VK_NONAME KEYUP event.
ver 1.12[2010-02-21] To avoid the PowerRadio hangs, periodically simulate a keyperess event from GFMAPI (HKLM/Software/gfmapi/log/numk , defalt 625 = 50 sec. 0=disable feature)
ver 1.11[2010-02-13] Revert all audiopath related calls except the "official" IOCTL
ver 1.10[2010-02-06] Not sending the FMFC_SEEK_IN_PROGRESS msg, because PowerRadio threat it as error 83..
ver 1.9[2010-02-03] 8A Group (TMC) data immediately reported to upper layer
ver 1.8[2010-01-29] Final RDS validity check removed (maybe not relevant), even detailed log (4=log failed RDS cnt&reason,2=log good RDS,1=log cmd)
ver.1.7[2010-01-25] More RDS data validity check, and more log
ver.1.6 [2010-01-24] The auto seek function working, pi check
ver.1.5 HKLM/Software/gfmapi/log 0:no (default), 1:log commands, 2: log RDS, rssi and sound level corrections, ear/speaker switch, ranges, all API function implemented
ver.1.4 [2010-01-21] The default value of ms changed to 80 ms, minor rssi mods.
ver.1.3 [2010-01-20] The auto seek changed to next channel, slow but safe; HKLM\Software\gfmapi\ms is the query interval in ms, rssi is te minimum seek rssi, no debug code
ver.1.2 [2010-01-20] The TMC data query interval 80 ms instead of 800, so quicker you get the data.

Both HyperGPS and my cab install the gfmapi.dll always to the /Windows directory, so using this order my dll will overwrite the original HyperGPS one.
Start the HGPSClient.exe, select COM4: (or any other free COM port) as COM Port, select the protocol ( I'm used Royaltek ), etc. and Press the TMC button.
From now the RDS information automatically decoded and the TMC part sent in Royaltek format out in COM4, from the input the radio can commanded to seek another channel, etc...
In the iGO go to the TMC menu, select the com port and the Royaltek protocol ( or leave both automatic, the program will find the TMC) - and we are ready.


To automatically start/stop the gfmapi, the only things you must do: copy HGPs_Switch.exe to the navigation program directory, make a linkfile named NavApp.lnk which point to your Navigation program (for ex. iGO8.exe). The HGPSClient need just for the initial setup, after that you can start just the HGPs_Switch ( not the iGO directly ) and everything will work fine; before the iGO the hypergps/gfmapi automatically load, stopping iGO stops hypergps/gfmapi as well.....

Errors:
- no known errors, except the audiopath: in the case the jack inserted, everything works fine, can switch to/from speaker/ear. But if not, all the four known method ( in the fmradio.dll, waveOutMessage, ossvcs.dll, WAV1: device) fail!

There is Hungarian forum to discuss : PDA Fan Club
And an English one : MoDaCo

Public code

In the beginning I decided to not allow to loose information again, so I opened a public SVN. From there everybody can download the latest source code of the GFMAPI - at least the I8000 version. It is good for experiment, implementing new hardware, and also I'm willing to update it - if somebody send me the correction, because I cannot give write access for everybody to keep the code healthy.
The URL : svn://linuxgw.phj.hu/public/gfmapi/trunk , it is a Visual Studio C++ project.
Please keep in mind that the code is very far from the optimal, because of the hurry work, my knowledge, etc. Moreover such type of devices are reachable over I2C bus, but I just begin to search a method how to implement it.....

Decoded IOCTL# in the FMR_IOControl function:
0x220010: Manual seek (up/down)
0x22000c: Tune to frequency
0x220008: Radio off
0x220004: Radion on ( region )
0x220014: Auto seek (up/down)
0x220024: Get volume
0x220020: Set Volume (vol)
0x22001c: Get frequency
0x220018: Self tune
0x220028: Force speaker
0x2201bc: Radio record
0x220034: Radio tune cancel seek
0x220030: Radio Enable AF
0x22002c: Radio enable Stereo
0x2201c0: Get Seek Threshold
0x2201c4: Set Seek Threshold (thr)
0x2201c8: Get Seek SNR
0x2201cc: Set Seek SNR (snr)
0x2201d0: Get Seek Count
0x2201e0: Get ST
0x2201dc: Get RSSI
0x2201d8: Get AFC
0x2201d4: Set Seek CNT (cnt)
0x2201e4: Set ST (st)
0x2201e8: Get SmuteR
0x2201ec: Set SmuteR (r)
0x2201f0: Get SmuteA
0x2201f4: Set SmuteA (a)
0x2201f8: Get BLNDAdj
0x2201fc: Set BLNDAdj (adj)
0x220200: Seems uint Register Read ( *regaddr )
0x220204: Seems Register Write ()
0x321000: ???? az argument is an address, zeroed 0x30 bytes, first byte=0x19, third argument=0x30
0x321004: Power Get
0x310008: Power Set
0x32100c: Power Query

The driver has five entry points:
- FMR_Open
- FMR_Init
- FMR_IOControl
- FMR_DeInit
- FMR_Close

FMR_Open() : returns the address of LocalAlloced 4 byte

FMR_Init() : first allocate a memory area using the MITsGetVirtualAlloc( 0x134 ) in mmi.dll. This is the MmMapIoSpace for the chip data. The started two threads, one for the chip interrupt handling and one for the AFC.

The interrupt thread enable the chip interrupt, waiting for an event named "FMRadio_Interrupt" ( the chip interrupt ), when raised, disable the chip interrupt and determine the TUNE and SEEK status. If these are not set, ..... , issue an InterruptDone, raise an unnamed event, .....

Questions, Suggestions: Pálóczi-Horváth János< phj@phj.hu>