yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] flywhc:
Would that indicates HTC FM radio actually always turn stereoblend on?

If that is the case, StereoBlend property is correct.

Press ctrl-F5 have a try. It should be closed very fast.

if you are going to use C#, why you still need C++ part?

I believe GFMAPI can be directly used by C# by using DLLImport although I haven't tried.

I would fix the problem if you couldn't use C#.

Thanks for your enthusiasm anyway.

The latest GFMAPI should work with Beember's beta 4 TMC driver after signing with a valid certificate.
[Windows Mobile Software Development] 6Fg8:
Yes, i think that's the case. One more reason to write a radio which allows full control over things. Glad you published your work :)

Most of the time it does, but sometimes it takes ages. I couldnt figure out whats the cause yet.

I'd like to get the most out of the RDS data (station names, text messages, AF lists, date/time etc.). Processing this in a highlevel language is slow as hell. On the other hand, interface design in C(++) is evil. What i have in mind is building a DLL which does RDS decoding and then hand the values over to the C# GUI. I did this kind of interfacing before so it shouldnt be that tricky.

I'm quite clueless regarding certificates, i better leave that to people who know what they're doing :)
[Windows Mobile Software Development] 6Fg8:
I had a busy weekend implementing and testing lots of stuff regarding GFMAPI and RDS decoding. It came out pretty well and i'll continue developing a (hopefully) full featured FM radio app.

Thanks again to flywhc for the GFMAPI, without your work this wouldnt be possible!
[Windows Mobile Software Development] flywhc:
nice one. tell me if you have any problem.
[Windows Mobile Software Development] rungvang:
Im using Samsung Omnia. I copied your app to my device, and those .dll files (FMS.dll...). Soft reset. Connect with the headphone but it didnt work. When I clicked on the app, the message said: Failed to init. FM Radio... Any suggestion?
[Windows Mobile Software Development] 6Fg8:
Thanks for the offer, didnt think i'd need help that quick, but i'm kinda stuck at some point.

When the app was quite small everything worked out fine. Now that it has grown a bit i run into an exception when using FMClose:

ExceptionCode: 0x80000002

ExceptionAddress: 0x03f6c044

Faulting module: coredll.dll

Offset: 0x00022044

I reduced the code to a simple:

hFM = FMOpen(0)

FMClose(hFM)

but even then i get the exception. So i guess its related to the memory footprint my app uses. Checked that and it shows 1019904 with heapsize 842224.

Checking memsize of HTC's FMPlayer reads 2281471 heapsize 1733960, more than double in size :confused:

Any clue whats happening here?
[Windows Mobile Software Development] johnpatcher:
Have you read what this application is for?
[Windows Mobile Software Development] flywhc:
Good job kolomparrudi!

You can even see TMC data in the RDS raw data. This proves HTC device supports TMC!

Next question is how checkword is calculated?

Luckly we can ignore above rubbish. :)

It seems chipset decode checkword and output it as a special offset word:

A: 00100000 20

B: 00100001 21

C: 00100010 22

D: 00100100 24

But I observed a few exceptions such as 2A (101010) for C, 2C (101100) for D.

I am not sure they are signal noise (or indicate that word has bad checksum?). It seems the chipset doesn't filter words with bad checksum.

C7 88 20 | PI

25 91 21 | GT 0010 B 0 "2A - RadioText"; TP 1 PTY 01100 Text A/B 1 TextAddress 0001

41 52 2A | "AR" check word 101010, should be 22 (100010)

45 20 24 | "E "

Radio text is end with '0D'.

Text A/B indicates if it is a new string. It is new when this flag is changed.

106.2MHz

C3 A6 20 | PI

05 4F 21 | GT 0000 B 0 "0A - Tuning"; TP1 PTY 01010 TA 0 MS 1 DI 111 => PS char 7,8

E1 BB 22 | AF 225 1AF follow 187 = 106200KHz

20 20 2C | " " check word 101100 should to be 24 (00100100)

if bit 4 is error flag, we can simply ignore those data.

I think it is time to publish FM api I discovered although I haven't completed it yet.

Only volume control and very a few arguments are unknown.

It should be sufficient to extract TMC data.

I will wrap my API with comments this weekend.

Kovacs Bela, technically they are all feasible now.

Anyone can suggest a navigation system that support RDS in the UK? and doesn't cost a penny...

God bless RDS-TMC data is not encrypted here...
[Windows Mobile Software Development] iseeka:
i would be great to have tmc!!

is it possible to use wider frequency range? (not limited to norma +japan)?

