Related
I was trying to do a little research in to if I could get the FM transmitter/reciever to work or if it would be even possible. A little google searching around I found this. And the person who had been doing the most work on that part of android was an actual broadcom employee. So I sent him a quick, polite email asking him about FM support in the Nexus one. It is as follows:
"Mr. Harte,
I noticed your commits here. Will Broadcom provide support/drivers for the FM transmitter/receiver in the Nexus One and other Android devices?
Sincerely,
Will"
And his surprisingly helpful and quick response:
"Hello,
The FM receiver is supported in the HTC Incredible and HTC EVO 4G. I’m not sure if the Nexus One hardware supports FM. The 4329 chip has FM, but I don’t know if the external components required for the FM Antenna are populated on the board. I believe there is also some work needed in the kernel to enable the audio path for FM, but if/when HTC open-sources the kernel for the EVO or Incredible, this should be evident. Also, the EVO and Incredible use the Broadcom Bluetooth stack, while the Nexus One uses BlueZ. I don’t think there is any support in BlueZ for FM. I have no idea about FM Transmit, but I would highly doubt it is possible to get that to work…
-Howard"
That makes me sad but at least now I know. Hopefully though this will provide some light to any crafty developers interested tinkering with this.
Shorthand.
Even if the hardware says fm/transmit/receive, we would have to solder, replace the bluetooth stack, and possibly replace the chip firmware to get it to work.
Short, short hand.. NO FM on nexus one.
No really, somehow he neglected to mention the sister Desire.
Regarding the antenna portion, it's been proven that the nexus can find stations. . .just not output any sound from them.
Mi|enko said:
Regarding the antenna portion, it's been proven that the nexus can find stations. . .just not output any sound from them.
Click to expand...
Click to collapse
I do remember reading about that. Can you find the source? If thats true, then we know the only problem is the stack.
williamthrilliam said:
I do remember reading about that. Can you find the source? If thats true, then we know the only problem is the stack.
Click to expand...
Click to collapse
Check the notes from Modaco's Desire ROM port. I think it's there. But since FM radio is analog, there may be a lot more to it than a stack.
attn1 said:
Check the notes from Modaco's Desire ROM port. I think it's there. But since FM radio is analog, there may be a lot more to it than a stack.
Click to expand...
Click to collapse
Yup, his bluetooth doesn't work because he is using the Nexus One kernel. Well, we now know what part of the kernel isn't allowing the bluetooth to work; Bluez vs the Broadcom Stack. I don't know the legal implications of using it, but it seems like it would be possible.
Devastatin said:
Shorthand.
Even if the hardware says fm/transmit/receive, we would have to solder, replace the bluetooth stack, and possibly replace the chip firmware to get it to work.
Short, short hand.. NO FM on nexus one.
Click to expand...
Click to collapse
Patently FALSE.
All we need is a kernel with FM support and the FM driver. Receive is definitely possible.
I do believe however that the power amplifier chips for transmitting are absent, so that won't be a possibility.
williamthrilliam said:
Yup, his bluetooth doesn't work because he is using the Nexus One kernel. Well, we now know what part of the kernel isn't allowing the bluetooth to work; Bluez vs the Broadcom Stack. I don't know the legal implications of using it, but it seems like it would be possible.
Click to expand...
Click to collapse
Getting an analog tuner that isn't connected to anything to tune is not much help. I don't care what software you write, if there is no output to be captured, it's not going to happen. It's like a cable box with no television connection. It tunes just fine. If the rest of the connecting hardware is there, then there's a shot. But Google has never said there would be FM in the Nexus One at any point. I am less than optimistic.
GldRush98 said:
Patently FALSE.
All we need is a kernel with FM support and the FM driver. Receive is definitely possible.
Click to expand...
Click to collapse
That still has not been determined.
or you can go to your favorite radio station's website and click on "listen in" or whatever and now your listening to FM on your phone. =D
or maybe not, thats how it works on my pc..
i dont understand what the bluetooth has anything to do with this? why does it matter the blueZ vs broadcom bluetooth hardware? it sounds like the fm radio portion is there and can even pick up stations with an antenna, just routing the audio. but that doesnt need to happen thru bluetooh, it could happen through the headset or loudspeaker.
RogerPodacter said:
i dont understand what the bluetooth has anything to do with this? why does it matter the blueZ vs broadcom bluetooth hardware? it sounds like the fm radio portion is there and can even pick up stations with an antenna, just routing the audio. but that doesnt need to happen thru bluetooh, it could happen through the headset or loudspeaker.
Click to expand...
Click to collapse
The Broadcom BCM4329EKUBG has all of these functions built in. FM, 802.11, bluetooth.
http://www.broadcom.com/products/Bluetooth/Bluetooth-RF-Silicon-and-Software-Solutions/BCM4329
RogerPodacter said:
i dont understand what the bluetooth has anything to do with this? why does it matter the blueZ vs broadcom bluetooth hardware? it sounds like the fm radio portion is there and can even pick up stations with an antenna, just routing the audio. but that doesnt need to happen thru bluetooh, it could happen through the headset or loudspeaker.
Click to expand...
Click to collapse
The bluetooth/fm/wifi are all on one chipset.
ChillRays said:
or you can go to your favorite radio station's website and click on "listen in" or whatever and now your listening to FM on your phone. =D
or maybe not, thats how it works on my pc..
Click to expand...
Click to collapse
For the most part yes (esp. with those of us with froyo and flas ). But what made me start searching for this was a tornado that past by me by only a few miles. I luckily was in the car and able to tune in to a station broadcasting the Emergency Broadcasting Systems's message, but I thought it would be nice to be able to do that on my phone.
RogerPodacter said:
i dont understand what the bluetooth has anything to do with this? why does it matter the blueZ vs broadcom bluetooth hardware? it sounds like the fm radio portion is there and can even pick up stations with an antenna, just routing the audio. but that doesnt need to happen thru bluetooh, it could happen through the headset or loudspeaker.
Click to expand...
Click to collapse
Integrated circuits perform multiple functions. That broadcom chip could do a lot more than blue tooth. FM is analog. If all you have is the tuner and there is no connecting hardware, then yeah, you receive a signal, but it's going nowhere. If you can't capture the output, you can't use it. Do we know if the FM radio signal in the Desire is ever digitized? It could work like a regular FM radio and the digital/software part is for tuning purposes only and radio itself is analog. I read somewhere is that the HTC FM radios require wired headset use - and don't play back through blue tooth. Irony there, I think. Speculation is that is because they are used for an antenna, but I think it could also be that it's because it's an analog output. I am guessing the N1 is missing all the required circuits - except the tuner.
attn1 said:
Integrated circuits perform multiple functions. That broadcom chip could do a lot more than blue tooth. FM is analog. If all you have is the tuner and there is no connecting hardware, then yeah, you receive a signal, but it's going nowhere. If you can't capture the output, you can't use it. Do we know if the FM radio signal in the Desire is ever digitized? It could work like a regular FM radio and the digital/software part is for tuning purposes only and radio itself is analog. I read somewhere is that the HTC FM radios require wired headset use - and don't play back through blue tooth. Irony there, I think. Speculation is that is because they are used for an antenna, but I think it could also be that it's because it's an analog output. I am guessing the N1 is missing all the required circuits - except the tuner.
Click to expand...
Click to collapse
This is true of the Touch Pro hardware at least. The FM Radio wouldn't function with out the headphones plugged in. It used the headphone wire as the antenna.
there is a great thread going in the nexus development area where some people are trying to write the kernel so that the sound has an output. It sounds like they are making great progress maybe anyone reading this thread who has some technical skills can help. I believe they too have been able to tune the phone to a station but not output the sound yet.
It seems to me we need definitive answers to the following 2 questions from HTC / Google ...
Q1. Does the nexus one have the necessary hardware and interconnections for FM radio reception and output through either the speaker or headphones. YES/NO?
Q2. Does the nexus one have the necessary hardware and interconnections for FM radio transmission of any type (music / voice). YES/NO?
If both answers are a definitive NO, we can move on. If there is a YES then the clever people here, who make the magic happen, have some hope of success.
Does anyone know the correct ppl at HTC / Google to ask these questions of?
I don’t have anything to add but would like to encourage you guys in your endeavour to get FM radio working on the N1 and also point you too or remind you what androidpolice reported at Google I/O
If this is true then perhaps all the building blocks are in place.
http://www.androidpolice.com/2010/0...nity-as-our-best-bet-post-google-io-coverage/
sd00 said:
It seems to me we need definitive answers to the following 2 questions from HTC / Google ...
Q1. Does the nexus one have the necessary hardware and interconnections for FM radio reception and output through either the speaker or headphones. YES/NO?
Q2. Does the nexus one have the necessary hardware and interconnections for FM radio transmission of any type (music / voice). YES/NO?
If both answers are a definitive NO, we can move on. If there is a YES then the clever people here, who make the magic happen, have some hope of success.
Does anyone know the correct ppl at HTC / Google to ask these questions of?
Click to expand...
Click to collapse
Or maybe we just need to think and use the info that we have in other threads on the subject. But I'll repeat things written in another thread, by myself and other guys:
Q1. Broadcom chip brief (the best doc available for it on the net) clearly shows the radio having no separate connections but using BT's high speed UART and I2C. The interconnects are the same, and since Paul's Desire port has radio control working - that means I2C is working too, so the answer is YES.
Q2. The stated output power of the chip is good enough for short-range transmission w/o a dedicated antenna, using headphone cord. The control and data are given in the same way as in Q1. So, the answer is YES again, but with more trouble - while there is a working device utilizing FM receiver functionality, which can at least theoretically be ported completely using its source, there is no device with FM transmitter, which means - if someone wants to use transmitter, that someone needs to acquire specific Broadcom documents for the chip.
So I guess the thread can be laid to rest, and anyone that can really help - for example, to go over Desire source and figure out the correct setting for QSD UART to receive FM audio and the procedures to stream it to the speaker - are welcome to head over to Dev section.
Hey guys,
I was just thinking about that nasty little problem with cyanogenmod and our legends and since there was no meaningfull advencment, we could put some money on it. I think from 5 to 10€ for each doner would be enough or what do you think? Of course the developer has to give us an account to send the money to.
I would just like to use the FM radio and since it is working on desire for some time now, why not on legend.
So who is ready to do it?
would support that idea.
It is already stated waaaaaaaaaaayyyy before. The FM radio WILL NOT WORK on the Legend because of it's alien architecture. Don't ask me, I don't know ****. But if you're do want to make a donation then you can donate to Ali Ba which has been the sole reason CM is running on the Legend.
This is a good idea.
Sent from my Legend using XDA App
rajasyaitan said:
It is already stated waaaaaaaaaaayyyy before. The FM radio WILL NOT WORK on the Legend because of it's alien architecture. Don't ask me, I don't know ****. But if you're do want to make a donation then you can donate to Ali Ba which has been the sole reason CM is running on the Legend.
Click to expand...
Click to collapse
here on this link http://forum.cyanogenmod.com/topic/8260-fm-radio-support-for-legend/ ale baba himself says it is possible but that he hasn't got the time for it. So it is possible we just need someone who will do it. But first of all we need more people.
I'd consider doing development on this. I was wondering why there was no FM Radio app on CM7, LOL.
At the very least I can commit to finding all the info I can gather on this issue. I have no (satisfactory) employment at present and want to break into the Android specific field.
I have 14 years experience in embedded Linux development, including lots of low level kernel stuff. In a previous life (more decades ago than I dare admit) I did electronics engineering stuff, and I still love the low level nuts and bolts.
I'm pretty new to Android however, got my first cellphone (ever!) 17 days ago, first Android phone 15 days ago, and my Legend yesterday.
I think I can learn quick, I'm CM7 nightly, S-Off, new radio one day after getting it, LOL.
So my point is I, and this project, could use help in areas of Android specific knowledge.
Does anyone know if the normal FM radio app I've used before is proprietary Google code ?
Are there any generic FM radio apps that would work if standard drivers existed ?
My quick research on this is that only a driver might be needed. A V4L (video 4 linux) driver, which I have already had some experience with.
But there DOES seem to be a V4L driver already for Linux for the TI WL1273 chip apparently used in the Legend, and apparently a number of other phones. So in theory, this job might be as easy as integrating an already written driver in to the CM kernel, as a kernel module or 2. There MIGHT be some copyright issues with any chip firmware though.
Alas, some comments indicate using such a driver might interfere with Bluetooth functionality.
Interesting stuff about the 1273 chip is that it may support an FM transmitter, and it supposedly supports WiFi N. But who knows if needed hardware support might not be on the PCBs.
^ wow! where have you been all our android lives, bro? link on the post above yours answers some, if not of all, of your questions & covers a lot, i guess. cheers!
maxq1 said:
^ wow! where have you been all our android lives, bro? link on the post above yours answers some, if not of all, of your questions & covers a lot, i guess. cheers!
Click to expand...
Click to collapse
Cheers...
I've been reading that there IS an FM Radio app integrated into CM now. It comes from MIUI, a chinese group of some sort that also makes an Android ROM.
The app apparently uses /dev/radio* which is the standard V4L radio interface. I have these also on my Hauuppage PVR boards I used for HTPC before I went completely digital for movies, tv, etc.
So yes, what we need is integration of a driver into CM kernel, but coding may be needed to fix bluetooth driver interference etc. And of course who knows what else might be needed.
I'm reading that FM is much more important to those without data to stream. Not all of us live in wireless data dense cities and countries.
Would be interesting to see what frequency range can be received and maybe transmitted.
Would be MOST cool to stream from video camera to transmitter for local "pirate TV" type functionality, LOL. Actually can't imagine ATSC or even NTSC (or PAL etc.) encoding possible, but wireless streaming will do the job...
@mikereidis
Thanks for joining in, great highly appreciated. If there is any time left it would be nice if you could look into the GPS problem with CM 7 it is currently not addressed.
Anyhow thanks for your participation and contribution.
BR, ojessie
@mikereidis
So are you going to try and port it?? If you will and you'll succeded then you will be the legend in Legend community!
Sent from my Legend using XDA App
ojessie said:
@mikereidis
Thanks for joining in, great highly appreciated. If there is any time left it would be nice if you could look into the GPS problem with CM 7 it is currently not addressed.
Anyhow thanks for your participation and contribution.
BR, ojessie
Click to expand...
Click to collapse
I can keep my eyes and ears open to GPS, but best to concentrate on one issue at a time.
What is the GPS issue ? I thought it didn't work on my phone after new ROM but within a few hours it was working OK for whatever reason. And now I see 2 metre accuracy compared to the minimum of 5 on my Optimus Chic.
qzem said:
@mikereidis
So are you going to try and port it??
Click to expand...
Click to collapse
I'll do whatever it takes.
The userspace FM Radio app shouldn't need any porting work AFAIK. It seems to already be in CM 6.1 ROMs for the Nexus One (any others?). So I'd guess installation would just need to be enabled for other phones.
The tricky part is getting a device driver working that creates a /dev/radio interface for the MUIU FM radio app to use. There IS already a Linux driver for the WL 1273 the Legend uses, but it might need some modifications to run on the Legend.
But there is some complicating factor regarding bluetooth drivers, so it may not be too straight forward. For initial testing at least the bluetooth drivers could be disabled.
What about HTC's kernel source. As I told in cyanogenmod forum the drivers should already be in HTC's kernel source. If the code is there it should be easy to put it into CM7 kernel and use HTC's FM Radio app. Or what do you think?
mikereidis said:
I can keep my eyes and ears open to GPS, but best to concentrate on one issue at a time.
What is the GPS issue ? I thought it didn't work on my phone after new ROM but within a few hours it was working OK for whatever reason. And now I see 2 metre accuracy compared to the minimum of 5 on my Optimus Chic.
Click to expand...
Click to collapse
Yeh, thats the problem. GPS is working on some devices and on others not and nobody knows why. As a matter of fact when I'm running CM 6.1 its working great. Flashing CM 7 no change to get it working. As mentioned others are reporting the same issue with CM 7 on some its working on others not.
ojessie said:
Yeh, thats the problem. GPS is working on some devices and on others not and nobody knows why. As a matter of fact when I'm running CM 6.1 its working great. Flashing CM 7 no change to get it working. As mentioned others are reporting the same issue with CM 7 on some its working on others not.
Click to expand...
Click to collapse
When I get tired of Google maps seeming to take forever to figure out my GPS location, I've downloaded and run the "GPS Test" and "GPS Status" apps. I did so and for some time the status color on one of those showed yellow, meaning no GPS fix, but power on.
Anyway sometime later it was working. One of those apps downloaded data to make cold starts work faster and that may have helped. A few things to try for anyone interested anyway.
ponchofiesta said:
What about HTC's kernel source. As I told in cyanogenmod forum the drivers should already be in HTC's kernel source. If the code is there it should be easy to put it into CM7 kernel and use HTC's FM Radio app. Or what do you think?
Click to expand...
Click to collapse
The problem with running the HTC FM radio app on CM is that it, like many other HTC apps, uses the HTC framework with Sense UI. So CM can't run it, although stock or modded Sense ROMs should be able to.
IMO right now the MIUI app is the way to go, and it's open source so anyone can modify/fork it.
Yeah I think a /dev/radio is likely in HTC source, but it's possible it's something different and/or kind of proprietary.
The Chip manufacturer, TI, and their partners who make RF modules based on the chips, DO have android /dev/radio drivers. So they are definitely out there somewhere.
I think, as usual that "In Theory" this should be a simple matter, in reality there is usually some problems to solve. Otherwise we'd have FM already in CM.
A few pointers:
TI 1273 has a few interfaces for communication. One of them being a (standard) serial via bluetooth, the other one I2C.
HTC did not use I2C because they already had to use the serial interface for bluetooth and it's a lot cheaper that way (that's what all manufacturers do, by the way). The wl1273 driver in the Linux kernel does have support for the FM capabilities, but unfortunately via I2C only.
So basically we already have all the drivers we need in place (tiwlan_drv, sdio), no kernel stuff needed. What's missing is valid documentation about how to enable radio, route it to the headphones, seek/tune, etc.
You could reverse engineer /system/bin/btipsd, which does bluetooth and FM communication in original HTC releases.
Once you are able to control FM stuff (with bluetooth turned on) write a nice summary and I'll ask cyanogen how to implement it. Won't be that hard, given the fact that currently all supported devices use the serial interface via bluetooth.
ali ba said:
The wl1273 driver in the Linux kernel does have support for the FM capabilities, but unfortunately via I2C only.
So basically we already have all the drivers we need in place (tiwlan_drv, sdio), no kernel stuff needed. What's missing is valid documentation about how to enable radio, route it to the headphones, seek/tune, etc.
You could reverse engineer /system/bin/btipsd, which does bluetooth and FM communication in original HTC releases.
Click to expand...
Click to collapse
Thanks ali ba ! Yes I know about cheap manus, I've worked for a few, LOL. Linux VOIP and security appliances mostly though.
By "The wl1273 driver in the Linux kernel" do you mean the TI provided W1273 driver in the CM7 ROM ? I had thought that driver was for WiFi only, or perhaps WiFi + Bluethooth. Or does my seeing an rfkill device mean FM radio is in there too ? Would it create a /dev/radio device ? There are some FM init BTS files that may enable FM.
My understanding is that the WL1273 WiFi driver in the mainline Linux kernel (not the Android kernel) is WiFi only. There's a guy from Nokia trying to get WL1273 FM radio only driver into main Linux kernel but not there yet. That driver will be separate from WiFi driver even though they may both have WL1273 in the name.
I've been finding some HCI commands usable with hcitool to do audio routing stuff at least. RevEng has been a specialty of mine, so I think if it can be done, I have a good chance.
Quickest route to a working FM radio on Legend is to find an existing app for another phone that works.
Phones with the WL1271/1273/1281/1283 chips include original Moto Droid, Droid 2, Droid X, Motorai, Nokia N800 (or N900?), N8 (?), B&N Nook Color.
There's a thread here on XDA about Droid 2 phones using the Droid X FM radio app with success. I tried that app but there seems to be some problem launching the fmradioserver.
I saw a logcat message that may indicate I need to "adb install" the APKs instead of just copying them to /system/app. I tried but got the error that indicates the UID does not match the signature. I guess that's not an issue on Droid 2 (or motorola phones in general?)
Does anyone know if/how to mod/repack an APK to avoid the UID signature issue ?
A few more of my findings for anyone interested. BTW should I or someone create a thread in the dev section at this point ?
As mentioned above a guy from Nokia is trying to get a V4L2/dev/radio driver for WL1273 into mainline Linux kernel. That driver could be integrated into our kernel, but it might take a bit of work. And as mentioned that driver is not in kernel yet and may have lots of changes still coming in the next several months at least.
But TI also has a driver, and it's meant for Android. I haven't been able to grab source code for that driver yet. I think TI driver references WL1283, the biggest baddest version with GPS too. But driver is supposed to work on all 4 variants, down to WL1271.
TI has a command line app for testing fm radio, I think called fmapp if memory serves. It's possible this test app could at least help with exploration.
Unlike the poor original Droid owners, we are lucky that we know our FM receive antenna is connected, since stock Legend has FM radio. But there seems to be a different pin for FM transmit so it's possible we will never be able to transmit FM more than a few inches. But Tx would just be a bonus, but a potentially wonderful bonus.
And, ya know, I'm not even sure if MIUI FM app works with /dev/radio. I was looking at some source and it seems to be hardcoded with Broadcom chip specific stuff.
Oh, and my understanding is that even if we ever managed to get Wireless N working (with a new or improved stack perhaps?), that it will likely kill batteries quickly enough to be effectively unusable. Would be interesting though.
Anyone knows of an RDS FM Radio app which I can install insteed of MUIU FM radio app which is used in many of the cooked NAND Android rom for HD2?
yea i wish we had a new radio app. which can record songs from a fm radio
Marty02 said:
yea i wish we had a new radio app. which can record songs from a fm radio
Click to expand...
Click to collapse
The MUIU app lack several things like auto-tuning so I would be nice with a better FM Radio app which supports RDS and auto-tuning!
I've released version 2.0.2 of the "Spirit FM Radio" app. See my sig for the details post.
The best support is for CM7 ROMs with the CM FM app. It may also work on MIUI ROMs as well.
My app supports RDS data on TI FM chips, and more basic functionality on Broadcom FM chips, such as used on the Leo/HD2. I intend to add RDS support for Broadcom with further reverse engineering.
The app is running well on my HTC Legend and Desire HD, and I think should., or I've heard does, also work on Leo/HD2 and several other devices.
Thank you for your app.it works better than the default fm app in hd2 that we have in non sense roms.
mikereidis said:
I've released version 2.0.2 of the "Spirit FM Radio" app. See my sig for the details post.
The best support is for CM7 ROMs with the CM FM app. It may also work on MIUI ROMs as well.
My app supports RDS data on TI FM chips, and more basic functionality on Broadcom FM chips, such as used on the Leo/HD2. I intend to add RDS support for Broadcom with further reverse engineering.
The app is running well on my HTC Legend and Desire HD, and I think should., or I've heard does, also work on Leo/HD2 and several other devices.
Click to expand...
Click to collapse
Works on tytungs AOSP but no sound. On CM7 works fine.
Hi mikereidis any idea to get this working with sense builds?
zach.antre said:
Works on tytungs AOSP but no sound. On CM7 works fine.
Click to expand...
Click to collapse
Thanks for your report !
If you are using v2.0.3 from the Market, and you have ADB on a connected computer you could ensure you have an SD card and try running:
adb shell touch /sdcard/fm_su
or from an on phone terminal emulator:
touch /sdcard/fm_su
This creates a file that enables this command in the code:
su -c "chmod o+r /dev/msm_snd"
The code then does an "ioctl" hack that can enable FM audio output on some phones. I needed this hack before CM was updated to do this internally for FM audio routing.
But it's possible you don't have a /dev/msm_snd pseudo-file and this hack won't work.
I might be able to find some other workaround for non CM ROMs.
Another trick for audio routing on HTC phones with stock or stock derived ROMs is:
adb shell "echo fm_speaker > /sys/class/htc_accessory/fm/flag"
or
adb shell "echo fm_headset > /sys/class/htc_accessory/fm/flag"
Use this to verify:
adb shell "cat /sys/class/htc_accessory/fm/flag"
I DO have this in the code, but it's possible the ordering of different audio routing methods is a problem.
lukesan said:
Hi mikereidis any idea to get this working with sense builds?
Click to expand...
Click to collapse
Yes, I have it running on my HTC Legend with the Blayo ROM which is a Sense ROM derived from the stock ROM.
I should be able to get this app running on any Android 2.1+ device with a TI or Broadcom FM chip (or future supported FM chip) providing the following conditions are met:
(1) - I find some way to route FM audio from the chip to speakers or headset. Thus far the app only supports analog connections, but most (or all?) phones with a usable FM chip seem to have an analog connection. It might be possible in future to route digitally, or even to BT headset with the audio never leaving the combination BT and FM chip.
(2) - I find some way to control and read registers on the chip. Most phones seem to piggy-back FM on the Bluetooth HCI interface. Currently, my app, and the MIUI and CM apps, all use the "hcitool" command for this. AFAICT, none of the stock HTC ROMs has a working hcitool, and copying one from the CM ROM doesn't work. IMO, these ROMs do not fully support the Bluez BT APIs.
Version 1 of my app had the abiliity to run a daemon that directly accessed the Bluetooth library, which is a better way than running hcitool. Unfortunately, running the daemon seemed to require root/SuperUser and I'd prefer my app not require this, Furthermore, I could not get this to work on the stock or Blayo ROMs. It might be possible, but I haven't figured out how, and nobody "On the Internet" has figured it out either.
So for the Blayo ROM I found I could use a "btipsd_cli" command that also seems to be on the stock ROM. It's an ugly hack because my app "pretends" to be a human entering commands, but it worked, although with some occasional stability problems due to btipsd crashing. And BTIPSD* is Texas Instruments FM chip specific; it will never work on Broadcom chips. Perhaps there is some Broadcom command line utility or API that can be used; I haven't looked too deeply yet.
The iPhone uses a Broadcom chip and apparently has a "bcm" command that can control some functions. AFAICT, many people have wanted an FM app on the iPhone(s) put out in the last few years with this chip, but nobody has ever got it working. Broadcom apparently only supplies specs for their chip to their large customers. I can't even find a decent datasheet on foreign web-sites that contain other confidential type materials.
Beyond that I could possibly reverse-engineer the API that the HTC FM app uses, which seems to live in the android_runtime library. That would have the advantage of likely working on all HTC phones, regardless of chip. But I would very much prefer to control the FM chips more directly, using the BT / Bluez library for HCI access.
So hopefully, eventually, many more phone and ROM combinations will be working. I'm happy to work with anyone who might have ideas or time and expertise to try and help me hack these "secrets".
In the longer term, it might be nice if the Sony Ericsson proposed Android FM API gained some traction, but I'm not sure if other device or chip manufacturers, like HTC and Broadcom, will support this API.
mikereidis said:
But it's possible you don't have a /dev/msm_snd pseudo-file and this hack won't work.
Click to expand...
Click to collapse
You were right... I don't have a /dev/msm_snd pseudo-file and it didn't work
Hi guys,
How do we know fm radio chip is not connected? Is there any document confirming that or did any one opened the phone to check that? I have seen a thread where people were talking about enabling disabled fm radio in different phone.
Regards,
ncc74656
Well, there's a binary (in /system/bin/ but I can't remember its name) that communicates with the FM radio driver. And when I was playing around with it, there are some options like changing band or checking info, info was null (or no signal)...
So I guess we really can't make FM radio work just with software.
Maybe that binary came from an early Defy ported Rom, along with the driver, I don't know...
Please link the other thread you saw.
Sent from my Milestone 2 XDA App
as i read on development forum: "milestone 2 has the hw to play fm radio, its 'just' not wired. so unless you're crazy enough to open your phone and wire it yourself, no fm radio for milestone and that's it"
I don't know how is it about hw side - except the information already mentioned in the post above.
I only tried fm tuner binary, application and library pack from driod 2 (http://forum.xda-developers.com/showthread.php?t=769894), but without success - the radio application didn't even correctly started - I thought it will work, but only without signal - 'cause it is not wired to antenna...
I agree with post #2 - unfortunatelly it is shame, but it is - i think - impossible to get it work only with sw way... But I'm also still interested in some prove or source about fm tuner hardware situation in Milestone 2..
Download and install Tunein Radio. It's the best choice...trust me (at least here in Brazil).
Dear friends,
I had read in some threads about the existence of the BCM4329 inside the HD2, that it makes FM receiver AND TRANSMITTER options possible.
So, I was wondering about the chance of having FM transmissions possible, if things had progressed with the years (those news are from 2010, still focused on WM6.5), also thanks to the existence of very updated versions of Android, although it seems to me that nowadays an FM API is still not available to us.
Thank you.
What are you talking about? Where did you search for this? As a Google search you are Fired!
Just instal Spirit FM and you are ready to use FM Radio on your magnificent HD2. Plug the Headphones which are needed as antenna. Also the Radio will turn on Bluetooth because the chip to run FM radio is implemented into it.
Have Fun.
eclyptos said:
What are you talking about? Where did you search for this? As a Google search you are Fired!
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=622377
The only thing that I would like to add is that one of attached file is not exactly a datasheet but a simple brochure, at least in my opinion...
clrscr said:
http://forum.xda-developers.com/showthread.php?t=622377
The only thing that I would like to add is that one of attached file is not exactly a datasheet but a simple brochure, at least in my opinion...
Click to expand...
Click to collapse
What is your point? I got HTC HD2 and I use Spirit and everything working fine. Where is your problem? Maybe you have the wrong Rom installed. I know someone complain with some rom but the hardware it's the same.
BTW, what FW trasmissions for?
clrscr said:
Dear friends,
I had read in some threads about the existence of the BCM4329 inside the HD2, that it makes FM receiver AND TRANSMITTER options possible.
So, I was wondering about the chance of having FM transmissions possible, if things had progressed with the years (those news are from 2010, still focused on WM6.5), also thanks to the existence of very updated versions of Android, although it seems to me that nowadays an FM API is still not available to us.
Thank you.
Click to expand...
Click to collapse
Unfortunately, there hasn't been much progress on that field (as a matter of fact, there hasn't been any progress at all). If you read the replies in that thread, they couldn't make it work. The furthest the could get is to confirm that the HD2 indeed does have the chip.
eclyptos said:
What is your point? I got HTC HD2 and I use Spirit and everything working fine. Where is your problem? Maybe you have the wrong Rom installed. I know someone complain with some rom but the hardware it's the same.
Click to expand...
Click to collapse
He isn't talking about the radio receiver, he's talking about a radio transmitter. E.g. You run a special app, ask the app to transmit a song using radio. And then you can listen to that song, say, in a car using the radio. No wires/bluetooth connection needed. Simply tune in and listen. I really wished they did it.. what a pity.
Marvlesz said:
He isn't talking about the radio receiver, he's talking about a radio transmitter. E.g. You run a special app, ask the app to transmit a song using radio. And then you can listen to that song, say, in a car using the radio. No wires/bluetooth connection needed. Simply tune in and listen. I really wished they did it.. what a pity.
Click to expand...
Click to collapse
Yeah, I figure out this at the end, my bad. :angel:
It will be a good option but the radio receiver will have to tune to a specific frequency and this part I think will be the issue here. In terms of words so simply but unconventional.
I think they don't do that for a national security.