Cable connected state - Windows Mobile Development and Hacking General

Hi there,
I'm in the process of writing a volume manager for wm6 and one thing I'm after is being able to detect whether a power cable is plugged in, or if headphones are, or whether it can detect a difference.
I'm programming for the hermes/jasjam phone but I'm hoping that the com device is the same across most devices.
I can't really find much about how to detect the cable.
Has anyone here been able to detect this?
Thanks

BUMP:
Has anyone done any development in this area?

Phonealarm (pocketmax.net) can....it can switch profiles based on whether the power cable is connected, or activesync etc. Not sure about headphones tho...

hmm, thanks for that..
Unfortunately they're unlikely to tell me how to do it given it isn't open source.

Take a look at that, and anything deeper to the topic.
http://msdn.microsoft.com/en-us/library/aa447554.aspx

J_Hutt said:
Phonealarm (pocketmax.net) can....it can switch profiles based on whether the power cable is connected, or activesync etc. Not sure about headphones tho...
Click to expand...
Click to collapse
funny, read his question he need to read out this port for programming. if you dont know what he is talking about better dont post.

Related

PC GPS receiver on Wizard...possible?

I've been given an older gps receiver that connects to a pc via usb. The driver used in that instance is a usb to serial driver and ends up connecting to one of the COM ports. I was wondering if it may be possible to connect the receiver to my Wizard. I've got an adapter that will enable me to at least plug the receiver into my phone, but I'm not really sure how to get the phone to recognize the receiver.
Does anyone know of an app that will allow me to use the mini usb port as a serial port in any way. I know this may be a long shot, but wanted to try. I can try to write something myself in C# if need be to intercept the messages, but I don't really know how to receive those messages through a COM port on the phone. Thanks!!!
By the way, I'm using an unlocked 8125, running WM6 Most Beautiful.
The problem is actually the Wizard doesn't have a USB Host so the RS232 to USB adapter you might be thinking of won't work here. As for getting it to work with the PC, perhaps if the PC is providing the GPS as a service?
I see. I've got it working on the PC, but could probably write something to get it to the phone, but might be a little pointless if I'm already connected to a laptop.
So, it looks like the only way to connect a peripheral to the Wizard is through Bluetooth. Think that is a fair assessment?
DuceEnd said:
I see. I've got it working on the PC, but could probably write something to get it to the phone, but might be a little pointless if I'm already connected to a laptop.
So, it looks like the only way to connect a peripheral to the Wizard is through Bluetooth. Think that is a fair assessment?
Click to expand...
Click to collapse
Yup. There are a few threads about that also.
--M

Has it been designed to use the USB port for input?

