FORUMS
Remove All Ads from XDA

Spirit1, Spirit2 Real FM Radio General Thread

7,827 posts
Thanks Meter: 4,164
 
By mikereidis, Inactive Recognized Developer on 1st May 2011, 09:23 PM
Post Reply Email Thread
17th May 2011, 09:41 PM |#201  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Quote:
Originally Posted by marinos35

What do you mean with other audio? When plugging/unplugging the earplugs at talk or a call or any other problem the audio switches from the one output to the other with no problems. When I try that at your program, it kills the first output but it doesn't enable the other. If I press the fm power button and reopen it, I regain the audio to the output which was already set at the android system.

Btw the other button is only for mute?

Sent from my HTC Desire using Tapatalk

OK, thank you, I'll try to find out what is happening when I have more time.

Yes, the button next to the power button is mute. It should show an X instead of "speaker sound waves" when muted.
 
 
17th May 2011, 10:35 PM |#202  
CR5N's Avatar
Senior Member
Thanks Meter: 110
 
More
Tried the recent package, but no good so far. PI shows -1 even on known good frequencies.
Couldn't see the two files in /dev/socket so guessing something not set up right. Got an exam tomorrow so not a lot of time today but will have a look in the next day or so.
18th May 2011, 03:30 AM |#203  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Quote:
Originally Posted by CR5N

Tried the recent package, but no good so far. PI shows -1 even on known good frequencies.
Couldn't see the two files in /dev/socket so guessing something not set up right. Got an exam tomorrow so not a lot of time today but will have a look in the next day or so.

OK, thanks.

I can throw a switch in the code and use network sockets instead of Unix sockets. I did that previously to avoid some permissions problems.
The Following User Says Thank You to mikereidis For This Useful Post: [ View ] Gift mikereidis Ad-Free
19th May 2011, 05:49 AM |#204  
Member
Thanks Meter: 3
 
More
Very cool, works great on my Evo running CM7.

Love how this one actually shows signal strength, station call name, song title, etc

Its like HD Radio Have one of those in my bedroom, but not in the car at all.
19th May 2011, 10:32 AM |#205  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Quote:
Originally Posted by error4o4

Very cool, works great on my Evo running CM7.

Love how this one actually shows signal strength, station call name, song title, etc

Its like HD Radio Have one of those in my bedroom, but not in the car at all.

Wonderful ! Thanks for your report..
19th May 2011, 10:46 AM |#206  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
EDIT: See this for v2.0.12: http://forum.xda-developers.com/show...&postcount=225

... A new version (not as wonderful as thought): v2.0.11. Not on the Market; only at the link below: (Now my focus is back to the audio issues.)

https://docs.google.com/leaf?id=0B7U...thkey=COq04IsL

Please try this version and let me know how it works for you. If you just install the package file and not the other 2 binaries, it should work as before, except: you must turn Bluetooth on manually before starting the app.


Major features of this version:

- Requires root: Improved HCI UART support to work around the proprietary Broadcom BT stack and provide much better speed and CPU efficiency. Now uses network sockets to avoid/fix permissions issues.

- Requires root: Direct HCI access via HCI sockets as a faster and more efficient method than using hciitool. Supported by same daemon (bcprp) as for HCI UART support.

- No longer writes constantly to SD Card (or worse internal storage). If used, the hcitool output now goes straight to a pipe in memory only.

- Service and app are much better behaved and can be completely terminated without crashing. App and service now completely terminate when power is switched off. This allows changing the HCI access mode between the 3 methods without rebooting.

- RDS and other event processing now pause when the screen is turned off or the app otherwise becomes non-visible. This should improve battery life.


Zip contains:

App: FMRadio_v2011.apk
Daemon: bcprp
Script: bcfm


The daemon modes (Direct HCI and HCI UART) require installing bcprp and bcfm to the /system/bin directory. They also both require SU root and an installed SDCard (for now at least). Direct HCI mode works on Broadcom or TI chips, but HCI UART mode is for Broadcom only at this time. Note that the first time you use these modes you will be prompted by SuperUser.apk to allow access. This will often create timing issues that should be solved by a reboot at worst.

