maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   FM Transmitter Mod (https://talk.maemo.org/showthread.php?t=46953)

carlit0x 2010-04-03 15:36

Re: FM Transmitter Mod
 
when i run this command /usr/share/lfocus/v4l2-ctl -d /dev/radio0 -f 87.5

it says /bind/sh: /usr/share/lfocus/v4l2-ctl NOT FOUND

but its there! i browse into that folder and the file is there! what am i doing wrong?

Flandry 2010-04-03 15:43

Re: FM Transmitter Mod
 
Quote:

Originally Posted by LiLCLEMO (Post 593826)
hi, i bought the zune player with the fm transmitter in new york when i went and that went down to 87.5 thats why i wanted the phone to go as low as that, so im sure they will be alright with it

Well, no, i don't expect the FCC to hunt you down like a dog, but it seems pretty clear from what i read that consumer devices aren't approved for that range in the US, and Nokia's stance on it reinforces that conclusion.

If someone who's actually a lawyer knows more about this i'd be interested in hearing.

assetburned 2010-04-03 17:06

Re: FM Transmitter Mod
 
Quote:

Originally Posted by Flandry (Post 593161)
For those interested, here's my post about this subject when it came up awhile ago. Nokia's official position is to leave it as is due to legal reasons. If you live in the US, making this change is probably breaking a federal law and subject to fine and confiscation of your N900. :eek:

hmpf sometimes laws (or marketing) are so..... unrealistic.
I mean it is the same as with the Apple Airport access points. Just change the country setting, from the country where you life to another and .... woops why can i use more channels now?!

The phone is capable to use these frequencies, the software is installed to use them... heck just add a country called "planet pluto" or something and switch off all the restrictions there.
If the user is using it is his problem.
it was also forbidden to use FM transmitter in germany for a long time, but you could get them in every electronic store "you are not allowed to use it in germany....(and a very long list of other countries)"

carlit0x 2010-04-03 17:30

Re: FM Transmitter Mod
 
can someone answer me please? thank you!

assetburned 2010-04-03 22:06

Re: FM Transmitter Mod
 
maybe it isn't an executable file?
or at least not for a normal user?!

carlit0x 2010-04-03 23:37

Re: FM Transmitter Mod
 
i wrote sudo gainroot before but i dont know, im a windows user, i know about DOS but almost NOTHING of linux :(

carlit0x 2010-04-04 17:22

Re: FM Transmitter Mod
 
done, i was misstyping something, i made copy and paste and it worked! now how can i edit fmboost to include it in autorun?

carlit0x 2010-04-04 17:45

Re: FM Transmitter Mod
 
already edited fmboost trough winscp ! now you r0x my friend! thx for this smart solution! :) (L)

ppriyank 2010-04-04 18:00

Re: FM Transmitter Mod
 
Quote:

Originally Posted by mzanetti (Post 585212)
The transmitters properties (such as the current frequency) can be changed using a tool called v4l2-ctl. I have found a binary compiled for the N900 in this thread:
http://talk.maemo.org/showthread.php?t=46427
Go there, download and install the provided package (lfocus).

After installing lfocus you should have the tool v4l2-ctl installed in /usr/share/lfocus/v4l2-ctl.




DO i download all of the files?
( lfocus_0.305-3_all.deb (156.7 KB, 72 views)
lfocus_0.305-4_all.deb (163.1 KB, 132 views)
lfocus_0.307-1_all.deb (164.4 KB, 101 views)
lfocus_0.308-1_all.deb (170.3 KB, 103 views)
lfocus_0.309-1_all.deb (171.1 KB, 391 views)
)

Or do i only need any one of them?

THanks for mod tho! looking forward to using it in NY...cuz i can't find a station that plays the music clearly in my 2003 corolla. I noticed have to hold the phone and point it towards the rear right window (while i drive) and the sound is clear, but when i bring it in the front its not clear...and the whole charging while the fm transmitter is on, kills the sounds, so for now i don't charge my phone while teh FMTX is on. But i'm hoping if i change the frequency to say 87.5 (currently i can only select 88.1) then i might be able to find a clean station to send the signal too.

THANKS ONCE AGAIN! :)