is the chip capable?
[Windows Mobile Software Development] flywhc:
snoopy20, I just downloaded it to my htc touch pro and it sounds loudly. I also tried speaker as well as earphone. What device are you using? Did you turn volume up by using volume key?

iseeka, I tried set band to 2, it should be for all countries but doesn't work on my touch pro.

It might be device dependent. I don't have any information about this chipset - I only know it is part of bluetooth chipset.

But I can make it supports both by using software - automatically switch between normal and japanese band.

You can try edit registry HKEY_LOCALMACHINE\Software\HTC\FM Radio\FMplayer\Band and use your HTC FM Radio.
[Windows Mobile Software Development] seivad17:
No audio

Same as snoopy20 - I get no audio as well on my touch pro (fuze). Using RRE 4.4 Rom
[Windows Mobile Software Development] Spiderm@n_:
Go take a hike, it's for testing, not to change your current FM app, yet. I don't think people care if you can't get sound out of the speaker, use the default app, people care about the RDS data the app returns and how it can be used in future.

Am I right?
[Windows Mobile Software Development] NLS:
Shame for whom? You?
[Windows Mobile Software Development] iseeka:
I mean can we go to freequencies like 450 or 150?
[Windows Mobile Software Development] flywhc:
Well, it is also my goal to make a nice working FM Radio player. So (polite :) ) bug reports are welcome.

For example, it is very easy to implement a Traffic Announcement feature now: when the radio station start report traffic information, it turns volume up or alert driver. When TMC is not availble, TA is also very useful.

Really don't know what's wrong - Can you get log from xFM Radio player and send to me?

I am using EnergyROM 2.0 build 260309 on Raphael. I guess it has a FM radio dumped from Rhodium.

However I disassembled the FM radio from this Raphael OEM package:

http://xdaforums.com/attachment.php?attachmentid=157013&d=1234551183

so I believe it works with both two version of FMS driver.

Make sure:

* Plug in your earphone unless you live very close to transmitter. It works as antenna. you may use other USB cable as antenna but earphone wire is the best.

* Turn Volume up, do not use silent mode.

* Press [->|] to find a radio station or enter a frequency that works with HTC FM radio player.

If still doesn't work, download FM radio package and copy files into same folder with xFMRadio.

It is very possible my app still has bug. HTC FM Radio must do something I don't know - volume control functions doesn't work with xFM radio but work with HTC FM radio.

iseeka, I am afraid those band are not supported, at least at chipset driver level.

If somebody can open the case and find out the bluetooth/FM chipset model, maybe we can find document for that bluetooth chipset and do something. :)
[Windows Mobile Software Development] sebi112:
can you please make your great program to listen to frequnzes like 85.255 or 86.375
[Windows Mobile Software Development] iseeka:
" The Polaris has a more current BRF6350 Bluetooth (http://focus.ti.com/general/docs/wt...ntId=14646&navigationId=12659&templateId=6123) chip which as you can see has the FM receiver"

there it says

"FM receives/scans/sends RDS information to host, while Bluetooth can be in any operational mode"

"Fully embedded FM receiver (including synthesizer and VOC tank)"

it´s a a BlueLink™ 6.0 Platform: BRF6350
[Windows Mobile Software Development] flywhc:
It supports 86.25 but not 86.255. This is restriction of chipset.

*Change band to 76-91 Japan

* Enter 86250 in the box on the top left

* click Set Freq
[Windows Mobile Software Development] iseeka:
more info

FM features

Bluetooth features

• Supports US/Europe and Japanese FM bands

• Fully embedded RDS/RBDS demodulation

• Reliable stereo indication

• Digital receiver architecture (selectivity, image rejection, demodulation)

ensuring performance robustness in extreme conditions

• Very low sensitivity level and superior interference rejection

• Frequency

– Range: 76-108 MHz

– Channel resolution: 50 KHz

• Supports mono/stereo modes

• Supports standard FM radio functionality

– Autonomous scan functionality (station seek) including soft mute

– Set frequency

– Increase/decrease frequency by one step

– Forward RDS data to the host

– Receive either mono or stereo

– Support mono/stereo blend

– Support mute

• Supports FM standalone operation

• FM interfaces

– Analog left/right audio outputs

– Serial left/right digital stereo audio on I2S

– RF_IN – Differential input to low-noise amplifier

– I2C control bus

– Asynchronous interrupt to the host

– Supports FM functionality with system slow clock
[Windows Mobile Software Development] K_Hismoom:
Sorry if this is a dumb question, but I am somehow unable to receive any RDS data.

I have set verbose level to 3, but regardless of the station I select (and there are many), I cannot seem to get any RDS information, even on stations that my other radios can receive RDS data from.

I have however noticed that the HTC FM radio application never shows any RDS data as well.