For Direct HCI mode, the bcfm file can be used as is for either TI or Broadcom. For HCI UART mode the bcfm file must be edited. Check your /init.?.rc file where ? is name of your device. For example on my device it's /init.thunderg.rc. Look at the line starting with "service hciattach". On mine its:

service hciattach /system/bin/brcm_patchram_plus -d --baudrate 3000000 --patchram /system/bin/BCM4325D1_004.002.004.0218.0248.hcd --enable_hci /dev/ttyHS0

If yours actually runs the real hciattach, this approach might still work. Please let me know. Take those parameters and edt them into the bcfm file, but be SURE to remove the "--enable_hci" option. If you leave it in, the bcprp acts exactly like the original brcm_patchram_plus (more or less) and will try to start bluetooth.

Install:
adb remount
adb push bcprp /system/bin/bcprp
adb push bcfm /system/bin/bcfm
adb shell chmod 777 /system/bin/bcprp
adb shell chmod 777 /system/bin/bcfm

Install the app:
adb install -r FMRadio_v2011.apk

Start the app, and hopefully after 5-20 seconds it should start and work. You will be prompted for SU to start the daemon as root. If it doesn't work the first time, try re-booting. Check adb logcat for clues if it doesn't work.

One possible issue is permissions, although the new network socket API shouldn't have the issues that Unix sockets have.in /dev/socket. My CM port doesn't seem to have this issue, but I've seen it before. Possible solution:

adb shell chmod 777 /dev
adb shell chmod 777 /dev/socket


In order to use the Direct HCI access mode, you must rename hcitool, assuming it works for you. I use:

adb remount
adb shell mv system/xbin/hcitool system/xbin/hcit

Direct HCI access likely won't work unless hcitool also works, so it's not a solution for bad BT stacks.


I am able to switch back and forth between modes. To do so, turn the radio power off, then enable or disable bluetooth as desired. Restart the app and if BT is off it should go into HCI UART mode. Turn power off again, turn BT on and Direct HCI mode should be enabled.


Which mode is best ?

- The original HciTool mode is slowest/least efficient, requires BT on and works without root.

- Direct HCI access is much better, but requires BT on and a stack that supports HCI via bluetooth sockets.

- HCI UART mode is the fastest, and I think least prone to bogus data. It should be most CPU and battery efficient. Hopefully it should work on all Broadcom devices, even those with the proprietary BT stack. BUT it requires BT off.
19th May 2011, 11:01 AM |#207  
icke's Avatar
Senior Member
Flag Ahaus
Thanks Meter: 1,206
 
More
Hm...thank U for the update, but now I get FC on startup.
Version 2.09 was working fine for me.
HD2 with TyphooN_CM7_v3.3.0-MAGLDR.
19th May 2011, 11:17 AM |#208  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Quote:
Originally Posted by icke

Hm...thank U for the update, but now I get FC on startup.
Version 2.09 was working fine for me.
HD2 with TyphooN_CM7_v3.3.0-MAGLDR.

Hi,

Thanks for trying. Try a full phone reboot please.

If that doesn't help I presume you can re-install 2.0.9 from Market.

CC via PM.
19th May 2011, 11:55 AM |#209  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Reminder: In this 2.0.11 version, for normal BT access you MUST turn Bluetooth on manually.

Settings -> Wireless & networks -? Bluetooth and check the box. Personally I use the CM power widget; nice and quick for testing.
19th May 2011, 02:20 PM |#210  
idkidk's Avatar
Senior Member
Flag Piacenza
Thanks Meter: 45
 
More
Quote:
Originally Posted by mikereidis

A wonderful new version: v2.0.11. Not on the Market; only at the link below: (Now my focus is back to the audio issues.)

https://docs.google.com/leaf?id=0B7U...thkey=COq04IsL

Please try this version and let me know how it works for you. If you just install the package file and not the other 2 binaries, it should work as before, except: you must turn Bluetooth on manually before starting the app.


Major features of this version:

- Requires root: Improved HCI UART support to work around the proprietary Broadcom BT stack and provide much better speed and CPU efficiency. Now uses network sockets to avoid/fix permissions issues.