carlit0x 2010-04-04 18:04

Re: FM Transmitter Mod
 
you only need ti install lfocus_0.309-1_all.deb , download it from the phone and execute the file, then app manager will do the work for you

ppriyank 2010-04-04 18:09

Re: FM Transmitter Mod
 
Quote:

Originally Posted by carlit0x (Post 595195)
you only need ti install lfocus_0.309-1_all.deb , download it from the phone and execute the file, then app manager will do the work for you

thanks for the quick reply...will give it a go and report back!!!

ppriyank 2010-04-04 18:22

Re: FM Transmitter Mod
 
Quote:

Originally Posted by carlit0x (Post 593842)
when i run this command /usr/share/lfocus/v4l2-ctl -d /dev/radio0 -f 87.5

it says /bind/sh: /usr/share/lfocus/v4l2-ctl NOT FOUND

ITs giving me the same error, (how do i copy/paste in X-Terminal?) i checked what i typed, and it matches to what it says in the guide...but still no luck...re-starting my phone and will try again see if it works (i didn't restart it after i installed the ifocus).

carlit0x 2010-04-04 18:43

Re: FM Transmitter Mod
 
use copy and paste, you can paste on xterminal clicking on the top of the app

ppriyank 2010-04-04 19:09

Re: FM Transmitter Mod
 
NVM got it...forgot to turn on the FMTX before i put the command in X-Terminal!!!

how can i edit the fmboost file? when i try to open it with gpe-manager (with root) i am unable to open the file (i have leafpad installed in my n900) but i cannot select it (via open with...), so i cannot edit the fm-boost?

How can i get around this? i have MC installed as well, but have no clue as to how i can use it! :( (obviously imma noob)

thanks for your help!!!

cardiff-blues 2010-04-04 20:48

Re: FM Transmitter Mod
 
Quote:


Here is an example of mine:
Code:

#!/bin/sh
/bin/echo 120 > /sys/class/i2c-adapter/i2c-2/2-0063/power_level
/usr/share/lfocus/v4l2-ctl -d /dev/radio0 -f 87.5
exit 0

If you are using simple-fmtx-widget and have set it up to execute fm-boost you can now turn on your fm transmitter and immediately tune it down by just tapping the widget.

Have fun!
when you have followed all the instructions and added the above to the correct file - shoul you be able to change the frequency to 87.5 with the simple fm widget?

Mine will only go down to 88

ppriyank 2010-04-04 20:49

Re: FM Transmitter Mod
 
WOW finally managed to fix the boost file via MC, but when i try to use the fm transmitter, I still cannot select 87.7 as a frequency...the lowest is still 88.1 what gives?

sachin007 2010-04-04 21:09

Re: FM Transmitter Mod
 
I have the transmit widget with the boost. So how do i mod my fm transmitter to frequencies less than 88.1 with a single press of the transmit widget?

Thanks

mzanetti 2010-04-04 23:15

Re: FM Transmitter Mod
 
Quote:

Originally Posted by sachin007 (Post 595437)
I have the transmit widget with the boost. So how do i mod my fm transmitter to frequencies less than 88.1 with a single press of the transmit widget?

Thanks

it is actually already written in my previous post. if you don't know how to edit a file on the N900 try this:

there are different editors available. I for one prefer "nano". other options are "vi" (a bit more complex) and afaik midnight commander or "mc" for short. The following steps will explain how to edit files using nano.

Get superuser (root) rights. Install rootsh if not done yet, open the terminal and type
Code:

sudo gainroot
Install nano
Code:

apt-get install nano
Answer any questions with "y" for yes.

Next, open the file you want to edit, in this case /sbin/fm-boost
Code:

nano /sbin/fm-boost
You can now edit the contents of the file. after you are done type ctrl+x to exit the editor. A question will pop up on the bottom asking you if you want to save your changes. Type "y" and press enter and you are done.

YoDude 2010-04-04 23:42

Re: FM Transmitter Mod
 
Quote:

Originally Posted by mzanetti (Post 585212)
Yay! Got it!

According to the drivers documentation found on http://www.mjmwired.net/kernel/Docum...nux/si4713.txt the transmitters lower range is 76 MHz. However, the limit on mine is set to 87.5 MHz. I guess this depends on where you bought the device as 87.5 is also the lower limit here in Germany.

You can check the limits on your device/region by executing
Code:

cat /sys/class/i2c-adapter/i2c-2/2-0063/region_bottom_frequency
The transmitters properties (such as the current frequency) can be changed using a tool called v4l2-ctl. I have found a binary compiled for the N900 in this thread:
http://talk.maemo.org/showthread.php?t=46427
Go there, download and install the provided package (lfocus).

After installing lfocus you should have the tool v4l2-ctl installed in /usr/share/lfocus/v4l2-ctl.

Now start your FM transmitter. v4l2-ctl will work only while the transmitter is on.

Set the frequency by executing the following command as root:
Code:

/usr/share/lfocus/v4l2-ctl -d /dev/radio0 -f 87.5
This will set the frequency to 87.5 MHz. Change the value to your desire within the valid range.

PLEASE INFORM YOURSELF ABOUT THE LOCAL REGULATIONS FOR FM TRANSMITTERS AND MAKE SURE THAT YOU DO NOT VIOLATE THEM!!!

Optionally you can change fm-boost to switch frequency every time by adding the above command in the file /sbin/fm-boost. Make sure you insert it after the "#!/bin/sh" and before "exit 0"

Here is an example of mine:
Code:

#!/bin/sh
/bin/echo 120 > /sys/class/i2c-adapter/i2c-2/2-0063/power_level
/usr/share/lfocus/v4l2-ctl -d /dev/radio0 -f 87.5
exit 0

If you are using simple-fmtx-widget and have set it up to execute fm-boost you can now turn on your fm transmitter and immediately tune it down by just tapping the widget.

Have fun!

You da man!
...and why yes, I am having fun. :)

Just so everyone is clear on this, Installing lfocus with the v4l2-ctl tool will not magically add lower station indicators to the FM transmit tuner.

It will however, allow V4l2-ctl to change the frequency via the command line. In fact, when it makes this change you won't see any difference in the tuner. If the last frequency you had it tuned to was 106.5, it will still show 106.5. However, the N900 will now be transmitting at the frequency specified by the command you or your script entered..

The ideal set up would be to change the FM-Boost script and add the command line to it as shown in mzanetti's post.

I did this and don't even mess with ifocus or the command line once ifocus was installed. Just plug in your charger, fire up Media player, tune to 87.9 in your car, make sure FM transmitter is enabled, and then push the FM-Boost button on the desktop.
BAM! Wall to wall sound dude.

In the US the 87.5 frequency has been reassigned by the FCC for digital TV broadcasting. 87.7 is the DTV buffer frequency and 87.9 would be the FM radio buffer frequency. As a result of this reassignment, newer radios and the N900 do not tune below 88.0 as built.

So IMHO, (I am not a lawyer, nor do I play one on TV.) if you are going to use one of these reassigned frequencies, be a good neighbor and stay out of the assigned DTV freq. of 87.5. If you stick with 87.9 and there are men in black driving the highways in vans with antennas sticking out of them like porcupines, the squawk they here as they drive by your set-up could be construed as just FM frequency bleed and not some one intentionally jamming an FCC assigned channel.

Edit: Through some more reading I now believe 87.9 is still an assigned FM frequency... No one uses it commercially because now most new car tuners won't go below 88.0.

sachin007 2010-04-04 23:46

Re: FM Transmitter Mod
 
Quote:

Originally Posted by mzanetti (Post 595583)
it is actually already written in my previous post. if you don't know how to edit a file on the N900 try this:

there are different editors available. I for one prefer "nano". other options are "vi" (a bit more complex) and afaik midnight commander or "mc" for short. The following steps will explain how to edit files using nano.

Get superuser (root) rights. Install rootsh if not done yet, open the terminal and type
Code:

sudo gainroot
Install nano
Code:

apt-get install nano
Answer any questions with "y" for yes.

Next, open the file you want to edit, in this case /sbin/fm-boost
Code:

nano /sbin/fm-boost
You can now edit the contents of the file. after you are done type ctrl+x to exit the editor. A question will pop up on the bottom asking you if you want to save your changes. Type "y" and press enter and you are done.

I tried to install nano via xterm but could not because it says it needs 310 mb. Anyway i am going to hold on until someone makes the change in the fm boost program.

Thanks for the help guys.

mzanetti 2010-04-05 00:18

Re: FM Transmitter Mod
 
if you can't or don't want to install nano for whatever reason you still can use vi which is preinstalled on every linux machine. Please note that vi is one of the oldest editors ever. it was written when computers still had smaller keyboards and were lacking arrow keys, number pads and the like. Because of this vi is a bit funky to use for beginners but very powerfull once you get used to it. Here is a small how to how to use it.

Open the file you want to edit (again, get superuser rights before that if you need to edit system files)
Code:

vi /sbin/fm-boost
Now you can see the contets of the file bu you cannot edit it yet because vi is in navigation mode. Press "i" to switch to insert/edit mode. Now you can edit the contents. After you are done, press Esc to leave insert/edit mode. Now type ":" to enter command mode. Type "w" to write (save) your modifications and then "q" to quit vi. If you have messed up the file and dont want to save your mdifications type "!" instead of "w". The line on the bottom should show ":wq" if you want to save and quit or ":q!" to just exit without saving your changes. Hit enter to actually execute the command. You can also use only ":w" to write the changes without exiting. Google for vi reference list for a complete list of vi commands. They are also available in form of mouse pads or mugs :)