Could it be a limitation of the Blackstone chipset?

Any information would be very helpful.
[Windows Mobile Software Development] iseeka:
i see rds d ata
[Windows Mobile Software Development] iseeka:
dont know if this help... from irclog2html for #htc-linux on 20081026

00:10.34	cr2_	# Description : BRF6350 2.0 FW 2.34 FM Initialization

00:10.34	cr2_	# Compatibility: BRF6350 2.0 ROM w/ 2.0.34 Firmware

00:10.54	cr2_	maybe brf6350 has fm radio inside ? why not.

00:11.15	druidu	brf6350 was the bluetooth chip or what?

00:11.24	cr2_	yes

00:12.12	cr2_	# FM ON

00:12.12	cr2_	SEND_COMMAND: ogf=0x3f ocf=0x137 1 ->

00:12.12	cr2_	ACTION_SEND_COMMAND: 0x01 0x37 0xfd 0x01 0x01

00:12.32	cr2_	many vendor-specific commands

00:12.58	cr2_	137, and the rest is 135

00:13.46	cr2_	#log "FM_ON" (default 32KHz)

00:13.46	cr2_	SEND_COMMAND: ogf=0x3f ocf=0x137 1 ->

00:13.47	cr2_	ACTION_SEND_COMMAND: 0x01 0x37 0xfd 0x01 0x01

00:13.59	cr2_	nice :)

00:14.09	druidu	wonder if we can hack a driver to go beyond and below the fm range :P

00:14.28	cr2_	#ADC settings

00:14.28	cr2_	SEND_COMMAND: ogf=0x3f ocf=0x135 7 ->

00:14.36	cr2_	druidu: you don't need a driver

00:14.48	cr2_	these commands may be sent by hcitool

00:14.59	cr2_	you just need to write the script

00:15.14	cr2_	#power on: FM and RDS

00:15.14	cr2_	SEND_COMMAND: ogf=0x3f ocf=0x135 5 ->

00:15.15	cr2_	ACTION_SEND_COMMAND: 0x01 0x35 0xfd 0x05 0x20 0x02 0x00 0x00 0x03

00:15.25	druidu	NetRipper works with framebuffer driver!

00:15.33	NetRipper	druidu, good

00:15.53	druidu	did you get rid of all those annoying mdp irq already on 4 4 ?

00:15.53	szsoftware	cr2_: what are you talking about concretely? where are these informations from? And on which device?

00:16.08	druidu	szsoftware : raphael/diamond fm/rds chip

00:16.18	cr2_	szsoftware: fm/rds radio on diam/raph

00:16.38	NetRipper	you think we may be able to get TMC from it?
[Windows Mobile Software Development] iseeka:
http://www.orbit-forum.de/xda_orbit...M+tmc&hl=es&safe=off&rlz=1C1GGLS_esES291ES303

Found this.. with google translation from german to spanish i am spanish but not sure if it says how to configure igo to recieve tmc

Igo8 o 6.2 (incluso si existe un separador de puerto debe estar instalado) o cualquier PDA programa de navegación, que el cuadro Seleccione un receptor TMC externo permite. En primer lugar, Bluetooth está activado en la PDA, los "vinculados" a continuación, con el receptor TMC. Luego ggfl. todavía asignar un puerto serie y puede programar el menú de navegación. Igo8 Si la función de búsqueda automática, y luego se ve en la iniciativa de:

Código:

[TMC]

saved_config_available = "0"

saved_config_classname = "GNS_GPSTMC_SOURCE"

saved_config_portname = "COM"

saved_config_port = "2"

saved_last_tuning_mode = "0"

saved_last_frequency = "1018"
[Windows Mobile Software Development] iseeka:
http://xdaforums.com/showthread.php?t=404926

Hi Folks,

I was wondering a while ago if there would be a way to use the internal FM-radio for TMC purposes in TomTom which is pre-installed on the Cruise.

After a bit of searching on the web, i found a small program called DecoRDS, made by J.R. Pueyo (big credits to him!)

Now, i installed this on my Cruise with TomTom6 and initially it didn't work.

