I'm developing, for XDAII and in eVC4/Win32, an application that opens a serial port for incoming Bluetooth. The Bluetooth Manager sets COM4 as active port number, but my call:
CreateFile(TEXT("COM4:"),GENERIC_READ | GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);
fails with error message "The specified network resource or device is no longer available".
When I then try to call:
RegisterDevice(TEXT("COM"),4,TEXT("ASIC5_BTUR.Dll"),0))
also this call fails.
What am I doing wrong ? When I look in the Register [HKEY_LOCAL_MACHINE\Drivers\Active] I find no COM4 active so there is no obvious reason why this call should not work. Have the BTHTools1100 patch installed !
Hello, I am experiencing similiar problems. Have you resolved yours ? If yes, could you show me how you open your ports etc.?
read this :
http://forum.xda-developers.com/viewtopic.php?t=1263&highlight=
I am not sure how your link to COM1 prolems regaqrding signals sould help me. My problems are with opening Bluetooth SPP ports, those that show up as the Inbound and Outbound COM ports.Though I would think that both are active, üsing CreateFile() I can open only the Incoming one (COM4) while I receive an INVALID_HANDLE_VALUE for the other one (COM5).
I just saw some info on com ports being inactive as well as a test program so I thought I'd mention it. Didn't mean to provide a solution, sorry
I tried to get the Bluetooth working and also had trouble. I think the inbound and outbound comm ports is to do with if you are using your SPP device as a client or server. It is not as a lot of people think that TX and RX data are on different Comm ports.
I cound not get Bluetooth working at all using my original XDAII rom of 1.60. I downloaded Pocket Bluetooth Tools http://www.bluetooth.jazztel.es/ and then it worked easy on Comm7.
I recently upgraded my XDAII Rom to 1.72 and I tried the Bluetooth support again. This time the XDAII even said I am connecting to a serial SPP device and automatically allocated the Comm port. But I must say my program could still not transfer data correctly using it. It all got stuck in some initilisation sequence. Now that may of been my software so I don't want to blame the XDAII.
All I know is I installed Pocket Bluetooth tools again onto my 1.72 XDAII and all worked fine again on Comm7.
A friend of mine has a new XDAIIs and the inbuilt bluetooth support on that worked 100% first time, no need for the Pocket Bluetooth Tools on that. So I think the problem is with the XDAII and it's built in SPP support.
Had the same problem, resolved it:
Strange but true, but on XDA2 etc, in order to receive COM Bluetooth, you have to open the outgoing port as shown in the Systems Bluetooth settings (You have to tick it there, too, of course), not the incoming.
Then, as it is blocking, you have to create a thread that listens on the port.
You cannot use RegisterDevice for a port number (in your case COM4)that is already used and open.
Phil
OOPS.... and you have to call OpenFile(), not CreateFile() !!!!!!!!!!!
Hi,
i have a serious Problem with my german T-Mobile MDA-II:
Everytime i place a phonecall and even if my phone rings and i don't pick up it automatically enables Bluetooth.
The little blue symbol in the bottom-right corner of the today-screen is normally stroken by a red line, but after any gsm-operation the red line is gone and after double-clicking it say Bluetooth enabled.
The only gsm-operation which doesn't enable Bluetooth is sending and receiving sms.
Anyone else having this kind of problem or is my device somehow broken?
(I did have PocketZenphone installed but did uninstall it after a few tests - could that be somehow related?)
any answer would be nice! (standby-time is pretty low if bluetooth is always enabled but not needed)
kind regards,
alpha
mine does that too
and no turning on software is not a sign of hardware failure
smoking and open flames and not being able to hardreset is a sign of hardware failure though
i think mine started to do that after in installed bluetooth tools that free upgrade
from what i can read then it have something to do with support for bluetooth headset where it is required for the phone to turn on bluetooth when a call is recieved in order for the blue tooth headset to work
ok thanks,
maybe i should crawl the registry for a hint.
the notifications-database doesn't contain bluetooth related items!
but the software-idea seems strange because i don't even know that software you installed...
I believe he is speaking of Pocket BlueTooth Tools by Towa. One of the features of this software is that it turns BT off between calls, and then on again when a call is received - presumably to save battery life. Look in Start -> Settings -> System -> Remove Programs and see if it is listed there.
Hi,
I've installed the update for Navipanel hoping it would work now, even though I don't have the CU-S400. I start the Navipanel.exe from the exe in the Windows folder, and it starts up as expected. When I try to make a call the dialer always switches to portrait even though Navipanel is in landscape.
Could this be a dialer problem (I have the latest Energy ROM) or is it because I started navipanel by hand.
Anyone knows how to solve this? Is there a registry key that forces the dialer to stay in landscape mode? Or is there something I can do with the microusb power connector (short pins?) to force the landscape mode?
It would be great if anyone is able to give me some details on registry changes when the CU-S400 connects (can be detected using SKTracker) so I can maybe write a utility/tool force this mode without the actual carkit.
Any help is apreciated, I hate it when the device return to portrait while I'm driving.
Thanks in advance.
Edit: Nothing was available so I cooked up something myself. See post 31 for a cab file.
le_cactus said:
Hi,
I've installed the update for Navipanel hoping it would work now, even though I don't have the CU-S400. I start the Navipanel.exe from the exe in the Windows folder, and it starts up as expected. When I try to make a call the dialer always switches to portrait even though Navipanel is in landscape.
Could this be a dialer problem (I have the latest Energy ROM) or is it because I started navipanel by hand.
Anyone knows how to solve this? Is there a registry key that forces the dialer to stay in landscape mode? Or is there something I can do with the microusb power connector (short pins?) to force the landscape mode?
It would be great if anyone is able to give me some details on registry changes when the CU-S400 connects (can be detected using SKTracker) so I can maybe write a utility/tool force this mode without the actual carkit.
Any help is apreciated, I hate it when the device return to portrait while I'm driving.
Thanks in advance.
Click to expand...
Click to collapse
Its more of a quick work-around rather than a total fix, but have you tried Gyrator2? Its a program that allows the screen to rotate in pretty much all programs.
Hi,
I did, but it doesnt work; the dialer goes to portrait mode, and only switches to landscape again if I hold my phone in portrait and then to landscape again.
Is there noboby who has got it working and is willing to check somethings?
TIA,
Cheers,
/Cacti
I have htc car holder CU-S400 and for me it stays in the landscape even in dialer mode.
I have tried to start navipanel without car holder but then in dialer mode it goes to portrait.
I belive it is related to micro usb on car holder.I hope this will help.
It does, thanks. I've send you a PM.
Cheers,
/Cacti
I'm in Jakarta - Indonesia.
My car kit CU S400 has arrived yesterday, in navi panel mode can we use another program beside co pilot for navigation, how to choose or change the default (co pilot).
I've ask to support center and it's been 36 hours and still no answer to my question.
hope someone can help me.
regards,
Raymond Widya
Pinout?
chavonbravo said:
Well, it seems the registry that enables/disables NaviPanel is in HKLM\System\CurrentControlSet\Keypad\"IsCarKitMode" with dword 0 or 1. The file that controls this registry settings going on or off is HTCApplication.dll. The 'Keypad' key doesn't exist, so you'll have to add it and add the IsCarKitMode dword value.
I can't get it to work with my a2dp stereo headphones to connect automatically, but I think this is because when doing the bluetooth handshake, some flags must not be set that show it to be a car kit possibly. Only other option would be bthutil.dll after that and see what it does.
Click to expand...
Click to collapse
So, digging in some more I found this post. The IsCarKitMode registry key does exist on our HD2's, and changing it's value to 1 briefly brings up the Navipanel. But sometings ( I guess the HTC Application service) changes it rights back to 0, disableing the 'true' landscape mode. Disableing the service isn't an option I think; it handles much more then just the car kit mode. An looking at the DLL that handles the service (HTCApplication.dll) didn't give me much info; the IsCarKitMode strings didn't even exist in it.
So now I'm looking for the pinout of the CU-S400 micro USB connector. I know the three coper connections beside the SIM may have the answer, but I also found threads stating certain Mini2Micro USB adapters made the device think it's in car kit mode. Anyone with any input on how to hardwire this please speakup
TIA,
Cheers,
Cacti
Never mind, I got it working now
Thanks for all your help
I've got a working NaviPanel and landscape dialer even withou the CU-S400. It detects AC power, waits for my BT Carkit to connect and then starts NaviPanel. True landscape, even if the dialer is started and when a call comes in.
Now all I need to figure out why every navigation shortcut in NaviPanel adds the Show parameter to CoPilot, and how CoPilot knows need to Go Home, Show Recent places, Addresses of simply start.
Again, I need the help. this time from someone using CoPilot and who is willing to use SKTracker to find out what's going on. I almost have the perfect solution, I'm nearly there
TIA,
Cheers,
/Cacti
le_cactus said:
Thanks for all your help
I've got a working NaviPanel and landscape dialer even withou the CU-S400. It detects AC power, waits for my BT Carkit to connect and then starts NaviPanel. True landscape, even if the dialer is started and when a call comes in.
Click to expand...
Click to collapse
Would you like to share your setup ?
Go on le_cactus,and I am glad to see that you found solution for your problem.
I am sorry for didn't send you requested screenshot,but I was on trip and I didn't have good internet connection.
I hope you will find solution how to integrate alternative navigation system with navipanel,and I hope one of them will be GarminXT.
You know I really hate when someone says "I found a solution" and does not care enough to share the solution with others, but yet had to ask here in the first place. As for the navipanel, if you connect pin 4 to ground it will start up navipanel and let you use the dialer in landscape without it rotating to portrait first. Hope this helps others finding their way here for a solution.
duplicate sorry!
iBlade67 said:
You know I really hate when someone says "I found a solution" and does not care enough to share the solution with others, but yet had to ask here in the first place. As for the navipanel, if you connect pin 4 to ground it will start up navipanel and let you use the dialer in landscape without it rotating to portrait first. Hope this helps others finding their way here for a solution.
Click to expand...
Click to collapse
Yes that was Bl**dy annoying.
However here is the answer.
It is possible to modify any car power adapter to enable navipanel. You must indeed connect pin 4 to ground pin 5. However I have discovered it is not that simple, that did not work on my power adapter. The reason was this.
Most power adapters connect pins 2+3 (the USB data lines) together to identify that it is a charger capable of supplying higher power than a PC USB port. This enables "fast charge". with these pins connected the HD2 wont go into navipanel.
It is neccessary to remove the link between pins 2+3 and instead link 4+5.
This allows the HD2 to switch to navipanel mode and at the same time recognise there is a high power charger present!!
The pins look like this from the rear
* * *
* *
numbered
5 3 1
4 2
I hope this helps someone else looking for this solution. It would be great if you could buy a "proper" aftermarket car adapter for the HD2 that had this mod done!
Cheers all and enjoy!
bob_bournemouth said:
Yes that was Bl**dy annoying.
However here is the answer.
It is possible to modify any car power adapter to enable navipanel. You must indeed connect pin 4 to ground pin 5. However I have discovered it is not that simple, that did not work on my power adapter. The reason was this.
Most power adapters connect pins 2+3 (the USB data lines) together to identify that it is a charger capable of supplying higher power than a PC USB port. This enables "fast charge". with these pins connected the HD2 wont go into navipanel.
It is neccessary to remove the link between pins 2+3 and instead link 4+5.
This allows the HD2 to switch to navipanel mode and at the same time recognise there is a high power charger present!!
The pins look like this from the rear
* * *
* *
numbered
5 3 1
4 2
I hope this helps someone else looking for this solution. It would be great if you could buy a "proper" aftermarket car adapter for the HD2 that had this mod done!
Cheers all and enjoy!
Click to expand...
Click to collapse
Hi Bob,
I was also annoyed ybout the missing possibility to start the car kit mode. The Navi Panel was not a problem to start with a shortcut but unfortunately the predefined connect to my Parrot hands free set via bluetooth wouldnt work. So I have to crack it on the hardware side
I was very happy about your posting and the provided solution. I plan to start a field trial with a micro USB cable, my side cutter and my soldering iron. Hopefully I can affirm your pin-bridges
But before I start, I have to be sure that I count the plug pins right. Is the numbering of attached picture right or should I have to count otherwise?
Thanks for your help.
Here I got the answer!
http://translate.google.at/translat....cz/forum/viewtopic.php?f=3&t=73&p=1037#p1037
original usb adaptor solved this issue
I am coming from tytn II and I have the original htc car charger, when I purchased the HD2 I found that the charger can't be used with it, then I went back to HTC store here in Saudi Arabia and asked for an adaptor (USB mini to USB micro), and it cost less than 3 USD and once I attached to the HD2 it went to the Navipanal.
I think the solution of the resistor was built in it or it is because of using the original HTC car charger (which was for the Tytn II).
Funny thing that I thought that this is natural with any Car charger till I saw this thread
CU-S400 Emulator
Hi,
I finaly got a working CU-S400 Car Holder emulator! When using my HD2 in landscape mode in my car I ran into the following problems:
The device changes to portrait mode everytime the dialer comes up
The device always goes to speakerphone on incoming calls, even though my Parrot carkit is connected. Outgoing call are routed through my Parrot carkit though. I always had to manualy disable speakerphone on every incomming call.
I have to switch on Bluetooth everytime I enter my car; having BT on all the time drains my battery to fast
Running NaviPanel (to solve part of the above problems) disables the StartMenu hardkey, and changes the Home hardkey to always change to NaviPanel instead of Sense.
The attached ZIP file contains the following files:
CarKitMode Detect Helper.exe - A modified file that is originaly used by the Via Michelin GSP software. It detects if AC Power is connected of disconnected, and the launches my HTC_car_kit_mode_auto.exe. It either launches with the AC_ON or AC_OFF parameter, depending on wheter AC is connected or disconnected.
CarKitMode Detect Helper.lnk - The shortcut that is placed in \Windows\StartUp to autostart the monitoring of te AC connection.
HTC_car_kit_mode_auto.exe - A Basic4PPC file I created. If started with the AC_ON parameter it changes the registry so my HD2 thinks it's connected to a CU-S400 Car Holder. It enables Blueooth and then waits for 2 minutes to see i the bluetooth device specified in NaviPanel settings is connected. If not, shuts itself down after disabling Bluetooth. If Bluetooth is connected sits, and waits for a call, and then disables speakerphone if it sees that speakerphone is enabled. That way the call is routed through the BT device.
When started with the AC_OFF parameter it changes the registry back, disables BT and shuts itself down.
VJSpeakerPhoneOFF.exe - The program that is called to disable speakerphone. It's part of the VJPhoneShortcuts suite that was created many years back by Vijay555. Big thanks to him, although I'm sure there are other programs that will do the same.
I've tested a lot, and can't find any battery or performance penalty for the always running helper application. And the HTC_car_kit_mode_auto only runs if AC power is connected, and then only for two minutes if the BT device isn't connected. Just unzip the attached CU-S400 Emulator.zip to the root of your device and soft reset. I tried to make a CAB file, but installing it always failes, haven't got a clue why. If anyone find a way to create this cab file, please let me know.
Best way to use this if BT is disabled by default. And it's not necessary to enable the auto launch of NaviPanel. I don't use it anymore. It disables the StartMenu hardkey, and since I don't use CoPilot it doesn't do much for me. By using these utilities I do have true landscape support for the dialer, and I works with any AC power connection, no need to modify the USB connector. I'm very happy, my in car experience is 100% better now.
Hope this helps anyone, if not I'm still happy, it works for me!
Cheers,
/Cacti
le_cactus said:
CarKitMode Detect Helper.exe - A modified file that is originaly used by the Via Michelin GSP software. It detects if AC Power is connected of disconnected, and the launches my HTC_car_kit_mode_auto.exe. It either launches with the AC_ON or AC_OFF parameter, depending on wheter AC is connected or disconnected.
CarKitMode Detect Helper.lnk - The shortcut that is placed in \Windows\StartUp to autostart the monitoring of te AC connection.
Click to expand...
Click to collapse
Hi,
unfortunately this wont work on my ROM. I use original german ROM with all updates. If I copy your "Startup" shortcut to my "Autostart" folder I get an error message, that the application is not certified or some components are missing. I already dissabled the "uncertified" message with HD2Tweak and it works for other apps.
Best regards
extrapurifier said:
I get an error message, that the application is not certified or some components are missing.
Click to expand...
Click to collapse
Hi,
At what point does the error message occur? At startup (while launching CarKitMode Detect Helper.exe) or when connecting or disconnecting power?
Cheers,
/Cacti
le_cactus said:
Hi,
At what point does the error message occur? At startup (while launching CarKitMode Detect Helper.exe) or when connecting or disconnecting power?
Cheers,
/Cacti
Click to expand...
Click to collapse
At StartUp. Maybe it's because I use german ROM?
Ever since I got the EB13, and subsequently, the EC05 update to Froyo, Bluetooth has been consistently crashing when I connect to my Jetta TDI's car kit. After lots of frustration, I began to investigate, using aLogCat, and found out the following.
My TDI's Bluetooth interface supports phonebook transfers. The car's interface, however, does not. Still, when I first pair the device, I receive a request to allow the phonebook to transfer, which of course I accepted. I thought nothing of this, as this already happened in DI18, without any problems. However, as of EB13, after I *end* a phonecall, I'll get the triple-buzz, and the BT stack will crash. I have to shut off the BT radio (which takes about 1 minute, as it sits there trying to shut down) and then re-enable and reconnect.
After running aLogCat, I found, pre-crash, that EVERY time I got in my car, the phone attempts to transfer the *entire* phonebook. Every single time I get in. This seems rather unnecessary, and slow, as each entry takes about 0.5 to 0.75 seconds to sync. For hundreds of contacts, my phone is sitting there for what could be an hour or more, syncing. It makes sense, then, that after I hang up on a bluetooth-enabled call, which likely got in the way of the transfer, that a buggy BT stack implementation crashes when it tries to resume. I confirmed this with aLogCat, seeing "ihup() call received!" entries showing up every second or so, after the stack crash. So, I decided to experiment.
I unpaired my car's BT system, and re-paired. This time, instead of accepting the phonebook authorization (which I can't use anyway in my 2009 TDI), I denied the request. It popped up again, and I denied again. (Now, I just simply ignore it, and it goes away.) The result is that I have *never* lost my BT connectivity to the car after a phonecall since I started doing this. Obviously, Samsung has introduced a bug, but because most people's headsets don't support phonebook functionality, it hasn't shown up.
So, if you're having the "I just ended a call, my phone triple-buzzed, and now my headset has disconnected" problem, remove the pairing, and don't allow phonebook transfer. Hopefully this can be of some help to people.
Thank you! That triple buzz was really starting to get to me (to say nothing of how unsafe it is to fiddle with re-pairing on the highway), and I couldn't even figure out a starting point to troubleshoot. I use a Parrot Mki system that does support phonebook transfer, but I'll try deselecting "Always allow" the next time I'm in the car aster permitting at least one sync.
I could swear that I only started noticing this with the recent Froyo builds, but I wasn't certain enough about it.
Thanks again!