Hey since I am not a dev, I do not know if the USB port could accept incoming connections. Since linux is here now on it, I would think there may be a way to tap into the USB port and rig up some sorta USB input device to use on the G1. Imagine a controller. =D Just wondering if its been reported if the G1 could have the ability or if hardware wise its totally blocked off. Thanks. =)
well the wired headset has a microphone on it for calls, so at the very least you could plug in a USB microphone
i'm no hardware dev though, so i could be wrong!
Mysticales said:
Hey since I am not a dev, I do not know if the USB port could accept incoming connections. Since linux is here now on it, I would think there may be a way to tap into the USB port and rig up some sorta USB input device to use on the G1. Imagine a controller. =D Just wondering if its been reported if the G1 could have the ability or if hardware wise its totally blocked off. Thanks. =)
Click to expand...
Click to collapse
Search the forum for "usb host" and "usb otg". Short answer is G1 cannot act as a usb host even though the cpu supports it. Reason is it is not wired to supply power to a usb slave device.
jashsu said:
Search the forum for "usb host" and "usb otg". Short answer is G1 cannot act as a usb host even though the cpu supports it. Reason is it is not wired to supply power to a usb slave device.
Click to expand...
Click to collapse
Well.. if its just power, there are those USB hubs that you have to plug in AC power, I would think that would solve that issue there.
jashsu said:
Search the forum for "usb host" and "usb otg". Short answer is G1 cannot act as a usb host even though the cpu supports it. Reason is it is not wired to supply power to a usb slave device.
Click to expand...
Click to collapse
well, theoretically, could a non-phantom powered microphone work then? if you got a decent small mic, you'd be able to record live music and such on the phone with pretty good quality. might be impractical but it would be interesting to see if it could work!
Isn't the microphone plugged to a non-usb pin on the HTC connector, like the headphones ?
Edit :
Yes, it is.. See diagram here : http://www.tracyandmatt.co.uk/blogs/index.php/2006/09/10/htc_hermes_usb_connector_pin_config
Not sure how the headphones are plugged in, but I would assume if someone has a miniusb device, Im sure debian would detect it in the reports. I cant rem the command I used in ubuntu to get info but would be interesting to see if something can be done.
It dawned on me... Anetshare turns the G1 into a Wifi peer to peer. So along with Bluetooth abilities. Which Who said that the Bluetooth couldnt be used to accept BT Keyboard/Mice or so? Same with Wifi, Using Wifi to maybe have a app on your PC use ITS controller, sending the data via Wifi (So the G1 is a server) and translating those into usable input commands? I mean I know I use that Joy2Key program in WinXP to map my joystick to keyboard/mice commands. Im sure something could work on the G1. Thoughts?
you mean like this?
ubernicholi said:
you mean like this?
Click to expand...
Click to collapse
Well id say thats a start. Seems like nothing new has been up with it tho? Cause even if a BT Keyboard worked.. That would be a step in the right direction, hell could even play games a lil easier too.

Is the USB master? Can I connect external HDD etc?