mzanetti 2010-04-05 00:32

Re: FM Transmitter Mod
 
Quote:

Originally Posted by ppriyank (Post 595215)
ITs giving me the same error, (how do i copy/paste in X-Terminal?) i checked what i typed, and it matches to what it says in the guide...but still no luck...re-starting my phone and will try again see if it works (i didn't restart it after i installed the ifocus).

To avoid typos in linux terminals and write way faster make extensive use of the Tab key. It features a very powerfull autocompletion. But I warn you: Once you get used to it you will get sick every time you open a DOS command prompt :D

YoDude 2010-04-08 04:00

Re: FM Transmitter Mod
 
Quote:

Originally Posted by mzanetti (Post 585212)
Yay! Got it! ...

<the crowd goes wild>

...Optionally you can change fm-boost to switch frequency every time by adding the above command in the file /sbin/fm-boost. Make sure you insert it after the "#!/bin/sh" and before "exit 0"

Here is an example of mine:
Code:

#!/bin/sh
/bin/echo 120 > /sys/class/i2c-adapter/i2c-2/2-0063/power_level
/usr/share/lfocus/v4l2-ctl -d /dev/radio0 -f 87.5
exit 0



Have fun!

Now the million dollar question:

can a line be added to /sbin/fm-boost that will also enable the FM transmitter?

This way we can have one button to rule them all! :D

cardiff-blues 2010-04-10 22:03

Re: FM Transmitter Mod
 
Strange behaviour testing this. I set it to 87.5 which works fine for the most part but sometimes I start picking up a black radio station apparently on that frequency. Now the odd thing is the station is fairly strong on that frequency but if I unplug the N900 charger from the car's cigarette lighter the station disappears.

It seems that the car cigarette charger is affecting the performance of the FM transmitter. Is there a specific type of charger that can be purchased that doesn't produce this sort of scenario?

thatgadgetgirl 2010-04-11 12:16

Re: FM Transmitter Mod
 
Quote:

Originally Posted by cardiff-blues (Post 604694)
Strange behaviour testing this. I set it to 87.5 which works fine for the most part but sometimes I start picking up a black radio station apparently on that frequency. Now the odd thing is the station is fairly strong on that frequency but if I unplug the N900 charger from the car's cigarette lighter the station disappears.

It seems that the car cigarette charger is affecting the performance of the FM transmitter. Is there a specific type of charger that can be purchased that doesn't produce this sort of scenario?

Mine won't let me be plugged in to the cigarette charger and use the fm transmitter at the same time....it tells me "please remove from charger"...weird

R4z8r 2010-04-12 18:27

Re: FM Transmitter Mod
 
Hey everyone,

first of all thanks for this thread, really helped me out to get normal sound out of my speakers in my car!

Secondly, I've tried to edit the fm-boost file to make it set the frequency to 87.5 automatically, but that didn't work for me. Now I've made 2 files, to start everything automatically;

- setfmfreq.desktop file inside /usr/share/applications/hildon for starting it via one single click. Content of that file is:

Quote:

[Desktop Entry]
Encoding=UTF-8
Name=Set Frequency
GenericName=Set FM Transmitter signal to 87.5
Exec=osso-xterm "sh /home/user/StartFM.sh"
Icon=fm-boost-64
X-Osso-Type=application/x-executable
X-HildenDesk-ShowInToolbar=false
Terminal=true
Type=Application
StartupNotify=true
- StartFM.sh inside /home/user which contains:

Quote:

/usr/bin/fmtx_client -p 1
/bin/echo 120 > /sys/class/i2c-adapter/i2c-2/2-0063/power_level
/usr/share/lfocus/v4l2-ctl -d /dev/radio0 -f 87.5
I've created this to make everything set for 87.5( since I'm on the road alot that's the only frequency I can really use ). Now is my problem that I also want to start the mediaplayer and play a song automatically as well. When I try to start the media player via xterminal/script it just never comes up( only comes up when I press on "Mediaplayer" on my desktop or inside my menu for some reason ). Does anyone have experience with this?

YoDude 2010-04-13 00:55

Re: FM Transmitter Mod
 
Quote:

Originally Posted by R4z8r (Post 607302)
Hey everyone,

first of all thanks for this thread, really helped me out to get normal sound out of my speakers in my car!

Secondly, I've tried to edit the fm-boost file to make it set the frequency to 87.5 automatically, but that didn't work for me. Now I've made 2 files, to start everything automatically;

- setfmfreq.desktop file inside /usr/share/applications/hildon for starting it via one single click. Content of that file is:



- StartFM.sh inside /home/user which contains:



I've created this to make everything set for 87.5( since I'm on the road alot that's the only frequency I can really use ). Now is my problem that I also want to start the mediaplayer and play a song automatically as well. When I try to start the media player via xterminal/script it just never comes up( only comes up when I press on "Mediaplayer" on my desktop or inside my menu for some reason ). Does anyone have experience with this?

I have done as I think you meant. I made two files containing the appropriate scripts and then placed them in the directories you specified and have rebooted.

I was expecting to find two FM Boost icons in my application manager. One for "FM Boost" proper and one for your "Set Frequency" or "StartFM".

Am I warm?

I only have the original FM Boost app showing and it behaves as it always did.

I know I'm slow like that so please straighten me out. :eek:

YoDude 2010-04-13 00:58

Re: FM Transmitter Mod
 
Quote:

Originally Posted by thatgadgetgirl (Post 605319)
Mine won't let me be plugged in to the cigarette charger and use the fm transmitter at the same time....it tells me "please remove from charger"...weird

Does it say "Charger" or just USB?

Mine will sometimes say "FM Transmitter can not be used while the USB port is in use" or somesuch...
A reboot has fixed it the 2 or 3 times I encountered it.

R4z8r 2010-04-13 07:33

Re: FM Transmitter Mod
 
Quote:

Originally Posted by YoDude (Post 607831)
I have done as I think you meant. I made two files containing the appropriate scripts and then placed them in the directories you specified and have rebooted.

I was expecting to find two FM Boost icons in my application manager. One for "FM Boost" proper and one for your "Set Frequency" or "StartFM".

Am I warm?

I only have the original FM Boost app showing and it behaves as it always did.

I know I'm slow like that so please straighten me out. :eek:

Yeah, you're warm. The problem of my script is that it cant start mediaplayer automatically, when I try to start it via my script mediaplayer just crashes.

YoDude 2010-04-14 02:07

Re: FM Transmitter Mod
 
Quote:

Originally Posted by R4z8r (Post 608101)
Yeah, you're warm. The problem of my script is that it cant start mediaplayer automatically, when I try to start it via my script mediaplayer just crashes.

OK... baby steps then. :)

