PDA

View Full Version : VJCandela - torch/flashlight on HTC Phones


vijay555
19-02-2006, 05:32 AM
Guys, this app will permit control of the flashlight on your Universal as a torch.

It may work on the Wizard and Apache. Please test and report.

http://www.vijay555.com/vj/releases/vjcandela/vjcandela.jpg

This software is semi-commercial.
This means, if you like it and use it, please make a donation on my webpage (http://www.vijay555.com/index.php?%24_Donations_%24). I recommend a few pounds.

Donations will go towards future developments. I really need to buy a copy of IDA Pro, which will cost several hundred Euro, and for a hobby, that's too much for me :) And as you may know (http://forum.xda-developers.com/viewtopic.php?p=226598#226598), I hope that I won't be the only one to benefit if I can get hold of this program.

The app is currently around 100k. Most of that is the graphics. I will release a lighter version shortly without the graphics if required.

The technique for controlling the torch is very simple - there is a flashlight export in the htccamera*.dll used by the camera.
I don't use this method myself, but it should make it easy to integrate this feature into your own applications.

This kind of programming is made possible with a program like IDA Pro, so please, remember to donate to facilitate future developments :wink:

On my website (http://www.vijay555.com/index.php?Releases:VJCandela)

V

simon_darley
19-02-2006, 07:42 AM
I sent some money anyway, not sure how much, or whether its right or not, i havent even tested it or used it, but thought you deserved some money for the hard work and effort you put into the site and the users.

ZeBoxx
19-02-2006, 11:08 AM
HTC Wizard
Qtek 9100
ROM: 1.1.7.5 (yep, haven't taken the splash yet)
ExtROM: 1.1.7.105

- Does not turn on camera flashlight - d'oh :)

- Window opens 'off-center' making its right-most border be out of view

- Window has some painting issues (e.g. blinks colored graphics before being painted over by the grey graphics with many actions)

simon_darley
19-02-2006, 11:29 AM
works fine on mine.

I didn't need nor use all the bells n whistles, just pres button torch on, press again, torch off.

me, simple needs. need satisfied.

scotjen1
19-02-2006, 12:08 PM
VJ you are truly great, excellent app (will be making a donation for this tomorrow payday lol)

I have installed on universal with hardware key app and program does work wonders long press on then release off but when I give a short press the torch does come on but if I give a short press again am I correct in thinking the torch should go off again well on my universal it doesen't it just flashes and then the torch still stays on I have to then hold the button down for the torch to turn on and then release and it will then go off

hope this makes sense

keep up the good work

Rick GM
19-02-2006, 12:53 PM
Vijay
This is great - I love your $1000 torch reference - non PDA enthusiasts just don' get it !!
Anyway;
It works on my SPV M5000 but only if the clam is open. It would be great if you could get it to work closed.
Some observations;
1 Assign VJC On either to button or screen and torch is on with clam open, off with clam closed. Back on with clam open.
2 Assign VJC HW to Backlight button, clam open, press button and hold light on until button released. Press button and let go, light stays on. Press button for off and light blinks off but comes straight back on. Press and hold turns it off. However, on first use after device is turned on, the press again for off (without holding)works. Similarly if you close the clam (which turns the light off) open it again (which turns it on) and then press off (without holding) it turns off.
Hope this is of some use (if it makes any sense).

nolovelust
19-02-2006, 01:32 PM
wizard
only screen off option works

:(

ei99070
19-02-2006, 01:37 PM
Vijay, excellent work!!!!!!

I miself have tried to find such export on htccamera, but with no success! If possible, please post the export here for the comunity!
In other hand, I think that the hardwarekeys cab file you made has an error (at least it shows up on my exec): there's a missing " on the start of the paths (check the registry keys on the cab file and on the machine registry).

Hope you don't mind, I'll post links for your program on a portuguese forum (PocketPT.net) so that more and more people can use this magnificent program! And yes, i'll make a donation tomorrow, I promiss ;)

cr2
19-02-2006, 01:46 PM
The app is currently around 100k. Most of that is the graphics. I will release a lighter version shortly without the graphics if required.


Vijay,

can you post the source code for "non-gui" part ?
I'm a strong believer in the "such technical information
wants to be free", as you can see from the Universal
wiki :)

Ward
19-02-2006, 01:47 PM
Ģ5 - good for a few pints - is on its way!

:wink:

vijay555
19-02-2006, 03:52 PM
ZeBoxx - I got bored of doing the GUI work, I'm really not going to bother in future. I think I have an unnecessary paint call when moving, have to check. But Mrs Vijay555 wanted to watch Chicken Little, so I just got it out as is...
I only use VGA, but will try to get it to center automatically. I have to also get it to center on screen rotation. It's on my list.

nolovelust: I'll make a correction a little later to fix it for the wizard...

Rick GM: clam control is possible to a degree. I have an interim solution, but wanted to get "no bells and whistles" out first, so to speak. Clam control is universal specific so will try to implement that by device ID shortly.

scotjen1: press and hold the flame to enable the torch. Press the lock to permit torch toggling. It will stay on until you switch it off. Or use the command line.

ei99070: post links anywhere you wish.
The reg key cab is exported from my Universal. Might be a problem, anyone else tried it? This is what I imported:
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\Keys\ 40C8]
"BtnWnd"=dword:00000000
"Default"=""\Windows\Start Menu\Programs\vijay555\VJCandela\VJCandela HW.lnk""
"Flags"=dword:00000000
"Icon"="\windows\Camera.exe, 0"
"Name"="Button Light"
"ResetCmd"=""\Windows\AppButtons\Camera.lnk""
"WndCls"=""


Anyone who wants to know the active code:
void fn_FlashMode(int Mode_int)
{
HANDLE CamHandle;

//1=on
//2=off
//DWORD FlashMode=1;

//open camera
CamHandle = CreateFile(TEXT("CIF1:"), GENERIC_READ, 0, NULL, 3, 0, NULL);

//device io (device specific)
DWORD a=0x90002024;

ret=DeviceIoControl(CamHandle, a, LPVOID(&Mode_int), sizeof(Mode_int), 0, NULL, NULL, NULL);

CloseHandle(CamHandle);
}

Very easy to implement, but the device IO is important and is derived from a htccamera*.dll variety of files. This takes some tracking down, without a full ROM dump :(

If possible, I'll try to work on other models of phones when I get a bit of time.

Many thanks to all who tried it.

V

ZeBoxx
19-02-2006, 04:13 PM
Don't worry about it - I'm not a GUI fan myself unless there's an absolute need or if it makes life *that much* easier :)

ricky200
19-02-2006, 04:54 PM
Hi vijay555...

I'd first like to send out a big thanks to all your efforts with this development. I guess it'll only work on the universal, i've tested it on my k-jam but with no luck, doesn't start anything.

I though I 'd let you know and maybe, just maybe there can be a way around this.

Thanks.

Regards...

TheBlasphemer
19-02-2006, 05:11 PM
Erm :o
Why on earth are you communicating with the driver directly?!
HTCCamera1.dll exports everything you need!

Could anyone with a non-universal device check to see if the attached app *does* work?
It should turn on the flashlight, show a messagebox, and once you click OK turn off the flashlight...

cr2
19-02-2006, 05:42 PM
Why on earth are you communicating with the driver directly?!

Driver? I have traced it down to the ASIC3 GPIOA10 bit :lol:
http://wiki.xda-developers.com/index.php?pagename=UniversalASIC3

coeptum
19-02-2006, 06:12 PM
Erm :o
Why on earth are you communicating with the driver directly?!
HTCCamera1.dll exports everything you need!

Could anyone with a non-universal device check to see if the attached app *does* work?
It should turn on the flashlight, show a messagebox, and once you click OK turn off the flashlight...

Doesn't work on my Wizard (SPV M3000) because HTCCamera1.dll is not found.

I just found HtcCameraUtility.dll in \Windows

vijay555
19-02-2006, 06:13 PM
TheBlasphemer: there is method in my madness. I'm communicating with the driver directly because, from my investigations, different ROMs are exporting using different support dlls (eg the wizard doesn't have HTCCamera1.dll).

Communicating directly with the driver seeks to account for that (but you need to rename the driver name). However, I believe the wizard and Apache are using the same driverIO control from reversing their roms.

The code is simple, so anyone should be able to locate their support dll and mod it for any hardware.

V

ei99070
19-02-2006, 07:55 PM
ei99070: post links anywhere you wish.
The reg key cab is exported from my Universal. Might be a problem, anyone else tried it?
Well, after instaling the hardware key cab on my Universal it didn't work; checking the registry and then the cab with WinCE CAB Manager, it showd that the path to the link on the start menu missed the starting " to combine with the ending one!
Maybe that's just me, I don't know, but still I reported it :)

TheBlasphemer
19-02-2006, 10:16 PM
Something interesting, there are 4 other light-modes.

1 on
2 off
3 full power (and backlight off) - maximum time of 400ms
4 off
5 ?
6 ?

Note that after setting power to 3, you must set power to 4. If you set mode 3, and forget mode 4, mode 3 will not work untill you have set mode 4.

To use the flashlight without using all sorts of filthy driver calls, use the following code: (C++)

typedef int (__stdcall *CAMINIT)(DWORD *dwSomething);
typedef int (__stdcall *CAMDEINIT)();
typedef int (__stdcall *CAMFLASH)(DWORD dwMode);

HMODULE hCamera=LoadLibrary(TEXT("HTCCamera1.dll"));
if (hCamera) {
CAMINIT Camera_Init=(CAMINIT)GetProcAddress(hCamera,TEXT("Camera_Init"));
CAMDEINIT Camera_Deinit=(CAMDEINIT)GetProcAddress(hCamera,TE XT("Camera_Deinit"));
CAMFLASH Camera_FlashLight=(CAMFLASH)GetProcAddress(hCamera ,TEXT("Camera_FlashLight"));
if (Camera_Init && Camera_Deinit && Camera_FlashLight) {
DWORD dwOne=1;
Camera_Init(&dwOne);
Camera_FlashLight(1);
Camera_Deinit();
} else MessageBox(NULL,TEXT("Can't find appropriate functions in HTCCamera1.dll"),TEXT("Blah"),MB_OK);
FreeLibrary(hCamera);
} else MessageBox(NULL,TEXT("Can't load HTCCamera1.dll"),TEXT("Blah"),MB_OK);

moghisi101
20-02-2006, 12:49 AM
Hey

Nice one Vijay! Great App, expect some cash to start flowing into that Paypal account of yours.

The App is great, but can you release a version with no GUI? No offence, but I hate how the GUI pops up everytime I press the hardware key, especially as its not centred on our screens (yours is though, you're in true VGA?)

Nice work. Keep it up!

moghisi101
20-02-2006, 01:25 AM
Hey

I have uploaded an updated CAB file for VJ Candela. It automatically adds Hardware Button support. Just Press the "Flash Light" Button for it to switch on, and let go and it'll switch off. I'm waiting on VJ's reply to see if he will release no GUI version.

TheBlasphemer
20-02-2006, 02:16 AM
I'm waiting on VJ's reply to see if he will release no GUI version.

I really hope vijay won't mind, but here's a GUI free version.
This just turns the light on and keeps it on till the backlight key is released.
Source is included.

As I don't have any place to put donations yet, and I'm not really in need of money anyway, I suggest that if you'd like to support this app, donate to vijay555 ;)

ZeBoxx
20-02-2006, 03:38 AM
Something interesting, there are 4 other light-modes.
I don't know about the Universal, but on a Wizard ( any go on that one yet? ;) ) if you turn on the flashlight, it's regularly on. If you then actually take the shot, the flashlight goes extra-bright for a fraction of a second, and then completely off. Might be what's used there?

vijay555
20-02-2006, 03:48 AM
Guys, I've re-uploaded the cab, included VJCandelaLite and fixing some of the shortcuts.

VJCandelaLite has basically the same options as the original
Command Line Options
-on Enable Torch
-off Disable Torch
-about Show about box


Otherwise, launching it directly will put it in hardware key mode. You'll get a tiny GUI to tell you it's on.

I suggest you use moghisi101's cab to enable the hardware key patch (depending on your device) and then install this. Or otherwise just assign it to any hardware key you choose. It will stay on until you release the key.

Night night all.

V

moghisi101
20-02-2006, 06:21 AM
Hey

Nice one VJ!!! Just what we wanted. BEAUTIFUL :D

I love my new $1000 Torch - Well Worth every last buck

Thanks again

moghisi101
20-02-2006, 06:50 AM
Hey Guys...

Sorry, I put that CAB File together so fast I didn't even test it. Looks like I made a mistake!!

I am now uploading a new one that works for sure!!

Please note this has only been tested on an Universal, but this should work on other devices as well... I think!?

Bye

vijay555
20-02-2006, 10:17 AM
moghisi101: good stuff, many thanks! I was going to do a seperate cab myself, but some users were already getting confused by the extra HWKey cab I had offered and foobarred up, so I thought I'd just leave it simple, and leave implementation to users...

V

limsy
20-02-2006, 10:26 AM
k.. noob here... so all i need to do is:

1. download VJ Candela Lite.cab packed by moghisi101
2. copy it to my Exec ... install it... (but not in storage card)
3. holding down the light button to on... release to off?

errr.. i think i messed up my button assignment for the light button.. it is pointing to Contacts now.. ehehe... *blush* err... how do I assign it back to light? I cant find such an option.

and.. thanks VJ ... i only hope i can quickly understand all these stuff so I can enjoy all the useful apps you have made available.

Thank you for your time.

zsilak
20-02-2006, 10:41 AM
what's the light button on the kjam?

vijay555
20-02-2006, 10:59 AM
zsilak: this is basically for the Universal right now. I haven't had a Wizard/Kjam in my hands yet, so will have to have another look at it. The code is available for anyone who can get around to it before I can.
Regarding the button - the Universal has a dedicated and fairly useless backlight button, so there's a registry hack that permits use of this in the normal way, and thus it's logical to use it with a torch app.

limsy - try using VJCandelaLite. Assign it to a hardware button in Start > Settings > Buttons.
Choose the button you want to edit, and then choose the app you want to assign to it from the drop down list at the bottom of the screen.

V

TheBlasphemer
20-02-2006, 11:25 AM
Something interesting, there are 4 other light-modes.
I don't know about the Universal, but on a Wizard ( any go on that one yet? ;) ) if you turn on the flashlight, it's regularly on. If you then actually take the shot, the flashlight goes extra-bright for a fraction of a second, and then completely off. Might be what's used there?

Yep, same on the Universal, and that is indeed what it's doing while flashing :)

moghisi101
20-02-2006, 12:38 PM
Hey

Can I have some feedback on that CAB file? Is it working? Is it even useful?

Also, on a side note, my Universal tries to connect to this address during a hard reset. WTF is it doing?

http://www.htcmms.com.tw/gen/pu10-1.0.xml

I presume it's a HTC website (something to to with MMS?), and it creates a lot of settings...

Thanks

vijay555
20-02-2006, 02:16 PM
moghisi101: I'm afraid I've not tried the cab. but if it's VJCandelaLite distilled into one cab, it's useful to me :) I don't like VJCandelaFatBoy myself :(

V

gooroo
20-02-2006, 03:43 PM
Great work Vijay, the lite version is exactly what I wanted!

One thing after initial install it appeared to work fine with button on/button off, then after trying button hold it seems like the button on/button off is now confused! Now if I button on/button off it goes off then comes back on, I can only turn it off by holding button for longer. The hold button for torch still works fine, do you get me??

Also Moghisis101, thanks for the childs play install, one thing, it adds the new key as Flashlight in buttons with Camera as the assignment. As I still have Button 3 as Camera the buttons app refuses to exit complaining that I have two identical assigments on different buttons.

Good work Vijay, and thanks Moghisis101

dima_the_chief
20-02-2006, 04:47 PM
Great thanks for a perfect job to all you guys!

The next step : control the light with the flip closed.
Is that possible? And, BTW, is it possible to to make other buttons (like audio volume) working with the flip closed?

Thank you

vijay555
20-02-2006, 05:04 PM
dima_the_chief: I believe TheBlasphemer is doing some work that should do the job. I'm sure he'll keep us updated :)