I wonder if the USB on the Nexus One allows me to connect an external hard drive. I'm only talking about data transmission with externally powered USB-devices. The N1 doesn't need to power USB-devices for me to be satisfied.
And if not: could the deficiency possibly be mended software-wise, or is it a limitation of the hardware itself?
Thanks beforehand!
no it cannot be the host. Read this on a google forum, someone posted the link as an answer to a similar question yesterday.
Thank you for your answer, britoso!
But oh, what a pitty!!!
Can't it possibly be fixed by booting with another software driver or something?
What's the point of removing this ability? It seems completely ridiculous. It gains nothing at all to "un-specify" USB host capability:
"Now, I have my files on this USB memory stick and here's the Nexus One. Oh, what's the use. Google didn't care at all about this kind of scenaria..."
Well, let's see what can be done with bulky wireless adapters and stuff like that then, to mend this unnecessary fail of the N1... I probably need to use a PC running Windows and a cable internet in order to have any use at all of the N1. Was this the purpose of this deliberate design "feature"?!?
this feature was not removed, but simply never implemented into the Android OS (afaik). if USB was host that means anything connected to it would have to draw power from the Nexus One's battery. Im sure HTC does not want this, because some things connected to USB can put incredible stress on a battery.
I thought the inability was due to a USB design that will allow charging, but doesn't allow hosting.
(at least that what I gathered about the n900 and why it couldn't act as a host.)
edit: nevermind nokia opted to skip on the go support to get the product out faster.
I don't know if there's a hardware limitation in place, but even if there isn't, the software does not support it.
There's an app for the n900 to add host support in the maemo repository. Don't know if it works though. I've always thought host support was due to the software.
Go here:
http://code.google.com/p/android/issues/detail?id=738
Sign in with your google ID. Vote for the feature by clicking the star.
(While you are there, click on "Back to list" and browse for other issues/features you care about and "star" them too...)
Its been accomplished on the Droid... Host mode works, but as there are no drivers, anything that runs over usb will turn on / charge but not connect.
http://www.engadget.com/2010/02/10/droid-gets-a-usb-hack-allowing-it-to-control-printers-and-camera/
mikecyber said:
Its been accomplished on the Droid... Host mode works, but as there are no drivers, anything that runs over usb will turn on / charge but not connect.
http://www.engadget.com/2010/02/10/droid-gets-a-usb-hack-allowing-it-to-control-printers-and-camera/
Click to expand...
Click to collapse
Thanks for posting this as I saw this on another site and came here to raise awareness. I've heard that someone got a USB keyboard working over USB host. Could someone try this out on their N1?

Usb switch and other Apps not in start menu

i was looking through the windows directory and i found a few exe files not linked to in the start menu. switchusb and QCamera where the more interesting and btspy which im not sure what it is supposed to do.
usbswitch has 2 options 1 microsoft usbfn and 2 qc composite - dun, diag, nmea
reset is required to change mode.
qcamera is of course a camera app with many settings such as frame rate control and the ability to change the file type of both pictures and videos. WARNING AFTER I USED QCAMERA MY LG CAMERA APP WOULD FREEZE I HAD TO DO A RESTORE OF MY WINDOWS DIRECTORY FILES FROM AN EARLIER DATE TO USE CAMERA AGAIN.
also a gpsoneapp for gps testing if anyone is having gps problems
i also found an exe i hope can help it is called WceSetAudio.exe it has a few options that is listed in the fmradio post on lg-expo.com that i will copy paste here
handset, headset, speaker phone, TTY headset, TTY VCO, I2S full duplex, I2S RX/TX, FMradio, SpeakerVoice, HeadsetVoice, Headset Stereo speaker...,headset stereo..., headset mono speaker..., and headset mono speaker...
this reminds me of linux where i can never find the right audio out...
the ones i put ... on it is cut off and i cannot read the last word. i have not tried to change anything because this is my main or only phone and i dont have time for it to mess up on me.
maybe this can fix fm radio output.
also wifiengmenu.exe and browsermodedetec.exe says it changes browser to desktop mode but it didnt seem like it did.
i dont know if any one else has found the same programs already i just thought id let everyone know here
there was a simillar thread in the social groups. nice find on the qcamera. and the usbswitch. gonna check those out now.. thanks
i also found qtest and other test like qled...
nev310 said:
i also found qtest and other test like qled...
Click to expand...
Click to collapse
ooo what does qled do?
it just turns on the led there is actually one for each color red,blue,green and one for all colors to flash could help write apps that use the led
hmm on my expo there is not qled.exe in the windows directory.
nev310 said:
it just turns on the led there is actually one for each color red,blue,green and one for all colors to flash could help write apps that use the led
Click to expand...
Click to collapse
there was a program that someone was working on for the x1's LED's called illumenaria or something.. it was pretty sweet. i'm sure it could be accomplished.
sorry it is not qled.exe it is qtest_led_x.exe in place of x there is r,b,n,g for red, blue ,off, green and another qtest_ledtest.exe that flashes all colors.s it is with other exes such as qtest_gyro, ...vibtest, ...keytest....... they can all be accessed by going into engineer mod
i also found an exe i hope can help it is called WceSetAudio.exe it has a few options that is listed in the fmradio post on lg-expo.com that i will copy paste here
handset, headset, speaker phone, TTY headset, TTY VCO, I2S full duplex, I2S RX/TX, FMradio, SpeakerVoice, HeadsetVoice, Headset Stereo speaker...,headset stereo..., headset mono speaker..., and headset mono speaker...
this reminds me of linux where i can never find the right audio out...
the ones i put ... on it is cut off and i cannot read the last word. i have not tried to change anything because this is my main or only phone and i dont have time for it to mess up on me.
maybe this can fix fm radio output.
has anyone tried changing usbmode with switch usb? does QC Composite mean for video out and stuff and maybe even let you use the phone as a gps on a pc? just wondering.
nev310 said:
sorry it is not qled.exe it is qtest_led_x.exe in place of x there is r,b,n,g for red, blue ,off, green and another qtest_ledtest.exe that flashes all colors.s it is with other exes such as qtest_gyro, ...vibtest, ...keytest....... they can all be accessed by going into engineer mod
Click to expand...
Click to collapse
i dont have that on mine all i have is qtest lg camera.exe
you should have it it is part of the test mode that you can find in engineering mode
what was the number that i have to dial to gain access to engineering mode?
3845#*820#
nev310 said:
has anyone tried changing usbmode with switch usb? does QC Composite mean for video out and stuff and maybe even let you use the phone as a gps on a pc? just wondering.
Click to expand...
Click to collapse
I've tried the switch USB to see if it would finally let me sync my phone to PC via USB, but it did nothing. Still using bluetooth dongle to sync phone.
i saw somewhere sombody said they tried a different usb cable and their expo synced maybe you could try that.
nev310 said:
i saw somewhere sombody said they tried a different usb cable and their expo synced maybe you could try that.
Click to expand...
Click to collapse
Tried 3 different USB cables. There were only 2 or 3 times whee I was able to sync with USB after a PC reboot, once I unplugged and replugged it wouldn't work again. I've messed with this for days on 3 PC's, with different OS -XP, Vista, Win 7 64Bit all with the same results. Even a hard reset to the phone with no other apps installed.
I've seen some of the MS forums and alot of people with different devices are having the same issues with no resolve.
wish i knew a little more to help you. it seems like warraven knows what he is talking about hope he can help and you can figure it out.
As long as I can sync with BT I'll survive, but when the cooked ROMS start coming around, I'll be SOL, cause you can only flash via USB.
i had a fuze before the expo and i never plugged my fuze up to sync just did bluetooth or wifi. only time i plugged it up was to put stuff on the sd card like a rom or songs. when i flashed roms on my fuze i just did it by putting the ralphimg file on the sd card and flashed it by holding down some keys. htc phones are way better and flashing and customizing. if the expo could flash from sd ud be alright

Meaning behind various COM# in Odin?

Hey everyone-
I've been curious about what specifically the different COM modes mean in Odin while flashing roms onto the vibrant? I know that COM6 is generally what u wanna work when using Odin with the vibrant, but I've flashed numerous roms when Odin has shown other COM# messages. Anyways, I was just curious if anyone actually knew exactly what each one meant, just wondering? Thanks in advance.
-regards, bobofosho123
I think that is what port you are using. Try plugging into a different usb port and it should change. Ive mever too much worried with the numbering and have never had any problems.
You should be able to turn on and off whether a certain port is set to high or low power via your computer settings, that is the only thing I can think of that would make a difference. I have also heard that the usb cord you use can make a difference. I know when I first got my phone odin was impossible and I do think that was due to the cord as it had a hard time making a connection and ended up corroding the micro usb port on my phone. After I cleaned it and switched to a cord that fit the phone better all of my problems went away. I also know someone else who got a cord like that from samsung and it had trouble connecting so he sent it back and and his new one has not had any trouble. So if you have a particular usb port you use whether its 5 or 6 etc. if its been working fine it should be ok. If your using windows it will usually tell you whether or not the usb you are using is high speed or not, which is what you want as that translates to better flashing, charging, and everything else. Sorry for my rambling, hope that helps bobofosho.
Sent from my SAMSUNG-SGH-I897 using XDA App
Most operations that involved firmware mockery are performed via serial connectivity, since you have a USB interface, there are OS calls made to perform USB to serial conversion - and in essence turning the USB interface into emulated serial interface COM port (communication port).
Did I bore you with details? You asked for it, I hope I answered it.
lqaddict said:
Most operations that involved firmware mockery are performed via serial connectivity, since you have a USB interface, there are OS calls made to perform USB to serial conversion - and in essence turning the USB interface into emulated serial interface COM port (communication port).
Did I bore you with details? You asked for it, I hope I answered it.
Click to expand...
Click to collapse
you sure did, thanks for the reply.

Categories

Resources