The problem with Media player may be that it needs to be up and running before FMTX is invoked.

If that command is removed, do you have a script capable of starting FMTX, invoking the power increase, and setting the frequency?

The reason I ask is that Quick Launch by Daniele Maio is available in testing. It puts 4 configurable buttons to launch apps from on the Status menu.

http://i.imagehost.org/0704/screenshot19.png

Now I don't have to go back to the desktop to launch FM Boost. :)

If you have a working script, we could eliminate one more step for now, and work on the media player problem later. Perhaps a just programed script pause is needed...

In fact my ideal set up would be to use 4 different copies of your script for different frequencies depending on where I am at.

Quick Launch could be like radio presets for me. :)

There are two problems I have found using the 87.5 ~ 87.9 frequencies.

The first is that in my city 87.5 is used by a local DTV station. Most of the time this isn't a problem but the stretch of road I sometimes drive runs right along the antenna farm. There is about a 7 mile length of road where I receive a "pulsed" kind of interference and a 1 mile length where everything is flooded with white noise.

The other problem is that the lower frequencies seem to be more suseptable to RF emitted by the cars various electric motors like the windshield wipers. On rainy days I kick it up to 106.5 to reduce this.

BTW, how come I didn't get another copy of the FM Boost icon on my desktop?

R4z8r 2010-04-16 10:05