gooroo - not quite sure I get you on that one. If you find that for some reason VJCandelaLite is on and won't go away, just tap its mini icon (ontop of the start button). If you've lost the icon, use a task manager to kill it.

V

gooroo
20-02-2006, 05:40 PM
It's okay Vijay, it must have been me, tried uinstalling and reinstalling and it is exactly the same from the beginning. doh :)

moghisi101
20-02-2006, 07:31 PM
Great work Vijay, the lite version is exactly what I wanted!

One thing after initial install it appeared to work fine with button on/button off, then after trying button hold it seems like the button on/button off is now confused! Now if I button on/button off it goes off then comes back on, I can only turn it off by holding button for longer. The hold button for torch still works fine, do you get me??

Also Moghisis101, thanks for the childs play install, one thing, it adds the new key as Flashlight in buttons with Camera as the assignment. As I still have Button 3 as Camera the buttons app refuses to exit complaining that I have two identical assigments on different buttons.

Good work Vijay, and thanks Moghisis101

hey Gooroo

I don't think there is any way around that. When I tried assigning it to anything else, the flashlight button does not work. For some reason it has to link to the camera button - ask VJ?

in the meantime, you could assign it to something else, and then reinstall the CAB. Sorry I couldn't be of any more help. I am no genius like VJ, buzz, itsme, etc