So, here are my settings on which the tool works and seems to work (haven't established a full working setting just yet):

Code:

1. Install both files provided from the link on your device. NOT MEMORYCARD

2. Run DecoRDS

3. go to Input, Port, and set it to COM4

4. go to Input, 9.600 bps and set it to 57.600 bps

5. Press OPEN, which will start the RDS tuner

6. go to Input, CONTROL, and select manual. Now you can search the frequencies for the RDS signal.

(optional: 7. enter 98,6 since it's Radio 1 with ANWB TMC for Netherlands)

Now, this SHOULD work, but i haven't figured it out completely yet, since it doesn't work in TomTom yet.

Anybody interested in helping me find out?
[Windows Mobile Software Development] seivad17:
Thanks for the polite answer, but no your not right. Read the first post before you go getting your panties in a wad about a question/comment.

flywhc, Thanks for your quick and helpful reply. I will try to copy the radio package in the same folder and if that doesn't work I will get you the log ASAP.
[Windows Mobile Software Development] iseeka:
damn ppl are already using tmc even in tomtom

http://www.lacasadelgps.com/catalog/download/DecoRDS (v2_6).zip

http://i55.photobucket.com/albums/g123/Jose_Ramon/DecoRDS/TMC_TT.jpg

i have this error

"DecoRDS.exe.

Typeloadexception

No se pudo cargar el tipo

OpenNETCF.IO.Serial.Port del

ensamblado OpenNETCF,

Versión=1.3.50511.0, Culture=neutral,

PublicKey Token=30C767B29D52D6E6"

maybe cause i use wm6.5?
[Windows Mobile Software Development] flywhc:
rungvang, as I mentioned on the first post, Omnia is not supported yet but you can use OmniaTMC for navigation.

6Fg8, obviously there is a memory corruption. I can only suggest that comment out most of your code and gradually add them back.
[Windows Mobile Software Development] rungvang:
Oh, Im sorry, I missed that point. I do have TMC in my Omnia, but you know, kind of prefer your program than TMC. Hope it will support Omnia soon.
[Windows Mobile Software Development] mhemart:
Artemis driver

Hello Flywhc and all,

Sorry for my long silence but I had a lot of work and after that, some holidays...

Now, I'm back and I had a look on this thread carefully. I saw that you've released a new version of your API but I suppose it's always non-Artemis compatible according the end of your first post. I'll try to continue my investigation about the physical address of the RDS chipset.

I'm happy to see that your project is improving.
[Windows Mobile Software Development] flywhc:
Actually BeamRider, the author of OmniaTMC, has a plan to make a GFMAPI for Omnia so that Omnia can use xFMRadio or any other application using GFMAPI.

I did analyze FMradio application and HTC all in one driver for Artemis.

Unfortunately they are written in such a way that not friendly to do reverse engineering.

I only know functions (IOCTL) to set properties such as stereo, band, channel etc, and found two base physical addresses for all devices. I still don't know how to get properties especially RDS. I got a few offset addresses but I don't know which one is for FMTuner and how to operate that device. I've given those details to BeamRider and I can give them to you.

I understand now that althought Artemis use similar chipset with Ominia, HTC may use complete different implementation from Samsung.

SI47xx chip has 2 wires and 3 wires bus mode. It also has other wire for reset etc. It must use other chip/port to convert 32 bits/8bits binary data to serial stream. In the driver it uses a lot I2C device IO etc I don't understand.

If I had a device, I would write test program to try those functions, and use debugger to trace HTC fm radio to reuse FMT device driver - this is difficult but may works. still tracing into that device driver is impossible.
[Windows Mobile Software Development] mhemart:
Thank you for trying to deal with the Artemis !

I feel a little bit better now that you tell me that you don't really understand the artemis driver itself. According to your previous advice, I was completely lost (but even if it was an easy-to-decrypt driver, I would have been probably lost too !!).

If I can help with my device, you can write a test problem, tell me which operations to perform and I'll give you the results. And a really naive question : did anybody ask HTC Company about this kind of information ? It's not the driver code itself so maybe they could answer ?
[Windows Mobile Software Development] flywhc:
I haven't written any device driver so I have this difficulty.

I like to discuss with HTC but lack of a good communication channel.

Somebody from this forum did ask HTC customer support similar question and got a rude reply - HTC hates this forum because we make older device as powerful as latest device so I guess they believe less customer would upgrade their old phones. Also we crack their software, expose their secrets.

It is hard and slow if I write program and you test. Can you write VC++ application?
[Windows Mobile Software Development] mhemart:
My knowledge in programming is relatively poor but I can ask for help with my friend. I know the way "you program and I test" will be slow. But if you may have time enough for giving me basics for HTC programming, who knows ? I can try, of course.

Concerning my question, I told you, it was a naive one ! We can't expect another answer from a mobile phone manufacturer... But if they were aware about expectations from their customers ? Because until now, I didn't see any TMC addon on HTC phones (but I didn't look very much :) ).

If you can give me results of your investigation on FMRadio and HTC AIO driver, I can continue to look in these two files if I can find something more (I'm dreaming :) ).
[Windows Mobile Software Development] 6Fg8:
Yes, absolutely right, at a place i never expected. After i replaced the linklabel controls with buttons the error is gone :)
[Windows Mobile Software Development] NEO130:
Wow, your skin is pretty cool. Where can I get this ? Schaut aber stark aus. Gibst du das den her ?
[Windows Mobile Software Development] 6Fg8:
Thanks :) It's work in progress, not published at this time, will do when its worth to be called a beta.
[Windows Mobile Software Development] NetRipper:
Heya,

I'm working on a .NET wrapper for the GFMAPI. So far all calls are working, including notifications. The FMGetNotification (although misspelled) is a horror to implement struct-wise. I haven't found a "nice" way to do it, so I'm marshalling all kinds of IntPtrs now to get a decent end-result ;) However, I'm getting the Frequency change and the RDS data now.

I have two questions though. Maybe someone can help me - one of the questions is probably for the developer.

- The FMGetNotification function is working, and I'm properly able to fetch the marshalled data. However, the result code is 31 (GenFailure) instead of Success. What situation could succesfully fill the struct and still return a GenFailure?

- Now that the RDS message are working, I'm still left with the chunk stuff. Could anyone share some code in which the messages are parsed to fetch letters for them? I'm particularly interested in the RadioText at the moment. I could try and figure it out by myself, but I'm hoping to save some time here. :)

Oh, and, thanks for the GFMAPI! :)
[Windows Mobile Software Development] 6Fg8:
I implemented FMGetNotificaiton in vb.net with a Marshal.PtrToStructure, the definitions where a little tricky though. I'll post them if you're interested.

I did parse the Radiotext messages too, could share some code fragments in C if you find it useful. One issue i ran into is finding the perfect point in time to display the message, since the broadcasters seem to interrupt them abruptly and start with another (at least in Austria :D).
[Windows Mobile Software Development] NetRipper:
I've currently implemented Notifications using multiple structs. One specifically to determine the Code. After that a struct specifically to that code, and for RDS I have an IntPtr again that I marshal to a struct for each count * sizeof struct. Kinda dirty if you ask me, but I got an exception on most of my other tries. You can check it here: http://netripper.pastebin.com/f53cc193b

I'd be very interested in how you did it, so please post your code.

If you could post your code fragments to parse the text messages as well, that'd be great. Doesn't matter that it's in C, I'll find a way to do it in C#. :)
[Windows Mobile Software Development] flywhc:
mhemart, it needs someone has VC++ skills to do this test. I discovered about 20 functions, I don't know format of arguments, don't know what purpose of most of them.

Have to try different arguments and see which one works. And also check return values by using debugger to guess what format of results.

I can give source code to you or somebody who will do this work, and briefly explain how to do reverse engineering.

I am writing a test framework that validate each function. I have power on/off, enable radio, set band, set channel now. Don't know how to disable yet.

My worry is after all these work, we may get a working radio API but without RDS data. BeamRider told me that he got this result from his Samsung Omnia so he had to dig into low lever device driver and wrote his own device driver. Problem of HTC device driver doesn't have many symbols that help me understand purpose of each function. It needs hardware knowledge such as I2C bus.

NetRipper, sorry for that misspelling - I should fix it in the next release :)