Re: FM Transmitter Mod
 
Well, 87.5 is free around here and is giving me CD quality, so I'm very satisfied with the result :)

You need to place the .desktop file inside /usr/share/applications/hildon if I remember correctly. Then you'll get another desktop icon. Otherwise search for .desktop files via "find / -name *.desktop".

Also, you can also make other usefull stuff with this little changes, like terminal which uses root by default so you won't need to type "sudo gainroot" anymore :)

Crogge 2010-05-10 23:45

Re: FM Transmitter Mod
 
It would be nice to see it as a small application, 87.5 is a way better frequency.

paulkoan 2010-05-10 23:56

Re: FM Transmitter Mod
 
Quote:

Originally Posted by R4z8r (Post 607302)
Now is my problem that I also want to start the mediaplayer and play a song automatically as well. When I try to start the media player via xterminal/script it just never comes up( only comes up when I press on "Mediaplayer" on my desktop or inside my menu for some reason ). Does anyone have experience with this?

This is because mediaplayer is already loaded I think. Instead of calling mediaplayer with a file, you might want to try a dbus call (from the wiki):

Code:

dbus-send --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"file:///$1"

Crogge 2010-05-27 03:23

Re: FM Transmitter Mod
 
Dead topic :/

Raubtier 2010-05-27 12:43