Cheers

vijay555
20-02-2006, 07:46 PM
Guys, no reason why it should only work on one button. My code should work on any hardware key, as I said, holding and pressing the enter key in programs will show this.

Using button mappers like AEButtonPlus might not work though. If you're using this kind of app, use the -on switch for one click, and -off for two clicks etc. Or just play with it and let me know what you come up with!

V

dragon666
21-02-2006, 12:08 AM
Cīmon now.. make it work for Wizard:) !?

vijay555
21-02-2006, 01:26 AM
Does anyone have a Wizard rom dump created by using dumprom?

V

ZeBoxx
21-02-2006, 01:36 AM
I'd create one if I had even the foggiest idea of how - the DumpRom wiki is nice but doesn't tell me how to get the rom in the first place ;)

That said - there's a wizard rom on the FTP.. DumpRom could be run on that?

Robb Bates
21-02-2006, 05:05 AM
Another bell/whistle...

vijay, since you've figured out how to access a normally non-mapped hardware button, how easy would it be to map the camera button on the Apache? It normally is a press and hold to turn on the camera, but the simple press does nothing, and is not mappable.

This seems to be an ideal button for the flashlight.

Robb Bates

ianlarner
21-02-2006, 11:35 AM
Superb app vijay exactly what the universal needed... donation coming your way!

One question though, i have the app assigned to the light button, but should it work when the clam shell is closed as it only seems to work when the screen is open at the moment, have i got a setting wrong?

vijay555
21-02-2006, 11:38 AM
Robb, as much as I'd love to take credit for the hardware key hack, I picked it up from here:

http://forum.xda-developers.com/viewtopic.php?t=34377&highlight=40c8

You will have to play around with the settings for your device, but follow that thread and have a play. I found that it's easiest to take an existing registry entry, export it, edit it and reimport it to make clones of existing entries (unless you registry editor lets you copy and paste branches).

If you get the settings for your device, post details and I'll cab them up (properly this time?).

Apologies for the storage card thing. Because I'm supplying ready made shortcuts, they're only valid on English OS in default installation folder :(

And again:
I'll try to send out individual thanks to all those making donations, but I want to say here, your donations are all very very much appreciated. Development tools do cost a lot and this and other upcoming hacks wouldn't be possible without them, so it's all going to a good cause I hope.

V

Diggia
21-02-2006, 08:26 PM
GREAT WORK vijay !!!!!! :D :D :D
Just installed and works perfectly with my 9000 !
In my forum I opened a topic about the VJCandela

You're the best !!!!
Thanks a lot !
Wait my donation ! :wink:

vijay555
22-02-2006, 03:57 AM
Guys, on my website I've posted a new cab with VJCandelaLite 0.2 beta.
This contains a new option, -screen

Using this will hopefully toggle the screen while the light is on. No particular reason, but why not?

I've also tried to add Wizard compatibility. I can't test this since I don't have a Wizard, so either send me a wizard or give it a go! Please report ASAP, good or bad.

Remember, If you like this stuff, keep me coding :) Donations towards IDA Pro are coming in here and there, and I'm grateful for every penny. But I'm still quite some way to go.

V

ZeBoxx
22-02-2006, 04:13 AM
no go on the Wizard, I'm afraid.

Confirmed that my shortcuts should be working by using the -about flag in one of them, and the about screen does show 0.2

-screen does work ;)

vijay555
22-02-2006, 04:24 AM
Pooh. Will keep on working on it. Strange, the Magician camera dlls do contain a flash, but the Wizard doesn't seem to :(

V

vijay555
22-02-2006, 04:24 AM
Pooh. Will keep on working on it. It's hard without the hardware!

V

ZeBoxx
22-02-2006, 04:37 AM
How -do- you work on it without having the hardware anyway? :>

Also - maybe a stupid question, but... how do I know that it's actually trying the functions for the Wizard, and not still for the Universal? I suspect there's a device ID you check or something - but what if that fails?
Maybe you could stick the mode it's detecting in the About screen, to make sure that's not the case?

vijay555
22-02-2006, 11:34 AM
ZeBoxx, basically it's failing through right now:
on the Universal we try to open up a device called CIF1:
That doesn't exist on the Wizard (as far as I can see, have a look through your \active\ drivers in your registry).
However, doing a comparison of the equivalent files used in the Universal and the Wizard, I think the Wizard is using CAM1: instead to achieve the same results. So if CIF1: doesn't work, it tries the Wizard route instead. However, it got late yesterday and I'm not sure I've done everything correctly.

As I said, the Magician dlls contain the same functionality as the Universal's - it has a flash control feature, even though the hardware doesn't exist. But as far as I can see, the Wizard does not have the flash control in the same place. I used a little bit of (obviously incorrect) logic to try to figure out why and although it seemed to tie up with what I could see in the code, it clearly didn't work in practice. I'll try again later. But obviously it's more hit and miss without the hardware. But your help was invaluable to even get that far!

V

ZeBoxx
22-02-2006, 12:40 PM
yeah, no CIF1: - only a CAM1:

saman-cz
22-02-2006, 05:50 PM
vijay555: I've tried on my Wizard your DeviceIControl hack with both CAM1: and CAP1: with no luck. Maybe, the IO contol code is different, but hard to reverse engineer without exported Camera_Flash funtions from HTCcamera.dll

vijay555
22-02-2006, 06:31 PM
saman-cz: yup, tell me about it. That's where I used my logic, and failed miserably :) Story of my life.

I'll have another look at it .. if the phone has a flash, it must be hackable.

V

ZeBoxx
23-02-2006, 02:19 PM
vijay - just a heads-up in case this isn't you trying to make a buck from your efforts (as you should!), Handango seems to list VJCandela for $5 (without download option):

http://www.handango.com/PlatformProductDetail.jsp?siteId=1&jid=CE9516XX6X798973443379XDAE7BD7B9&platformId=2&N=96806 34&productId=183262&R=183262

vijay555
23-02-2006, 02:30 PM
:) It is me - but unfortunately Handango doesn't let me list a price lower then $4.95. But the app is kinda shareware. Anyone who searches for it will get directed to my website, where obviously it's available free, subject to the "if you want to make a contribution" request.

I'd rather that anyone who does want to make a contribution doesn't buy it through Handango and do it through PayPal, since Handango eat 40%. But it does get the app some exposure until I can get my blog and RSS running.

I had another look at the Wizard code. It's confusing why it doesn't expose the flash in the same way - hopefully I'll get an Atom dump soon to compare, but without the hardware to reverse engineer, it's difficult.

I had some success on another app though, a blast from the past. Released hopefully after the weekend.

V

ZeBoxx
23-02-2006, 02:33 PM
Cool :)

Looking forward to the other app - whatever it is ( curse you and your mystery posts :P )

themez2004
23-02-2006, 03:15 PM
Anyone else notice that the flash light goes blue after the main screen backlight goes off/times out? (On the XDA Exec)
Or is it my eyes? :shock:
Euan

vijay555
26-02-2006, 09:28 PM
Guys, I've posted an update to v0.2 on my website forVJCandelaFat.

This centers the dialog on startup and tries to smooth some of the drawing flashing while it's being dragged. There's only so much I can do with that, since the OS wasn't designed for window dragging :wink:

V

davidbessler
05-03-2006, 07:51 AM
Still waiting for this app for Wizard

vijay555
05-03-2006, 01:32 PM
Me to David.
I really need to get my hands on a Wizard. That's not happening too soon. But I'll have another look shortly, I'll be trying to update with Eten and Atom support soon, so it'll give me another excuse.

V

dima_the_chief
17-03-2006, 08:26 PM
! I have scorched my Qtek9000 ! (part 1)

First of all, please, refer to my previos postings, where I requested to functionality of working side buttons with the calm closed:
http://forum.xda-developers.com/viewtopic.php?t=41642&postdays=0&postorder=asc&start=25

So, I've installed the VJCandela Lite app and played with it. I dont know how, but suddenly, all the HW buttons (camera, voice and light, as well as volume) START WORKING WITH CALM CLOSED ! :idea:

This functionality was not anounced for the app, did it??

I was surprized, I enjoed the volume control working with the calm closed! I could even use the VJCandela itself for the sinle button press with out opening the calm.
Of course, I was worrying about the accidently pressed buttons (especially the Light button which is assigned to VJCandela).
If I could only know ...
-- see the next part ==>

dima_the_chief
17-03-2006, 09:28 PM
! I have scorched my Qtek9000 ! (part 2)

So, I enjoed that volume control working with the calm closed, just a fiew times accidental buttons presses launched camera and voice apps, as well as the VJCandela light up the torch.

But, yesterday, I was at the wallmart, scurrying about the big shopping list, and had awry put my Qtek9000 in to the on-belt case, so the light button accidently had a press-n-hold click and turned the torch on and this state remained for 15 minutes as maximum, before I drew out my Qtek9000 from the case for the next time...
And, guess what???
When I drew out my Qtek9000 of the case, I saw my torch is on, and the light is of a GREEN tint and is VERY WEAK !!!

Ok, I thought it was the battery discharged for a so long period of lighting.

But, the battery was 87% full!!!

Immediatelly after the accident, I noticed that the device was a little warm, but, not much, the led was warmer, but not that much.

So, now, the light of the led is very faint and feeble; and in the full darkness, the back light of the LCD screen gives more light than the LED gives.
In camera app, if you turn on the led and then make a shot (it supposed to shortly switch to more intensive light for a second), the weak light tirns alittle more green for a while but not more bright.

So, BE VERY CAREFULL WHEN PLAYING WITH THE TORCH !!!!!!!

Do not allow it runing it for a long while! If you see it turnes green - switch if off immediatelly - it might start overheating!

You guys should learn by my own mistakes!
And, what did we learned from it?
1. there is a hardware design fault in the HTC product which leads to semiconductor LED to degrade under unconditional voltage after that short while?
2. another hardware design fault in the motherboard of the HTC which leads some circuit elements (resistors, or just m/b conducting path) to the malfunction under the unproper circuit?
3. I'm just unlucky ( the belt at the cashier's desk has just sucked in my credit card that day :( :( :( )

And, also, we got questions:
- The HTC device wasn't designed to, let's say, shoot a 30 minutes video with the camera.exe with light on?
- camera.exe might have any time out on the ligth on, to prevent the LED overheat?
- HTC haven't even tested it's device in the mode like i run it - we all can imagine, how many other surprises are waiting! Such a raw product!!! :x
- vijay555 - you and others, you guys should foresee some protection against this situation in your app - like, set up a time out on continious light, sound alarm, and finally, if possible - find a solution to control the ability of buttons to work with the calm closed.

PS. I have disabled buttons associations, but my buttons still work with the calm closed (Volume Ctrl).
PSS. Will think of replacement of my Qtek9000 but in our country its not that easy as earn some money to buy another one.

Thank you all, guys, who have read it, and for your valuable help.
dima_the_chief

vijay555
18-03-2006, 01:17 AM
dima_the_chief: you're not the only one who's burnt the torch. I do put at indication on my website that of course, it's unwise to push your hardware beyond it's "designed" specifications. However, it is odd, LEDs should be rated for thousands of hours, so it sounds like they've wired it in a poor way to cause it to "die". I've never heard of a LED burn out like that with correct resistors etc.

But, of course, it's bad news, and you're all warned on this. I did volunteer to put in a timeout, but it wasn't a highly requested feature. Might be wise I think. I'll consider it.

I don't remember putting in a feature to enable the external keys. I've got a couple of solutions, but I don't think I've released them so far. Would be curious to see how that managed itself!

V

BeyondtheTech
18-03-2006, 04:14 AM
I know it's probably a bad time to suggest a feature,

But the on-screen tapping feature makes it easy to do morse code with the LED. Can someone write a program to accept keyboard input of a message and have it send it out via morse code with the light?

What would even be cooler is that the recipient Pocket PC use his camera to capture the receiving light from the morse code sender and translate it back into text!

Would be nice for when Wi-Fi, BT, and SMS is not available to use between HTC devices.

Thanks, vijay555, this program works great on my XV6700.

ZeBoxx
18-03-2006, 07:39 AM
it's not really faulty hardware design - remember, it's a flash/illuminator. As an illuminator it's running at the specs for the LED. You can toss approximately sqrt(2.0)*Vr on there for bried periods of time, typically a 'flash' (0ms - 500ms) and the LED will be fine. Run it any longer, and...

So I guess the question is.. does the app drive it to illumination mode, or to flash mode?

vijay555
18-03-2006, 05:19 PM
ZeBoxx - Illumination mode. It can go brighter, but I don't use that.

BeyondtheTech - I'd originally proposed the Morse feature myself, but was urged to release it in basic form first. I'll certainly consider it in a future update. I'm seriously thinking about putting a time out in, But will consider a more substantial update later... I notice you're moving phones quite often. I'll be looking to upgrade soon, so drop me a line if you've got any good recommendations (UK or import I guess). You're comparison table was very useful BTW.

V

bigbawlayesyawla
19-03-2006, 09:27 PM
Would someone post the HTCCamera1.dll from a Universal or Apache (or any other phone) with a working VJCandela installation?

vijay555
19-03-2006, 10:11 PM
Here you go - what phone do you have?

V

bigbawlayesyawla
19-03-2006, 10:59 PM
Thanks for posting the dll, vijay555!

VJCandela works like a dream on the Apache/ppc-6700, however...a nasty waist-high drop left me with a broken screen. While the Apache is being repaired/replaced, I am using my old Harrier/ppc-6600. I'm using your VJCandela v0.2 version; I've also tried the other programs that folks have posted in this thread, but the closest I get with the Harrier is an error: "Can't find appropriate functions in HTCCamera1.dll." I thought that I would try extracting the dll from the broken Apache to try it on the Harrier under WM2003, but was not having any luck. Unfortunately, your dll doesn't seem to work on my Harrier. I do appreciate your quick response with the dll, and awesome work on the VJCandela application...I just wish that it would work on my Harrier while the Apache is being fixed or replaced by my carrier. Any ideas would be wonderful.

Thanks again!

vijay555
20-03-2006, 01:11 AM
bigbawlayesyawla: I don't know much about the hardware other then Magician and Universal. Presumably the Harrier has a flash?! If you can point me towards an active rom, or get ideally get me a live rom dump using this app
http://buzzdev.net/component/option,com_remository/Itemid,100/func,fileinfo/id,83/

Dump the live rom, compress it and email it over :)

V

bigbawlayesyawla
21-03-2006, 03:21 AM
yes, the harrier does have a flash, however the phone is running Windows mobile 2003 SE. I understand that VJCandela was designed for the Universal...since it was working on my Apache (WM5), I wanted to try it on the harrier while the apache is being repaired. Since it's running 2003, I can't seem to run the program you linked to for a rom dump. I can use grab_it to make a rom dump if that will work; it would not be a live dump, but if you think it will work, I can send it to you. It's fine if it looks like it may not work for the harrier, VJCandela is such a neat program, I figured it was worth a shot.


thanks!

vijay555
21-03-2006, 03:44 AM
bigbawlayesyawla: if you can point me towards a rom update etc on the ftp, or anywhere else, I'll see what I can do with it. It's not important that it's WM5/WM2003, just that it has a flash and I can take the drivers apart :)

V

bigbawlayesyawla
23-03-2006, 02:57 AM
vijay555, I'm sorry it took so long to reply with a link...my job is keeping me entirely too busy lately.
It's just an nbf rom image, I hope that's okay.

ftp://xda-developers.com/Uploads/Harrier/13600___SPCS__6600___nk.nbf.zip


Thank you for looking into this and for creating such a great app for the light.

-bbyy

vijay555
23-03-2006, 03:25 AM
bigbawlayesyawla: Rom looks interesting, but similar to the Wizard. May not be entirely easy. I'm away this weekend on a training course, but will try to knock together a test version ASAP.

V

paulrockliffe
03-04-2006, 01:36 AM
This looks like an awesome application, but it doesn't work on my Wizard :-( The morse-code idea above would be pretty cool too. Hopefully both wizard support and morse-code will be added in the near future.

vijay555
03-04-2006, 02:57 AM
It's going to be difficult until I get the hardware in front of me - I only have access to a universal, so hence, only universal support so far. The software is implemented differently on the other phones. If anyone is in the mood to lend me one for a day, I'll try to get it done. I'm in London if you're passing through :)