- Requires root: Direct HCI access via HCI sockets as a faster and more efficient method than using hciitool. Supported by same daemon (bcprp) as for HCI UART support.

- No longer writes constantly to SD Card (or worse internal storage). If used, the hcitool output now goes straight to a pipe in memory only.

- Service and app are much better behaved and can be completely terminated without crashing. App and service now completely terminate when power is switched off. This allows changing the HCI access mode between the 3 methods without rebooting.

- RDS and other event processing now pause when the screen is turned off or the app otherwise becomes non-visible. This should improve battery life.


Zip contains:

App: FMRadio_v2011.apk
Daemon: bcprp
Script: bcfm


The daemon modes (Direct HCI and HCI UART) require installing bcprp and bcfm to the /system/bin directory. They also both require SU root and an installed SDCard (for now at least). Direct HCI mode works on Broadcom or TI chips, but HCI UART mode is for Broadcom only at this time. Note that the first time you use these modes you will be prompted by SuperUser.apk to allow access. This will often create timing issues that should be solved by a reboot at worst.

For Direct HCI mode, the bcfm file can be used as is for either TI or Broadcom. For HCI UART mode the bcfm file must be edited. Check your /init.?.rc file where ? is name of your device. For example on my device it's /init.thunderg.rc. Look at the line starting with "service hciattach". On mine its:

service hciattach /system/bin/brcm_patchram_plus -d --baudrate 3000000 --patchram /system/bin/BCM4325D1_004.002.004.0218.0248.hcd --enable_hci /dev/ttyHS0

If yours actually runs the real hciattach, this approach might still work. Please let me know. Take those parameters and edt them into the bcfm file, but be SURE to remove the "--enable_hci" option. If you leave it in, the bcprp acts exactly like the original brcm_patchram_plus (more or less) and will try to start bluetooth.

Install:
adb remount
adb push bcprp /system/bin/bcprp
adb push bcfm /system/bin/bcfm
adb shell chmod 777 /system/bin/bcprp
adb shell chmod 777 /system/bin/bcfm

Install the app:
adb install -r FMRadio_v2011.apk

Start the app, and hopefully after 5-20 seconds it should start and work. You will be prompted for SU to start the daemon as root. If it doesn't work the first time, try re-booting. Check adb logcat for clues if it doesn't work.

One possible issue is permissions, although the new network socket API shouldn't have the issues that Unix sockets have.in /dev/socket. My CM port doesn't seem to have this issue, but I've seen it before. Possible solution:

adb shell chmod 777 /dev
adb shell chmod 777 /dev/socket


In order to use the Direct HCI access mode, you must rename hcitool, assuming it works for you. I use:

adb remount
adb shell mv system/xbin/hcitool system/xbin/hcit

Direct HCI access likely won't work unless hcitool also works, so it's not a solution for bad BT stacks.


I am able to switch back and forth between modes. To do so, turn the radio power off, then enable or disable bluetooth as desired. Restart the app and if BT is off it should go into HCI UART mode. Turn power off again, turn BT on and Direct HCI mode should be enabled.


Which mode is best ?

- The original HciTool mode is slowest/least efficient, requires BT on and works without root.

- Direct HCI access is much better, but requires BT on and a stack that supports HCI via bluetooth sockets.

- HCI UART mode is the fastest, and I think least prone to bogus data. It should be most CPU and battery efficient. Hopefully it should work on all Broadcom devices, even those with the proprietary BT stack. BUT it requires BT off.

Hi to all,

i'm tryng all of above for my galaxy tab, but i'm not able to install/use hcitool for get the correct service hciattach, i'm a little bit confused, any help?

Tia
Idk
19th May 2011, 03:10 PM |#211  
idkidk's Avatar
Senior Member
Flag Piacenza
Thanks Meter: 45
 
More
Quote:
Originally Posted by idkidk

Hi to all,

i'm tryng all of above for my galaxy tab, but i'm not able to install/use hcitool for get the correct service hciattach, i'm a little bit confused, any help?

Tia
Idk

quote myself

I've installed the hcitool, but when i try hciconfig, no resut....

Tia
Idk
Post Reply Subscribe to Thread

Tags
spirit fm radio receiver ota

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes