[Q] FM Radio API - One (M8) Q&A, Help & Troubleshooting

I am searching for any documentation on the FM Radio API for the HTC One (M8). I have done some searching myself with nothing turning up, so I just wanted to check if anyone else knows something.
I can probably reverse the API if I need, but if someone already has I don't want to duplicate the work.
Thank you

There's not an HTC One (M8)-specific FM Radio API, if that's what you're asking. There's no FM radio support provided by the Android API itself, either. It looks like most, if not all, vendors end up rolling their own. That said, the FM chip used in the M8 is a Qualcomm "Iris" chip (which makes appearances on a few other devices) and while the chip documentation is closed, Qualcomm does apparently provide source code.
I might be of more help if I knew what exactly it is you'd like to accomplish. I would share some links, but I have yet to actually post enough to do that. I'll still try to help you get to some pages that might be helpful.
Github Wiki Page giving a rundown of the mess that is Android FM app development: github [dot] com [slash] mikereidis [slash] androidfm [slash] wiki [slash] Creating-an-Android-FM-app
Radio driver source in the AOSP Git: visit android [dot] googlesource [dot] com and add the path "/kernel/msm/+/android-5.1.0_r0.7/drivers/media/radio" to the URL.
The files beginning with "radio-iris" are the most relevant to our devices.
Let me know if you'd like any more help!

I am trying to make an app that uses the FM radio. And from reading the Creating an Android FM app article it appears that there isn't a publicized api spec for doing this on the HTC One (m8). So I have two choices. I can look at the open source kernle for the chip being used and try to reverse the api from that. Or I can find an application that already uses the FM radio and reverse how they are doing it.
I think reversing an app will be simpler although it might not provide all the possible calls, but unless anyone has a better idea I think that is what I will do.
Thank you KazPinkerton.

Related

Newbiw, got a little bit confused!? Anyone please help!