V

paulrockliffe
03-04-2006, 12:55 PM
I would lend you mine, but I'm nowhere near I'm afraid. Why don't you buy one from a shop, play around with it, then take it back, tellt hem it's not for you and get a refund?

neevedr
10-04-2006, 08:18 PM
vijay555 would you give the source (files/project) of this (looking cool) application free so other developers can try to make it working on other (say wizard) devices? I would like to give it a try?

vijay555
10-04-2006, 08:33 PM
neevedr: I've already posted the source. It's been up since I released the app. I'm working on an Atom release, but can't help on the Wizard until I get the phone in my hands really...

V

krismc
11-04-2006, 12:10 PM
guys top app!
i was just thinking how useful this wud be the other night!

vijay555
11-04-2006, 12:16 PM
krismc: please don't leave it running for too long. I don't know what too long is, but a few guys tried to sunbathe with it, and the led burnt out before they did.

And don't forget:

http://upload.wikimedia.org/wikipedia/en/thumb/7/73/Winners_Dont_Use_Drugs.png/200px-Winners_Dont_Use_Drugs.png

(and a donation is always appreciated (http://www.vijay555.com/donate.html) :))
V

krismc
11-04-2006, 05:37 PM
i dont have paypal or anything but im very tempted to make a donation what other methods are there?

also is there a way to make the app work with the xecs lid in the closed position? ie only works for me in pda or laptop mode???

vijay555
11-04-2006, 05:55 PM
krismc: regarding the pda mode/clam closed mode. Sigh, it's a very long standing problem with the device itself. I have a solutionhave but have been reluctant to release it for various technical reasons. But, I think I'll try to beta release something soon.

Regarding the donation: hmm. I advise getting paypal, it's useful when you're laundering money etc :wink: But if you're in the UK, well, you're welcome to use your imagination - envelopes full of bodily secretions etc are always welcome. PM or email me.

V

krismc
12-04-2006, 09:45 PM
:cry:

well good news and bad news!

today my flash light died a long and painful death!

not sure how long it was on for but a myserious incident meant the program musv ben running while the xda was sitting at my desk in laptop mode, i caught a glimpe of the programme running in the top bar then checked it and it was just a very low white/blue tinge glow!

wounded!

perhaps it may be best to put some max timer as protection?? say 10 secs? but make it so even if the software hangs itl switch off?????

great idea just let down by poor components! i mean ive never heard of an led go like that with such little use! my xdas only a week old.


anyway good news!

well im a manager of a phone dealer so i can get mine replaced no probs at all ;)

and it means when i do get it ill be doing rom upgrade straight away!

but i have a dilema!

do i a: get the xda exec again (black) or
b: get it as an imate version?? (silver)

no i really cant decide on the colours!!!!!!! help!!!!!!!!

is the imates keypad light up red??? does it look good? im thinking maybe the resale value might be more with imate??

also if i do get the imate is it even worth me upgrading the rom???



damn i hate refinding all me software and doing reg tweaks! awwghhhh


come on guys silver or black???

vijay555
12-04-2006, 11:59 PM
krismc: you poor chap, I was just thinking in the shower yesterday that I really must get around to the timer, but I wanted to finish atom support first. I'll try to get it done asap.

10 seconds seems quite short. What say 30 seconds guys?

Couldn't you do a software backup and restore it to your new phone?

V

Rick GM
13-04-2006, 03:39 PM
Guys
Ya gotta heed the warnings - there's plenty of them in this topic.

Sounds like a $1000 dead torch !!

BTW Vijay, I used the torch for real yesterday. Dropped something under the table in a dark restaurant - SPVM5000 with VJCandella came to the rescue. My partner was at last impressed with my device - they just don't get it !

vijay555
13-04-2006, 03:57 PM
Rick - yes, Mrs Vijay555 continues to be unimpressed by my hacks. But next time I'm on holiday on Risa, she'll be grateful I had my trusty flash. (You've got to be quite a geek to get the reference... who'll own up to it?)

The only reason I haven't updated the code yet to put the timer in is because I'm too lazy to rebuild the cab. Sigh, I'll try to do it tonight. 4 days off work! First time I'll get to do a proper all nighter for months!

V

Rick GM
13-04-2006, 04:31 PM
Whoooosh - straight over MY head. At least that means I'm not a geek.
Risa ?

meschle
13-04-2006, 09:24 PM
btw vijay did you see the post from guttrhead he's offering loan of his phone - on the wizard forum

quote
'I have a 9100 that I'm not using because the speaker stopped working. Maybe we can work something out. I'm in the US though.'

Long way though :)

vijay555
14-04-2006, 12:32 AM
meschle: I did speak to him. We're discussing a possible handover, but it's complicated - I have to get him to give it to the US office of my firm, from there US to UK, and then back again subsequently. A local londoner would be much easier :) But I'm really grateful to you guys for thinking about it.

V

Sooz
22-04-2006, 10:25 AM
Did you ever get the torch working on the ATOM?... if so can you post the cab - happy to donate!!

Any of you know how to do a backup on the ATOM like we used to have on the iMate?

Cheers

vijay555
23-04-2006, 02:52 AM
Backup of what?

V

krismc
02-05-2006, 10:41 AM
got my new qtec 9000 but it seems slower than my xda exec, whats up with that????


also is there a way to backup everything.
so say i need to hard reset i can just load my backup and it will put all my progs, reg hacks etc settings all back to the way it was before the hardreset?

Rick GM
02-05-2006, 01:55 PM
krismc & sooz
What has this got to do with VJ Candella ?