Re: FM Transmitter Mod
 
im confused with one thing:

i downloaded the fm transmitter, the boost and the fm transmitter desktop widget that turns it off and on (and the boost) and lets you choose the frequency.

does this desktop widget also replace the fm transmitter app in its entirety meaning that i can deinstall the fm transmitter app?

arbitrabbit 2010-06-03 23:46

Re: FM Transmitter Mod
 
Just in case anyone who made the mod to fm-boost to change the frequency to 87.5MHz automatically and is wondering why it doesn't work anymore, you need to change your /sbin/fm-boost from
Code:

/usr/share/lfocus/v4l2-ctl -d /dev/radio0 -f 87.5
to
Code:

/opt/lfocus/v4l2-ctl -d /dev/radio0 -f 87.5
as the lfocus package has been optified now

salah99 2010-06-04 05:34

Re: FM Transmitter Mod
 
can you guys create a small application for normal users?? :D

jesuska 2010-06-17 15:19

Re: FM Transmitter Mod
 
Woah thanks !! ! You saved me =)

te37v 2010-07-11 20:33

Re: FM Transmitter Mod
 
Quote:

Originally Posted by salah99 (Post 698934)
can you guys create a small application for normal users?? :D

i second this. bump :D

OptX 2010-07-12 12:47

Re: FM Transmitter Mod
 
I dont get the transmitter to 87.5 :(
When i do this 'cat /sys/class/i2c-adapter/i2c-2/2-0063/region_bottom_frequency' i get 87500 , but still nothing on my radio.
The 87.5 cant be choosen in FM-Transmitter. Is this ok ?


All times are GMT. The time now is 12:51.

vBulletin® Version 3.8.8