please look at Radio 0.3 API on the first post. it has c++ source code that extract radio text etc.

You can actually use this structure:

[StructLayout(LayoutKind.Sequential)]
internal struct TagFM_NOTIFICATION_INTERNAL
{
public FMN_ACTIONS Code;
public uint Timestamp;
public uint RDSCount_Freq;
public IntPtr RDSData_FreqReason;
}

then marshal RDSData_FreqReason to FM_RDS_GROUP if code == 1
[Windows Mobile Software Development] NetRipper:
Heh ok - did nobody before this mention this?? Haven't read through the whole thread. ;-) You could even consider keeping both exports for backward compatibility.

Ah, that's good. I had just checked the 0.3 API dll, but it only had the .dll. Version 1.2B had a test application, but that one didn't include RDS decoding.

That structure would make me need one less struct, but not sure if it helps readability. I wish it was possible to do unions of structs in .NET. I can use the explicitlayout, which is like union and works for basic datatypes, but doesn't seem to work in conjunction with structs.

Could you still answer my question about the GenFailure which I get?
[Windows Mobile Software Development] flywhc:
that is different Radio API 0.3, not GFMAPI1.3: http://xdaforums.com/attachment.php?attachmentid=176476&d=1239754490

I am sure you can write a wrapper for that structure in order to improve readability, such as calling two new functions to handle different events.

Union is considered as a bad thing in C/C++ language.

I have to check source code tonight to answer your question about GenFailure.