bigbawlayesyawla
13-05-2006, 05:41 AM
Vijay: while trying to put linux on my htc harrier, I noticed that the attached file turns the flashlight on when the program is executed. I don't know if it can be reverse engineered for any api or other information that might help the functionality of VJCandela across other devices. maybe it will help, maybe not, but I hope it does :)

the program turns the light on, but does not turn it off until the power button is pressed.

ahe
19-05-2006, 03:58 AM
I tried the app above, and yes it's work. It turned on my flash light on HTC Harrier.
And I also find the source code of HARET, but unfortunately, the new version of Haret does not turn on the flash light.

vijay555
19-05-2006, 05:01 AM
I have no idea what a harrier is, but can you give this version a try:
http://www.vijay555.com/vj/releases/vjcandela/vjcandelaliteharrier.exe

Harrier only
i can't test this, since I don't have a harrier, but let me know.

V

moghisi101
19-05-2006, 07:22 PM
What's the current status on:

Wizards Support?
30 Second Timer?


Thanks

vijay555
20-05-2006, 02:17 AM
I built in the timer but was too lazy to rebuild the cabs. I'll upload tonight if I can.

Wizard support - not gonna happen until I get access to a Wizard. However, reading the above, can someone try running Haret on the wizard to see if it accesses the flash? If that works I'll try reverse engineering it.

Anyone tried the Haret version? I guess that won't work either actually, it un-works in the same way as the Wizard code.

V

frisco
20-05-2006, 07:15 PM
Anyone tried the Haret version? I guess that won't work either actually, it un-works in the same way as the Wizard code.

V

Just executed the haret.exe on my wiz: EXCEPTION reading coprocessor 15 register 0

moghisi101
20-05-2006, 07:23 PM
There's a very remote chance that I might get it running on the wizard. just bear with me. no promises

vijay555
21-05-2006, 01:23 AM
Guys, I was coding for a while yesterday, nice to get my hands dirty again after a while.

I added the timer mode to VJCandela and VJCandelaLite. It'll now switch itself off after 15 seconds. If you want to override that, use the -override switch.

Still no alternative device support.

http://www.vijay555.com/vj/releases/vjcandela/vjcandela.jpg

On my website.

V

Sooz
21-05-2006, 03:47 AM
vijay does this work on the Atom yet??

vijay555
21-05-2006, 07:37 AM
Nope. I've got to disassemble the self test app, which I tried once before but got lost in. Without having the hardware to test it on, it gets too tedious...

I'm intending to take some steps to help secure access to new hardware, at some point soon-ish.

V

ahe
22-05-2006, 02:36 PM
I have no idea what a harrier is, but can you give this version a try:
http://www.vijay555.com/vj/releases/vjcandela/vjcandelaliteharrier.exe

Harrier only
i can't test this, since I don't have a harrier, but let me know.

V
It says "not a valid ppc app"

vijay555
22-05-2006, 03:54 PM
Is that harrier WM2003? I may have compiled WM5 only :(
I'll try to recompile in WM2003 mode. Apologies.

V

bigbawlayesyawla
24-05-2006, 02:51 AM
Yes, Vijay, the Harrier runs WM2003SE. THANK YOU for all of your continued work on this app to ensure that it works on many different phones.

vijay555
25-05-2006, 04:01 AM
Here's the Harrier version recompiled for WM2003.
http://www.vijay555.com/vj/releases/vjcandela/vjcandelaliteharrier.exe

Still no guarantee it will work, but let me know either way please.

V

bigbawlayesyawla
26-05-2006, 02:38 AM
vijay, the program runs on the harrier, but it does not activate the camera LED light. However, it does momentarily throttle the screen's backlight up to full brightness (at this point, I need to explain that on the harrier, the camera app, when executed, throttles the screen's backlight to maximum brightness...while your app does not execute camera.exe, it does cause similar behavior, i.e., the increased screen brightness) I mention the part about the the screen brightness to say that your new revision seems to communicate successfully with the camera api, but does not get the LED flash to activate the light. almost there! please keep up the good work! thanks, vijay.

vijay555
26-05-2006, 04:19 AM
bigbawlayesyawla: interesting bad news!
OK: basically, the Universal has a very obvious feature for activating the flash, which is not quite what I use, but I have a reverse engineered implementation for various reasons.

Every other HTC flash equipped phone it seems has a similar but slightly different flash activation code. However, without having any other HTC phone with a flash to play with, I'm obviously banging my head, but I think once I get one, I should be able to make the solution for all. So, hopefully, one day a Wizard or something should fall into my lap and I'll crack it.

Until then:
Hmm, the backlight ramp is interesting! It's obviously used in my app VJLumos II on the Magician. I'm attaching a test version, can you try this on the harrier to see if it'll ramp up your screen? I suggest downloading VJLumosII from my website, and replace the .exe with this one so you can use the shortcuts provided.

V

ahe
26-05-2006, 05:33 AM
I tried the last 2 version, it runs normally but still can not turn on the flash, as friend said above, it drive the screen into full power backlight.
Anyway, thanks for your hard work.

hanmin
19-10-2007, 11:15 AM
Not sure VJ will be reading this.. but I'm interested in making a version for my Wizard, just wondering if you have any simple guide that I can follow to get the flash working?

UPDATE:
I was digging through the HTCCamera.dll's Camera_SetProperty, from 8 to 12, no luck. And from what I've gathered, seems to be settings for image quality. And there isn't any Camera_FlashLight in it.

UPDATE:
Ok, I've got your post here
http://forum.xda-developers.com/showthread.php?t=287960
Mind sharing how you use the Driver to do it?


UPDATE:
Ok, I've decided to keep the discussion there
http://forum.xda-developers.com/showthread.php?t=287960