Setting Bluetooth to Always Discoverable - myTouch 3G, Magic Android Development

So I'm using Sanpei's 2.1 ROM, and it works beautifully.
But I want to set Bluetooth to be always discoverable. I know that it CAN be done with the SuperEclair ROM, via SupSetup.
However, I suspect that SuperEclair uses BlueZ 3.3, and Sanpei's is using 4.x.
I've edited the /system/etc/bluez/main.conf to set DiscoverableTimeout to 0, but that doesn't affect the timeout, even though it says it does.
Is there some app that forces bluetooth to stay visible? Or a config change to change the timeout to forever? There HAS to be some way to do this.

Related

GPS can't bound

How can I bound the GPS on my IMate with WM5?
It seems that the GPS program in the setting is not letting it connect.
I tryed to downgrade back to wm3 and everithing work fine.
Can I remove the GPS program? I can't find it in the remove program (because it come with the rom).
Please help me :-(
you don't need the gps settings in the connection tab. set programport to <none> and hardwareport to <none> and on the third tab don't set the option on.
then you should be able to use your gps as usual. Is it BT or wired?

Any method to 'fool' programs into using a Bluetooth GPS

We all know the Tilt's GPS is slow, uses a lot of battery, and often continues to use battery after exiting all programs using it unless you soft reset. So I use my bluetooth GPS.
Works great, for programs which have a com port setting. There are some which do not, some are on the todo list, but some other programs are no longer under development.
What I'd like to be able to do is to 'fool' any program into using the Bluetooth's com port. I have GPSGate listening to the bluetooth GPS and outputting to com1 so that I can run whatever number of programs using the GPS data on com1, but I can't get several Wifi scanners to use com1, can't get the camera's GPS feature to use com1, etc.
I've tried a few things like messing with the built-in GPS settings and changing them to com1 hoping programs might then access com1, tried setting GPSGate to com4 to see if programs would access it instead of the built-in, but I think when programs access the built-in device they don't access it on com4, they access it on GPD4 or such.. Anyway.
So again, how to make programs which you cannot specify a com port use GPSGate's com port? Or another program if necessary..
Thanks!
Bumping in case anyone missed it.
Thanks!
SOLVED! But not for the faint of heart.
The developer of BasicGPS pointed me to this URL when I was asking him if he could implement selecting the com port for the GPS, since I use GPSGate with a Bluetooth GPS, not the built-in one:
http://msdn.microsoft.com/en-us/library/bb202089.aspx
From this, following these steps, I was able to make the Intermediate Driver use COM1, therefore using GPSGate/Bluetooth! So far this works in BasicGPS and I'm pretty sure it works in the camera too, so probably works in every program! Good news for people who hate the built-in GPS as much as I do!
Here are the basic steps, but you'll want to read the URL above. It's really written for developers, which I am not, but it made enough sense for me.
I used Resco Explorer to browse into this registry key. I made a copy of the whole key, then browsed in.
HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Drivers
There is a key named CurrentDriver, which was set to GPSOneDevice, which is apparently my built-in GPS. So I made a copy of the whole GPSOneDevice registry key, named it GPSGate. Then went into that key, changed the InterfaceType from POLL to COMM and added a string called CommPort and set it to COM1: where GPSGate outputs its info. I also modified the FriendlyName to "GPSGate Bluetooth". Finally, I changed the CurrentDriver to reference my new GPSGate registry key, and voila!
I'm not 100% sure it's working, as the built-in GPS is warmed up and would respond fairly quickly, but in a few days I'm going to try the camera in GPS mode and see if it immediately gets a fix from my Bluetooth unit vs 5+ minutes with the built-in GPS.
That said, I've tried GPSTest, BasicGPS, camera, etc, all get a fix immediately and update with the Bluetooth GPS on. If I turn the Bluetooth GPS off, they all stop getting updates. Previously when I was trying to figure out how to do this, I would discover the built-in GPS was still being used because I'd turn off the Bluetooth GPS and programs would continue to get new GPS data. So this tells me it's working! I'll follow up again in a few days to say for absolute sure.
Yay!
Just a followup here.. I think it's working, but if I monitor the data on COM9 (bluetooth) or COM1 (GPSGate re-distributing COM9 data), the data streams in at a reasonable pace.. Perhaps 6k of data in 10 or so seconds.. I didn't measure it closely.
But when I monitor data on COM4 the data is very fast, after about 10s it was up to 60k and when I left a few different programs open for a while they either crashed, never got a real lock, or locked up.
So not sure why, but the string of bluetooth->gpsgate->intermediate driver is causing a LOT more data to be produced.
I wasn't planning on using the intermediate driver for applications, I am still going to use the COM1 port for that when possible, but I wonder about the stability of using the camera and/or other programs which can't change the com port with this configuration.
Oh well! So far the camera seems to pick up a coordinate very quickly and probably disconnects from the GPS, so it's probably fine.
I suppose if I were truly curious I could capture the NMEA data and compare between the two. If anyone can do that who is also curious, I can do it and attach the data. I wouldn't know what to look for.
Hi,
ok, perhaps I know the Problem why my intermediate driver doesn't do his job. I can find this key in my reg:
Code:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Drivers
But that is all. This key hasn't any values or subkeys. But why?
I'll try to find out the default Settings...
So. I've created following settings:
Code:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver
CurrentLogFile="\Temp\gps.log"
IsEnabled=dword:00000001
HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Drivers
CurrentDriver="TestFile"
HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Drivers\TestFile
File1="\Temp\test.nmea"
FriendlyName="File Test #1"
InterfaceType="File"
After creating settings I "rebooted" my device. Then I start my GoogleMaps-App and configured it to use "managed GPS".
Result: GoogleMaps didn't get data from test-file and I cannot find the log-file in Temp-Folder. What the hell is going wrong here?
YFI: If I configure GoogleMaps to use GPS an COM4 (115200 Baud) then all works fine.

[Q] Bluetooth: "Paired, but not connected"

I have installed pdanet on my BB9000 and have paired it with my gTablet but the tablet says "paired, but not connected." The goal is to share the data plan from the BB with the gTablet when Wi-Fi is not available.
Most of the solutions I have read are PC based (going into screens and settings I do not see on the tablet) or Android based (where the Android device is the phone with data access).
Is there an app that can install on the gTablet that allows for the pair to connect? Has anyone gotten the pairing to work with a Blackberry?
Sounds Familiar
That is the same thing I am trying to do, except my phone is a Samsung Jack (WM 6.5). I can tether my laptop so I know the phone will do it. Has anyone convinced the Tab to do this? I am using Vegan 5.1.1 with Clemsyn's latest kernel.
I hope this is still on subject:
I long to see the day when I can get a bluetooth keyboard to work. Any bluetooth keyboard.
The furthest I get is "Paired but not connected"
gTablet
TNT Lite v4.2.5
Same issue with 3g Slide and 2.1
Pairs just fine, but will not connect. Using PDAnet on the phone. Anyone know a work around? Other than rooting the phone that is? Not sure I am up for that challenge yet. I have TnT Lite 4.2.4 on my tab.
Ok. I had been chasing this for a while for a different reason. I use my Tab as GPS in the truck. Use either ShareGPS (to my DroidX) or an external BT GPS. I then use WiFI tethering to the DroidX for Data. This works fine except for when I get a call (I use a BT headset), the call is very very scratchy for a couple of minutes (interference between the wifi and the BT).
I wanted to use BT for data to eliminate the static on my headset when a call comes in.
I had all but given up on it, but today I ran across this post:
http://forum.xda-developers.com/showpost.php?p=8236341&postcount=16
I followed his directs of setting up a Gscript script and it works!
Now, for some reason 'Wifi Tethering for Root' will not do BT tethering on my Droid X (will probably work fine for other phones) but PDANet does!
I can now share my GPS signal and Data Signal from my DroidX to the G-Tab and not have any interference on my BT headset when I get a call (yes the data connection drops while on call, but that's a CDMA issue).
I've been trying to get this to connect with my Blackberry since November, and have had no luck at all. I've kind of resigned myself to the fact that it's just not possible with a Blakberry running BOS 5.X.
I do not believe any of the kernels / any of the ROMs support DUN on bluetooth. Which is the primary reason for not connecting. I believe the current crop of kernels / ROMs only support audio, and gps out of the box for Bluetooth , I believe i read in the accessories sub forum that with some app mini bluetooth keyboard is working.
manikin13 said:
I do not believe any of the kernels / any of the ROMs support DUN on bluetooth. Which is the primary reason for not connecting. I believe the current crop of kernels / ROMs only support audio, and gps out of the box for Bluetooth , I believe i read in the accessories sub forum that with some app mini bluetooth keyboard is working.
Click to expand...
Click to collapse
Please go read the instructions in the link i posted.
I have this working. I am doing bt dun throughvmy Dx
Im on tnt life 4.2.5
paired but not connected
If your BB is from AT&T they have the option turned off you need to tether your gtabelt to the BB.
If you do not have an AT&T BB you need to make a change to the config file on your blackberry desk top manager to activate it.
which code (and where)?
Z-B,
Which set of code did you use from your link, the first one or the second? Also, where do you insert the code?
I am on AT&T, but have already enabled USB tethering for my laptop so my issue should be isolated to the gTablet.
Ok, Here is what I did on mine:
On Phone:
Download PDANet and enable Bluetooth DUN (This should work with Wifi Tether for Root - But doesn't with my DX)
Pair G-Tab and Phone (I did the pairing from the G-Tab)
Download Gscript Lite.
Create a new script (Call it Bt Tether) - I does need SU access (there is a check box for this)
Put this in the script:
Code:
pand --connect <remote BT device hex address>
ifconfig bnep0 down
dhcpcd bnep0
setprop net.dns1 8.8.8.8
Don't know where to find BT HEX address on BB.
Note that this sets your route/connection at the underlying linux level. Android might still think you do not have a connection. I noticed this on a few apps (Voice Search was broken) I was able to browse the web & use Google Nav this way
Zaphod-Beeblebrox said:
Please go read the instructions in the link i posted.
I have this working. I am doing bt dun throughvmy Dx
Im on tnt life 4.2.5
Click to expand...
Click to collapse
Not sure but I believe we are saying thing. but that maybe my problem as I never did understand Zaphod!
GPS data, and Audio work, however true data (PAN - personal area network) does not work as far as I have found.
It does if you follow the above steps.
I just tried, followed the instructions, tracked down the bt address of my phone, put it in the script, turned off wifi on the tab, enabled the bt dun on the phone then -- nothing. The script returned the error "stderr: error:SIOCGIFFLAGS (no such device)". What did I do wrong?
Which rom are you on?
Vegan 5.1.1 with Clemsyn's latest kernel.
I am on TNT lite. It is possible that there is a system difference here, but unlikely.
While trying to diagnose this, I used Terminal emulator (or ADB Shell) and entered the commands from the script one at a time.
That should help you figure out which command is failing and we can look into why
Iterrors out at the "ifconfig bnep0 down command"
michaeljwestii said:
Iterrors out at the "ifconfig bnep0 down command"
Click to expand...
Click to collapse
I don't know much about the different Kernels. Its quite possible that some of the networking changes in Clemsyn's kernel changes the name of the BT adapter? Maybe it alters BT in other ways? I would suggest asking in his kernel thread.
Thanks I'll do that.

[Q] connect android to wifi with automatic configuration script

I Have a wifi at work, and i was able to connect to it but in order to surf the web the IE is set using an automatic configuration script, is there a way to configure my android to connect to this network.
I have a nexus one with rodriguez MIUI installed.
With MIUI, should be already included, probably you need to dig deeper into network configuration. Or just use something like TransProxy.
(Note: either way, you need to set the proxy address and port manually, the WPAD javascript autoconfiguration thing certainly will not work.)
Thanks man. Is there a way of getting the proxy address and port knowing the ac script
Sent from my Nexus One using XDA App

[Q] Unable to use Bluetooth in "restricted Profile" with 4.3 (CM 10.2)

I'm really liking 4.3 and want a restricted profile to use in my car when I have my tablet mounted to my dash so that I don't need to type a password in to use music/nav/diag software. Problem I'm having is that some of the software that I use with a Bluetooth GPS will not work right because I can't get the Bluetooth working in the restricted profile. When I turn on the BT it looks like it is going to turn on, but turns back off. From the owner account I've looked at the paired devices to see if any of them had a new setting to allow restricted user access, but no luck. I've turned on the BT radio from the owner account, but when I switch to the restricted profile it turns off.
Anyone know of a file that can be tweaked to allow this to work, or if I've overlooked allowing access to some app I didn't connect with BT for the restricted user.
Can anyone test and confirm they also have this problem or not? I only have one device running 4.3 right now so I can not test much on my own. I've not seen much info on all the restrictions and settings to adjust restricted profiles.
I have the same problem with my Nexus 7 (2012) running stock 4.4.

Categories

Resources