HI,I have new for the XDA family.
but,I cant see the exactly meaning for
ROM
Ext ROM
Radio
Protocol
RAM
FLASH RAM
any similar compared with the PC?
Thanks in advance
cheers
Simply put:
ROM is the software that comes pre-installed on the phone. This is normally not editable, but it may be swapped for a new version if you know what you are doing.
Radio is any kind of wireless communication, e.g. GSM, GPRS, WAP, WiFi etc
RAM stands for random access memory, and is in the case of the XDA, its main storage facility. In computers however, RAM is not used for storage (since it is wiped if it loses power, a common problem in the XDA series!)
Thanks,RICHARD
is that mean keep update the RADIO is very important for connection?
Exec: if you need any further info on this kind of stuff, you might want to check out the xda developer's wiki (top left of your browser screen), and the wikipedia for some of these terms. But ask if you need more details!
V
Thanks
I will check out
btw, whats the WIKI stand for?
WIKI is a system whereby a knowledge base may be created and maintained by its users. The biggest use of it is wikipedia. Wikipedia says:
#########
Wiki
From Wikipedia, the free encyclopedia that anyone can edit.
Jump to: navigation, search
For other uses, see Wiki (disambiguation).
Wikibooks
Wikibooks has more about this subject:
Wiki Science
A wiki (IPA: [ˈwiː.kiː] <wee-kee> or [ˈwɪk.iː] <wick-ey> (according to Ward Cunningham) is a type of website that allows users to add and edit content and is especially suited for collaborative authoring.
The term wiki also sometimes refers to the collaborative software itself (wiki engine) that facilitates the operation of such a website (see wiki software).
In essence, a wiki is a simplification of the process of creating HTML pages combined with a system that records each individual change that occurs over time, so that at any time, a page can be reverted to any of its previous states. A wiki system may also provide various tools that allow the user community to easily monitor the constantly changing state of the wiki and discuss the issues that emerge in trying to achieve a consensus about the wiki content.
cool,man!
very useful
:wink:

[Q] FM Radio API or SDK?

I'm just starting to dive into App development for Android and one of the things high on my list to develop is an app to record FM radio. So far, I have not been successful in finding an API reference or SDK that allows me to interface with the FM radio. There is no mention of it in the Sprint Dev Guide for the EVO and a Google search hasn't gleaned much either. If anyone has or knows where I can find a good API reference or SDK for the BCM4329 chip that includes info about the FM radio, I'd greatly appreciate it.
I did a ton of searching on this. The only thing I ever found was in looking at the source code from the OS that was released by HTC. That st least showed the API and the example code for the FM radio app from HTC.
All that bring said, it really did not help me any since the sdk does not provide the api, I still could not code anything against what I found.
-frank
Sent from my PC36100 using XDA App
Thanks, that's kind of what I was afraid of... guess that explains why no one has released any alternative FM radio apps... i'll keep looking though...
Sent from my PC36100 using XDA App

[Q] nfc-tools on Android?

Has anyone tried porting anything based on libnfc (libnfc.org), such as nfc-tools (code.google.com/p/nfc-tools), to Android?
I've heard of the odd person or two managing to cross-compile libnfc for Android and get it working with an external reader, but I'm more interested in getting nfcutils and mfoc to run on my Galaxy Nexus...
Hi,
I was looking for the same thing as you.
Indeed some people succeeded to compile libnfc on android (android 2.3 if I remember well) and they have published a little outdated tutorial.
The problem that is their porting use libusb and permits to use an external NFC reader connected via the phone USB link.
I think you are most interested in using the internal one.
On my galaxy SIII, the NFC device seems to use an I2C link (the device is /dev/pn544). So you will need to make a libnfc "driver" for your device wich link to the I2C. I you look into libnfc code, you have some code to mange serial links but it seems a little experimental.
Moreover, there is already a driver and a lib that manage your NFC device, so you'll probably have some conflicts by trying to add libnfc.
The built-in lib is libnfc-nxp wich also includes drivers, hardware abstraction and a upper level libraries (called "FRI") providing services to manage cryptography, NDEF messages and so on. This lib is completely different from the linux libnfc.
So if you want to get lib-utils working, you will probably need to compile them after developing a wrapper between libnfc functions using libnfc-nxp. (or something like this)
In my knowledge, nobody did the job yet.
I found some tries to recode mfoc utility in an android apk but nothing functional yet (and there is often no recent activity of these projects).
Sorry.
I found this:
https://github.com/ehabkost/nfc-tools (last activity two years ago)
It appears the Android API lacks some features to get the mfoc running.
It may be possible to overcome this modifying the libnfc-nxp source in the android repo....... who knows.
Porting [nfc-tools] libnfc to Android 4.4.2
Does anyone have news about this ?
I did some research though but instead of creating a new thread, I ended up here.
if anyone is still interested, I have compiled libnfc and nfc-list from last commit on git and works on my Nexus 5 5.0.1
You can find here github.com/etmatrix/libnfc and github.com/etmatrix/libusb01 for libusb
I attached an usb device SCL3711-NFC&RW and nfc-list show me a Mifare Classic and SRIX4K.
I need to improve external module libusb, libnfc look at /tmp/libusb-0.1.12 for linking.
etmatrix said:
if anyone is still interested, I have compiled libnfc and nfc-list from last commit on git and works on my Nexus 5 5.0.1
You can find here github.com/etmatrix/libnfc and github.com/etmatrix/libusb01 for libusb
I attached an usb device SCL3711-NFC&RW and nfc-list show me a Mifare Classic and SRIX4K.
I need to improve external module libusb, libnfc look at /tmp/libusb-0.1.12 for linking.
Click to expand...
Click to collapse
Hey! I'm just trying to get into this issue, and I would really appreciate if you could help with some piece of advice
I've digged up all google, but all instructables are dated 2010-2012, I am sure that there should be some progress in this area! My goal is to flash libnfc to Android and make it use an internal nfs chip
Can you contact me? It would also be great to have a compiled file to install libnfc to my galaxy s3 and some explanation, because unfortunately I'm just a beginner in this, though a really ambitious
Thank you!
Bump.
Any news on this? I'd really like to be able to read my public transportation pass to see how much I have credit left (It is mifare classic 1k). There is no official app to read it either (nor unofficial for what I know).
You can try the app "västtrafikreader" or vasttrafikreader. You have to google it yourself.
Classik k1 efter carry heavy encryption wich makes is almost impossible to ream them. But in vasttrafikreader they got the keys for the swedish system and the cards can even be manipulated.
Its rather safe to say that you basicly cant carry out the hack w/o the proper keys.
There have been ports of mfoc and similar tools for Android in the past, but only for externally connected NFC-Readers, since the Android APIs don't allow the necessary access to the internally embedded NFC chips. The best app for working with Mifare Classic NFC chips is the "MTC - Mifare Classic Tool", which is available on the Play Store. It's open-source on GitHub and supports reading and writing to the chips if you add the keys to the dictionary file or if the sector you're trying to access uses one of the default keys. This app could totally be expanded with mfoc-like functionality, at least on rooted devices, but for now you have to run mfoc on the PC once to get the keys, add them to the dictionary and afterwards you're able to get full read/write access to all sectors of the specific chip from a supported Android handset (hardware-wise, depends on the NFC chip used).
hello, its been 4 yearsany news on an internally embedded NFC chips mfoc functionality ?

Card Emulation in general

Hi there,
right now I am researching for a possibility to emulate a smartcard with a smartphone. As we all know, the standard os and api won't let us do this. What I want to achieve is create a way to use the smartphone for physical access without the need to change the existing infrastructure. o achieve that, the smart phones gets a localy and time limited informationtoken it should present to the reader. In other words, I actually dont realy need access to the secure element, as any data would be temporary.
Right now I am a bit confused about this. Is there a way to use card emulation, without the need of a secure element? I have searched for different ways to acchieve this, but on many ends, I can't seem to find a definitv answer.
For example I stumbled on OpenNFC. They praise that they can acchieve card emulation. Yet, they don't provide any examples on this and fail to actualy deliver some sort of information on the requirements of this. As I understand it, it seems like this method only works when the smartphone uses Inside Secures Chips MicroRead or SecuRead. Anyone knows more about this?
I'm realy open to ideas on this one, as it seems theres little to no documentation or examples to go on.
I'd realy be happy to read about what you guys found out on this issue as of yet.
I've been looking into it too. This is what I have found:
EddieLeeDefcon20.pdf
nfcproxy
(Google them, I can't post links)
So, yeah, it can be done, but you have to modify android to be able to.
I ended up to OpenNFC too, but no sample code!
I have a good background on Mifare Classic 1K and 4K programming using RFM130 under linux and win.
Sent from my HTC One X using Tapatalk 2
Ok, so after browsing the mailinglist like a maniac I found this answer from one of OpenNFCs developers:
Hello,
The OpenNFC stack porting on Android complies to the Google API, as far as the applications are concerned.
Since these API do not allow an APK to do card emulation, it is not possible to use this mode on the Nexus,
nor on any Android phone, with or without OpenNFC.
However, OpenNFC provides card emulation feature for other porting (Win32, linux), depending on the hardware capabilities.
Kind regards,
Stephane
Click to expand...
Click to collapse
Source is on their mailing list on sourceforge, cant post link....
So seems we can forget this one... Only option would be using the Cyanogenmod patch that is used by NFCProxy.
When this message has been posted? I think things has changed (not sure)
Anyway, I posted a message yesterday to have more informations about their projects on Android
The Message is from March 29th, 2012.
Again as I said, if that has changed, they really have to work on their communication to the outside. There seems to be noone but the devs that can say anything about this. And that means quite a lot.
When there is no API for something, we can use native code and directly communicate to NFC hardware. Agree?
Sent from my HTC One X using Tapatalk 2
Well, the way I understand it is, that we could take a build of android and tinker with it to get it to work. We would have to change the NFC softwarestack and its interaction with the rest of the system in order to make software emulation possible. That is quite some pile of nontrivial work to do if you ask me.
Sorry for doing a new reply instead of editing the old one, but I think this is interesting enoug to not get overread.
I got an answer from the OpenNFC Developerteam regarding my question. Part of my question was also if it was possible to emulate for example a Mifare Tag through their NFC Stack. Here is the answer:
Hello XXXXX,
The Open NFC stack is designed to be largely hardware-independent, with a small adaptation module (NAL) for each hardware chipset. However, currently we only provide the NAL module for the MicroRead / Securead chipsets; therefore out of the box we are only compatible with these chipsets.
It is possible to emulate ISO 14443-4A and -4B cards and Type 4 tags from the Open NFC stack; for emulation of MiFare Tag, you’d indeed need to use a Secure Element.
Best regards,
Sebastien.
Click to expand...
Click to collapse
Hope this clears some questions regarding OpenNFC.

[MTCD/E/P] Radio app reverse engineered

Hey,
I created my own Lauchner and wanted to integrate the radio functions.
Since I didn't find any information on the internet about how the original app addresses the radio module, I reverse engineered the app.
To make it easier for others I decided to start an Android Studio project.
The project is only very basic to show how the radio module is controlled.
I also added an extension to it.
Using the RDS signal and a SQlite database the station name and logo are displayed.
I hope it is helpful to anyone.
I uploaded the project to Github:
-https://github.com/zebbel/MTCD-E_Radio-app
(Sorry I´m not allowed to post links)
Kind regards
David
Great work!
Hey,
I have compiled the CarManager module into a jar file for easier use in Android Studio projects.
To be honest I never tried to understand how it works exactly, because it just works :laugh:
I know that I downloaded the files somewhere on Github, but I have absolutely no idea where.
If the "creator" of the files is here please let me know so I can give him credit.
-https://github.com/zebbel/microntek_CarManager
(I need still more posts to create links )
Thank you very much for your work!
Thanks to your library I realized a widget that reads (and shows) the battery voltage value.
I have a question : do you have a complete list of "type" that can be used ?
In you example you attached to your handler the types:
- Radio
- KeyDown
In my case I used "CarEvent" :
Java:
CarManager carManager = new CarManager();
CarManagerHandler carManagerHander = new CarManagerHandler(this);
carManager.attach(carManagerHander, "CarEvent");
In this way my Handler is receiving all the CarEvents. The voltage is contained in the message tagged as "battery".
There are other types that we can use in order to catch other interesting events?
Thank you,
Salvo

Categories

Resources