[Q] Arduino Bluetooth to pass Home Menu Back Buttons - Hardware Hacking General

Quick overview of what my plans are. I want to add an external touch screen interface to my android phone (Galaxy S3 in this case). I can get video output via MHL/HDMI to the screen. Hopefully within a month or so this will be out to pass my touch input back to the phone. The biggest problem I currently see is a way to press the home, menu, and back button. I know I could use up some of my screen real estate to enable on screen buttons, but would rather not. This leads me to my main question:
Has anyone used an arduino with a bluetooth shield to control an android phone? So pretty much emulating button presses (home, menu, back) via bluetooth. Most the articles/videos I find on the internet show the opposite of what I want, which would be they control devices from their phone. I do know a little of interfacing devices together, it appears bluetooth is a simple UART interface. I have worked with FPGAs and interfacing them with devices, but nothing wireless before. My arduino and Android app experience is limited, but I have scratched the surface.
If anyone has done something like this could you post the type of arduino shield you used in the process? Also I'm not sure if all the coding would be on the arduino side or if I would need some sort of android app in the background listening to the bluetooth input and redirecting particular inputs to the button press of my choice. What is going through my mind is that headset bluetooth devices usually have the ability to make button presses by bringing up the voice input apps or phone apps, but I suspect those may be pre-enable at the system level.
TLDR: Can I wirelessly press buttons on my android phone with a bluetooth enabled arduino?

yes, it's possible you would have to use it like a Bluetooth keyboard. Off hand I cannot remember the key code, but there is one for home.

Good to hear. I'll post my success or failure once I get the bluetooth module in and get time to tinker.

Progress so far:
First I figured I need to find what the key code is.
I opened up my terminal emulator and was happy to find the command 'showkey' available. Only 'showkey -a' seems to work, the -s and -k options gave me errors. Once I ran the command I was able to get all of my key presses to ouput their key code. But the hardware buttons (home/menu/back/vol up/ vol down) would not register.
Since that was unsuccessful I decided to try the key test that is built into the cwm recovery. This was far more successful. I got the following ouput for my Galaxy S3:
Volume Up = 114
Volume Down = 115
Lock Screen =116
Menu = 139
Home = 172
Just to confirm these can be different from one phone to the next I tested my Droid and a Galaxy Nexus.
Galaxy Nexus:
Volume Up =115
Volume Down =114
Lock Screen =166
For my OG Droid:
Volume Up = 114
Volume Down = 115
Lock Screen = 107
Home/Menu/Back/Search = no output
Thanks to my droid I was able to check if these hardware buttons had direct correlation to the software ascii counterparts. They did not appear to, the hardware buttons for the droid keyboard Started at Q=16 and continued to count by one as I went across the keyboard. (ie Q=16 W=17 E=18...)
On the Arduino Side of things I am working with this hardware:
https://www.olimex.com/Products/Duino/AVR/OLIMEXINO-328/
http://www.seeedstudio.com/wiki/index.php?title=Bluetooth_Shield
To read the bluetooth data coming in I found Bluetooth SPP in the Google Play store. I like that it allowed to change the view to either hex or ascii data. https://play.google.com/store/apps/details?id=mobi.dzs.android.BluetoothSPP&hl=en
I used the 'slave' code listed on the Bluetooth Shield page. For starters I just altered the contents of the if statment that check if the bluetoothSerial is available, which is within the void loop(). Anyways I set the code to just output whatever was input to it to make a simple echo.
Code:
void loop()
{
char recvChar;
while(1){
if(blueToothSerial.available()){//check if there's any data sent from the remote bluetooth shield
recvChar = blueToothSerial.read();
Serial.print(recvChar);
blueToothSerial.print(recvChar);
Later on I made an if statement to output data to my choosing. I had started with blueToothSerial.print, but found even with the BIN/HEX/OCT options it was still outputting ascii. blueToothSerial.write output the raw data that I wanted. So if I put blueToothSerial.write(172) it was going to send the binary equivalent 10101100, or hex equivalent AC.
Code:
void loop()
{
char recvChar;
char m = 'm';
while(1){
if(blueToothSerial.available()){//check if there's any data sent from the remote bluetooth shield
recvChar = blueToothSerial.read();
Serial.print(recvChar);
//blueToothSerial.print(recvChar);
if(recvChar == m){
blueToothSerial.write(172);
}
As expected sending 172 does not just magically show up as a key press and open my menu button. I don't like to overlook the overly simple attempts until they are at least tried. Plus it gave me time to familiarize with arduino.
I can now send whatever data I feel like using arduino, I just need to figure out how to make it appear as a hardware button press. It might be time for me to dig through android source code to understand the bluetooth interaction to the rest of the system.

Small update:
I have since found these articles related to the android system and how it handles Bluetooth and Keyboard input.
What seems the most relavent is a table that contained the key mappings:
HID Usage HID Usage Name LKC Linux Key Code Name Version AKC Android Key Code Name
0x07 0x0065 Keyboard Application 0x007f KEY_COMPOSE 3.0 0x0052 KEYCODE_MENU
Also for the bluetooth I found that bluetooth devices have a class and profile. The class was listed in the app I was using, and the Arduino appears as a Class:0. Which as I have read, can stop it from being compatible with some computers and phones.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This doesn't seem to be an attribute I can change. So I can't simply say, show this Arduino as a keyboard, now send this signal. So it appears I'll need to do a bit more work.
edit:
It looks like Android has an option to allow the device to have specific properties based off a file. So like semi-drivers. It seems I have to just put the file in one of the allotted locations. http://source.android.com/tech/input/input-device-configuration-files.html
Last update for the night:
I found these links. Which is an arduino compatible bluetooth module that supports HID out of the box. HID would allow me to not need to make drivers or custom .idc files. The bluetooth would be recognized as a keyboard right away. I would recommend this path for anyone else as it seems easier.
http://www.kobakant.at/DIY/?p=3310
https://www.sparkfun.com/products/10938? and the manual http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Wireless/Bluetooth/RN-HID-User Guidev0 05.pdf
So my current progress is that I still need to find a way to get Android to treat my module as a keyboard. I tried making an .kl with the same name as my bluetooth module. But I don't think the input system recognized bluetooth the same as it does physically connected devices. I wasn't sure of the syntax needed for the idc file to declare the device type to keyboard or HID. I could just try some guess in check.

I haven't put much here for a little while now. I haven't made too much progress. I figured I would start with a simple usb idc files and see if I can get any luck with that, then go with wireless. I have a strange little issue though, my cheap touchscreen I have laying around seems to use a character not normal to ascii. Well it is 00000100 in binary, or the EOT character. Which I cannot save a file with such name. So now I hope to find a way to put a wildcard in the idc file name. If that won't work I'll probably fall back to trying to communicate with the arduino via usb.

Have you been able to make any progress on this? Im working on a similar project, using an arduino uno and a bluesmirf HID module to try and adjust the volume and track of the songs played in a music player on a galaxy tab 2.0. I am not even sure where to begin though. Im still working on getting the android codes for certain hardware/software button pushes. Once I have those though, Im not sure how to get the tab to recognize it as the code for the command instead of just an ascii string.
This is all very confusing.
xCaldazar said:
I haven't put much here for a little while now. I haven't made too much progress. I figured I would start with a simple usb idc files and see if I can get any luck with that, then go with wireless. I have a strange little issue though, my cheap touchscreen I have laying around seems to use a character not normal to ascii. Well it is 00000100 in binary, or the EOT character. Which I cannot save a file with such name. So now I hope to find a way to put a wildcard in the idc file name. If that won't work I'll probably fall back to trying to communicate with the arduino via usb.
Click to expand...
Click to collapse

xCaldazar said:
I haven't put much here for a little while now. I haven't made too much progress. I figured I would start with a simple usb idc files and see if I can get any luck with that, then go with wireless. I have a strange little issue though, my cheap touchscreen I have laying around seems to use a character not normal to ascii. Well it is 00000100 in binary, or the EOT character. Which I cannot save a file with such name. So now I hope to find a way to put a wildcard in the idc file name. If that won't work I'll probably fall back to trying to communicate with the arduino via usb.
Click to expand...
Click to collapse
Hello xCaldazar,
Thanks for sharing your experiences. They are really helpful. Do you have any progress on this project? Could you be able to get touch events (and also key pushes) from your external touchscreen to the Android Phone?

Related

Blimkeys - an SMS-like text-input method software

Blimkeys is a standard Software Input Panel for PocketPC 2002 and WM2003 based PDA-s.
You can input text to your PDA like write SMS on a regular cellphone.
This method is quite fast, and you can use it one hand.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Blimkeys is under development. Let's try it! Every useful tipps, suggestions, bugreports are wellcome.
The homepage of the project is here:
http://sala.sallala.hu/pda/blimkeys/blimkeys_en.html (English)
http://sala.sallala.hu/pda/blimkeys/blimkeys_hu.html (Hungarian)
You can download Blimkeys from the links above.
Nobody try it?
Sallala
installation problems.,.,.
i tried it but this is what i get :
Can't load
"\windows\dvoraksip.dll",
GetLastError returned :
193: %1 is not a valid
Win32 application.
plz help.,.,..,
Great
Hi, this is great idea as I'm looking for this type application for past 1 year. But, the file unable to load.
Hmm, maybe I uploaded the wrong file? I made it late time. Maybe I uploaded the emulator's version. It's not for ARM CPU but for x86.
One moment, and I grab the dll from my XDA and change the uploaded file.
dvoraksip.dll updated!
Ok, I am sorry, I uploaded the x86 file.
Now, I updated the dll.
Try to download again above!
Now that is a working copy, from my XDA.
Oh, and I tryed with my friend's Himalaya earlyer, and it worked with.
New version with space and backspace, and maybe with capital letters coming soon next week.
a couple of quick comments...
1. I find the time for double and tripple clicks is too short.
2. Would be great if it had predictive text capabilities
ok it worked this time, seems to be a nice app.
i suggest that T9 type input as an option would be a good idea, with cutom dictionary which can remember new words.
anyways bro, VERY NICE WORK!!!!
keep it up.
Good suggestions.
- Yes, timedelay will be configuralble. As I remember, now it is 400ms.
- Of course, I planed to integrate predictive input. (With an independent dictionary from MS) This time I don't know, how to make that, but it will be user editeable, or convertable-importable from/to txt or other simply file format. I like to support different languages.
My plan is:
TODO:Most important
- space, backspace, enter
I think backspace will be a horizontal line with the stylus right to left, and space will be a rhumb left to right, like in Letter Recognizer. Or let the rhumbs will be the cursor move keys? And how to implement the enter key?
- Capital letters, numbers, signs
TODO:That I like to develop before other things
- internationale support, first for hungarian keys like: óüöúőűáéí
- copy, cut, paste shortcuts? Like my earlyer project (see my homepage for (only) screenshot)
- options page for customization, (like time delay)
TODO:Other things
- Predictive input
- ...
Thank you for the interest!
Oh this is cool. I am also interested in this. I've been looking for a one hand SMS, getting tired sms'ing with the stylus. Thanks for the great effort.
Ive also been looking for the same kind of program. It´s great that you make this effort. Looking forward for future programs. Once it´s done, i will defenetly make a donation to support further versions!!
It is very good!!!
Hi Sallala.
I think that it could be very usefull. It is what I need.
I've tried to use it in the default SMS client and I dont' know why in the field to find the contact you can not write other letters than the first (for example you can not write the letter b, but only a).
In any case I think that you made an eccelent work.
I hope you will go further with this wonderfull piece of software.
Bye,
Uros
Re: It is very good!!!
Urosh said:
I've tried to use it in the default SMS client and I dont' know why in the field to find the contact you can not write other letters than the first (for example you can not write the letter b, but only a).
Click to expand...
Click to collapse
Did you mean:
Start to write a new (SMS type) message, in the Inbox application, and you can't type corectly tha "To:" field?
I tried this. This is worked me fine, as in other windows. The delay time, while you switch a->b->c is quite short. Maybe this was the reason to you.
I also tryed the find contact window, and it works.
Did you know? When you press the Contact HW button, and start typeing, you immediatly type to the "find contact" box. To click in it, before typeing is not neccesarry ;-)
Question
Question
- How to implement the enter key?
A stroke up->down?
- How to implement the space and the backspace key?
A stroke left->right and right->left?
- How to implemet the cursor move-keys?
Strokes are make conflict with I write above
Let's response fast, I like to program it tonight!
Do remember, I waiting for methods that we can do with one finger without the stylus.
And I think there is no more space for another column of buttons. I think the size of the buttons now exactly good for komfortable typeing.. Or let's try more buttons?
Sallala, can you position the buttons just like that of a regular cell phone? and place the letters according to those of a regular cell phone? this way, it will be easier to switch from cellphone to xda and vice versa. you may follow the interface of WM2003's phone interface. i find it already comfortable dialling with one hand. what do you think?
Hi Boybi!
Urosh suggest this layout, and I think it's good.
The buttons are enough big to typing one finger, and it's size the same as the other input methods.
The normal GSM phone keboard have four row. That's mean, if I change the layout to your suggestion the panel height will be twice.
Let's take a look for example pocket excel! If the keyboard height is twice, and it is open, you can view only 4-5 rows from the excel sheet, because there is a formatting tab and a satuts bar too in excel.
But of course, typing maybe easyer on a bigger keyboard. And I know, peepole like the conventional methods.
So this is not a wrong idea, but I like to finish this layout first, and after, let's go back here! I think it is not a big work, to transform the layout.
Thank you!
i forgot the software you're developing is an Input Method and not a regular sms software. if this were a regular sms software, then i would strongly suggest to stick with a regular phone's layout.
great work Sallala! hope you could finish it soon!
Re: It is very good!!!
Sallala said:
Urosh said:
I've tried to use it in the default SMS client and I dont' know why in the field to find the contact you can not write other letters than the first (for example you can not write the letter b, but only a).
Click to expand...
Click to collapse
Did you mean:
Start to write a new (SMS type) message, in the Inbox application, and you can't type corectly tha "To:" field?
I tried this. This is worked me fine, as in other windows. The delay time, while you switch a->b->c is quite short. Maybe this was the reason to you.
I also tryed the find contact window, and it works.
Did you know? When you press the Contact HW button, and start typeing, you immediatly type to the "find contact" box. To click in it, before typeing is not neccesarry ;-)
Click to expand...
Click to collapse
I've tried it again and it works OK.
I don't know why it didn't work before.
Well done!!!
Uros
Re: Question
Sallala said:
Question
- How to implement the enter key?
A stroke up->down?
- How to implement the space and the backspace key?
A stroke left->right and right->left?
- How to implemet the cursor move-keys?
Strokes are make conflict with I write above
Let's response fast, I like to program it tonight!
Do remember, I waiting for methods that we can do with one finger without the stylus.
And I think there is no more space for another column of buttons. I think the size of the buttons now exactly good for komfortable typeing.. Or let's try more buttons?
Click to expand...
Click to collapse
For the cursors is it possible to use the 5 way HW pad? It could be the best solution.
For backspace it could be that you have to press any button for 1 second.
I think also that you can make two more buttons on the right (where now you have three buttons that doesn't work). In this manner you can make the last position (for example the first button abc1) for the numbers. The last two buttons should have also spacebar and other 5 or 6 characters (for example [email protected]? ecc. or what we need most).
What do you think?
Urosh
I forgot another thing.
It could be better if you implement a sound ("bip") or something like this when you tap. It is better to hear the tapping to know how many times you tap.
bye,
Uros

VJCandela - torch/flashlight on HTC Phones

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.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This software is semi-commercial.
This means, if you like it and use it, please make a donation on my webpage. 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, 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
V
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.
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)
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.
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
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).
wizard
only screen off option works
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
vijay555 said:
The app is currently around 100k. Most of that is the graphics. I will release a lighter version shortly without the graphics if required.
Click to expand...
Click to collapse
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
£5 - good for a few pints - is on its way!
:wink:
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:
Code:
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:
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
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
not working on k-jam i.e.wizard
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...
Erm
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...
TheBlasphemer said:
Why on earth are you communicating with the driver directly?!
Click to expand...
Click to collapse
Driver? I have traced it down to the ASIC3 GPIOA10 bit :lol:
http://wiki.xda-developers.com/index.php?pagename=UniversalASIC3
TheBlasphemer said:
Erm
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...
Click to expand...
Click to collapse
Doesn't work on my Wizard (SPV M3000) because HTCCamera1.dll is not found.
I just found HtcCameraUtility.dll in \Windows
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
vijay555 said:
ei99070: post links anywhere you wish.
The reg key cab is exported from my Universal. Might be a problem, anyone else tried it?
Click to expand...
Click to collapse
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
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++)
Code:
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,TEXT("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);
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!

[APP] use 614 number keys as a d-pad

(Original post here.)
EDIT: The program has been updated from version 1.0.0.1 to version 1.01. Changes include:
-Keys now follow the screen orientation, even when rotated.
-OK + red phone key = toggle radio (ie, turn phone on and off)
-OK + C = toggle bluetooth
-OK + Enter key = toggle wifi
-Windows + * key = toggle keyboard backlight
-Windows + # key = turn off screen (does NOT put device to sleep! wifi will still be on, programs will still run, etc.)
*****************************
gudong over at PDAClan has just written a program that allows you to use the number pad on the 614 as a D-pad. It works like this: hold down the end call button for 1 second, and the red LED will light up to let you know it's working. When it's on, the number pad keys have the following functions:
1:Home 2: Up 3: Page up
4: Left 5: Enter 6: Right
7: End 8: Down 9: Page Down
0: Tab
To switch back, just hold down the end call key again.
Also, you can change the backlight by holding down the Windows key and a number:
win + 7: 1st level of screen brightness, with the keyboard backlight off. Good for using indoors in average lighting.
win + 8: 2nd level of screen brightness, also with keyboard backlight off. Good for bright rooms and outdoors.
win + 9: Brightest level (use when in direct sunlight)
win + 0: Lowest brightness level, keyboard backlight on. Good for dark rooms and nighttime.
Enjoy!
oh yeah! Nice application. I was trying to do something similar with Aebutton, but this is really great.
Found some bugs, softkeys are not working. Is it possible to fix it?
Really? My softkeys are working fine. You mean the physical softkey buttons, right?
Oh man, uninstalled aebutton and now all correct
Thanks for the application ))
wow thats really good!
but one small thing, how do you close it completely? I've pressed the end call button, but i am still able to change brighness with Win+7, 8, 9, 0 keys. But the D pad function does not work.
edit: Anyway to change the keys? Tried this on a simple menu, and it all works but my "C" cancel key does not exit the menu so there is no way to cancel using the buttons. Could the "tab" (0) key be made into a cancel button?
You don't really need any additional software if you only need up/down/left/right arrows, just swipe your finger from the center of the keypad to side (without pressing buttons, like you do with the wheel).
kuchin said:
You don't really need any additional software if you only need up/down/left/right arrows, just swipe your finger from the center of the keypad to side (without pressing buttons, like you do with the wheel).
Click to expand...
Click to collapse
yes but what happens if you want to press left 10 times? with the above software you can press and hold "4" and it will do it, otherwise you'll need to do 10 swipes of the finger.
i find that when i do sms'es i often corrent mistakes like that, my finders to big to use the touch screen to put the cursor between two "i"s
also withthe software enabled you can use the "swipe" method as well as the "ring" plus the dpad options so now i use the ring to scoll to a selection then press the "5" button to make the selection instead of the akward return key.
great update!
having the option to turn BT/wifi/phone via hardware butted is great, i do have it already via touch screen buttons, but this saves me tapping the touch screen as often
Btw you need to post (not edit) that the files been updated (to bump this thread up) otherwise everyone will think theres no change and not both looking at the thread!
Thanks
Thanks. This is one of the most useful apps for the ipaq. It's the first one i install after hard reset. One idea - is it possible to make use of the other keys like the win and ok key and the softkeys. I'm not sure if it's possible but here it is: The softheys become delete and enter keys (like in old handsets) and we use the win, ok , C and ENTER keys on the keyboard. I'm not sure if it's a little too much , as this could mean modifying some of the dlls. Really - i don't know programming at all. Don't get me wrong I really like this program and realise that even having this is more than enough - use it very often and it's just great. It's just a suggestion, not a request. The purpose - maybe a half qwerty keyboard.
Great app
I have been looking for something similar for a long time!
Now I can run CoolCamera. Does anyone knows how to change video resolution to 640x480?
Lp Grga
Hello,
Can anybody help me with installing of this? I downloaded Zip file and there is only one .exe file in it. But i can not run that exe file corretly. Where is problem?
Thx
---------------------------
...\CZ612Key.exe
---------------------------
...\CZ612Key.exe is not a valid Win32 application.
---------------------------
OK
---------------------------
it's not a windows instller. It's the application itself. Just copy it in on your device in the folder /windows/startup and you're good to go.
Thx for hlp. I found that this soft working and i'm able to change brightnes but not able to activate Dpad with Red end call button.
If i hold it for 1s or longer i could not see any led flash and also not able to use Dpad.
I did not use any software for button mapping.
Any idea what is wrong?
I got the same problem above...
i just got the problem yesterday.. the day before the program works just fine.. i love it.. but suddenly i cannot activated the dpad using end button... my iPAQ is fully loaded.. but i don't using other keymapper..
i was thought that SPB keyboard is not compatible with the keymapper.. but after i uninstalled the spb the problems is still...
is there any way to activated the dpad rather than pressing the end button?
or other keymapper program that works like it?
thx
you need to run the program again if you reset your device.
I have mine to do a weekly backup at 2am Mondays So when i wake i have to run the dpad program to have it active for the rest of the week.
If you want the program to start every time you restart the device, I recommend copying the .exe to \Windows\Startup. That way it starts every time your device does.
Ah, life saver..
Now I can play space invaders without pulling out my BT keyboard.
this one is realy great but unfortunatly,
the -Windows + # key = does not really turn off the screen, it just shows a black screen
I ve made an icon for this great application
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
albertorrent said:
this one is realy great but unfortunatly,
the -Windows + # key = does not really turn off the screen, it just shows a black screen
Click to expand...
Click to collapse
That's right, it still draws power.
But getting back to this program. This is just so good, thanks for sharing
And the icon looks great, thx.
If all ipaq 6xx series users know about this, they definitely would want one too
Just the battery issue now

Remote Touch Delta 2.0: Quickest remote control + File Transfer app.

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
For all the latest news & details check out
http://t2remotetouch.blogspot.com/
The quickest remote control application to control your computer using your Windows Mobile phone. Really easy to use, powerful and free. Designed with touch screen in mind.
Send and Receive files from your PC and mobile while using Remote Touch. It works in a way that you can Send, Receive and control your PC all at the same time (i.e really fast) !!
There are Click Mode, Overview Mode, Scroll Mode and D-pad for easy navigation.
How does it work ? See it in action.
You Tube Video: Remote Touch Delta Feature Walk-through
http://www.youtube.com/watch?v=DqAc-ZEiv6w
You Tube Video: Using Remote Touch Keyboard Maker to create your own keyboard.
http://www.youtube.com/watch?v=L8jbt5TQULM
A step by step guide to installing remote touch here:
Installing Remote Touch
http://www.youtube.com/watch?v=DZ8aR-XIyFQ
# Delta v2.0
* On Screen Display (OSD).
* Internet Browser Osd.
* Configurable Keyboard (Create your own Remote Keyboard !).
* Click Mode Osd.
* Scroll Mode Osd.
* Overview Mode Osd.
* Notification Bar.
* Improved Zoom Quality.
* Keyboard Preview.
* HW Keyboard Support (Updated 11.05.09).
Gamma v1.3 Updates:
+ Proper WM5 Support.
+ Change profiles/quality settings on-the-fly.
+ Faster Landscape / Portrait Rotation.
+ Better Minimize Functionality.
+ No longer Always-on-top.
+ Installs for all Users.
Gamma v1.2 Updates:
+ Landscape + Portrait Orientation support.
+ Minimize Remote Touch. (Only works on some mobiles atm.)
+ Massive Remote Touch Keyboard Upgrade.
+ Scroll Mode Architecture Overhaul.
+ Dual Monitor Support.
+ Improved UI.
+ Various Bug Fixes (Full Screen etc).
+ Removed Feature: HW Keyboard Support.
(Commercial Version also available now.)
Gamma v1.1 Updates:
+ Color scroll mode.
+ Multiple Server Profiles.
+ Start up loading screen.
+ View layers (like Windows Sidebar in vista).
+ Bug Fixes
Gamma v1.0 Updates:
+ File & Clipboard transfer between mobile & PC.
+ Schedule transfer from your PC.
+ D-pad navigation.
+ Hardware keyboard support.
+ Bug Fixes.
Beta2 Updates:
+ Fixed memory usage. Works well now on high resolution phones like HTC Diamond, Touch HD.
+ Use either IP Address (e.g. 1.2.3.4) or DNS Name (e.g johnsmith.no-ip.biz) in the Remote Touch on your Windows mobile.
+ Improved keyboard functionality.
Requirements:
+ Windows Mobile Pocket PC
+ Windows Computer to control.
+ Wifi or internet connection.
Remote Touch is free, but if you like the software and use it, why not donate something ?
Woah!!!
Impressive!!!
my feeback:
when i run the program for the first time it's not full screen for the top and i need to press (Home) button so the program goes to the background and call itself again to work properly
anyway i liked it and i think with some more developing it'll be fantastic!
keep up the good work!
Prof.Kamil
I have to say man. I'm very impressed. You've managed to do what LogMeIn has been doing commerically. I love that it's free. I for one love the functionality, it is not that attractive in my opinion, but the functionality matters more. I'll be keeping this app.
Kraize
P.S I like your music choice
Cool! I did something similar with Omnipresence a while ago (check my signature), but got bored with it, as I do with many of my other projects. I actually mean to open source that code as a reference to other developers. Cool stuff nonetheless!
Edit:
What sort of compression algorithms are you using? Are you just sending raw frame buffers, or sending PNGs in sequence? Are you sending the entire screen, or just the portion being viewed?
Remote Touch is my first app for my first WiMo phone.
I made it as I couldn't find anything free that was
fast (fast = quick start up, quick to control). I use it mainly
to control my PC attached to my plasma when watching movies or
listening to music. Also for transferring music across from
my PC without having to connect my HTC Touch every time (so annoying !).
It's a work in progress ... will fix them over time.
@Koush:
I use an algorithm similar to deflate - my own though.
Can definitely improve on it ...
great application indeed...
yeah i was looking for something like this! thanks a lot!
*Add to subscription*
definitely a nice app! keep up the good work m8!
download link from the website is blocked on my ISP. could you upload it to rapidshare?
Have no menu. pressing home button kills the app, and can't run it again hope SR will help
Kainous said:
download link from the website is blocked on my ISP. could you upload it to rapidshare?
Click to expand...
Click to collapse
I've used mediafire for sharing as well. (I'm not a fan of rapidshare).
Can you go back to my website and try again ?
http://t2remotetouch.blogspot.com/
koven said:
Have no menu. pressing home button kills the app, and can't run it again hope SR will help
Click to expand...
Click to collapse
Can you email me details of your phone ? ([email protected])
I have a feeling the reason you couldn't run it again (or seemed like it) was the old instance was still possibly running on your phone and the new instance was trying to connect but the server was still connected to the old instance.
killed the instance and no go either.
made a SR and now working but without the menu - home button helps
Color me impressed!
I've used LogMeIn, RemoteDesktop, etc. to control a desktop from my mobile device and they work, but this just seems a bit faster all around than the others (which I know was the point *grin*).
I tested it connected directly to my PC which of course was fast, but it's very usable over a 3G internet connection as well.
There are certainly bugs to be worked out and refinements to be made, but I'll be following the development closely. Luckily the bug where you get no menu bar isn't a show stopper for me as I have a "home" hardware button that for some reason always fixes the missing menu bar. I'll send in some feature requests to the email address listed.
Thanks for your work on this!
Nice but doesnt work in landscape on my Samsung Omnia and in portrait the image looks a bit squeezed.
Yeah it doesn't work right in landscape mode which is honestly the best way to see more of the screen IMO.
The looking squeezed problem seems to be related to the fact that you aren't able to select what you view using any sort of set aspect ratio so if you select a long rectangle then it squeezes that region to fit your mobile screen. I suppose that could be useful at times, but I feel we need an option to select a rectangle that already matches the aspect ratio of our mobile screen so what we view may be zoomed, but never has to be distorted (squeezed or stretched.)
another problem. I can connect using cable but when I try wifi with 192..... or www. (dyndns) the best I can get is black screen (it connects but I can't see the desktop). I've setup my router to leave proper port open but no go. any ideas?
Aspect Ratio.
AlienHairball said:
Yeah it doesn't work right in landscape mode which is honestly the best way to see more of the screen IMO.
The looking squeezed problem seems to be related to the fact that you aren't able to select what you view using any sort of set aspect ratio so if you select a long rectangle then it squeezes that region to fit your mobile screen. I suppose that could be useful at times, but I feel we need an option to select a rectangle that already matches the aspect ratio of our mobile screen so what we view may be zoomed, but never has to be distorted (squeezed or stretched.)
Click to expand...
Click to collapse
Actually, Remote touch tries to remember the aspect ratio across sessions, which was something I really wanted, so if I zoomed in on something and reconnected, I'd be looking at the same thing and the same zoom level.
To fix the problem your talking about, goto Menu > Reset and it will bring the aspect ratio back to 1:1 with your screen (so useful when you go to landscape mode).
koven said:
another problem. I can connect using cable but when I try wifi with 192..... or www. (dyndns) the best I can get is black screen (it connects but I can't see the desktop). I've setup my router to leave proper port open but no go. any ideas?
Click to expand...
Click to collapse
I'm thinking the problem is related to something another person had similar issues with:
http://t2remotetouch.blogspot.com/2008/11/workaround-issue-remote-touch-doesnt.html
Let me know how it goes ...

[App] VJSipSwitch II

Guys,
The very first app I wrote for xda devs was SipSwitch, to allow one to change the SIP (software keyboard, transcriber etc) from a shortcut.
I was recently asked to support a particular feature in VJBrisk, which seemed to show a bug in SipSwitch. I couldn't find my old source code SipSwitch, so stupidly I re-wrote the whole thing from scratch. And it turned out that the bug wasn't in SipSwitch, but in the OS. Sigh.
Anyway, please take pleasure from my pain, and enjoy VJSipSwitch II.
This is entirely re-written, and probably buggy, so let me know.
VJSipSwitch II works like SipSwitch:
Make a shortcut to VJSipSwitchII, and specify command line parameters which match the name of the SIP you want to switch to.
Launch the shortcut and your phone will switch to that SIP.
This is useful if you want to, for example, always use SPB Keyboard as your default SIP.
eg:
PHP:
"\Program Files\Vijay555\VJSipSwitchII\VJSipSwitchII.exe" spb keyboard
will switch to SPB Keyboard.
Bonus Feature:
If you launch VJSipSwitch II without a command line parameter it will now pop up a menu asking you which SIP to switch to. This is good for one handed use.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
​
V
Download from here:
http://vijay555.com/vj/releases/vjsipswitchII/vjsipswitchii.cab
For help on making command lines
http://www.vijay555.com/?Help:Command_Lines
DOWNLOADING NOW ....
thanx ....
what is that at the bottom of the screen shot ( two squars and the d-pad in the middle) thanks
@irus:
It's an app I've developed for the Blackstone, VJVirtualMouseWinFX(code name only, for now!). A clearer screenshot is here.
It's a virtual mouse pad (left square), which acts like the optical mouse on the Samsung Omnia, an emulated dpad in the middle, and a zoomed in "preview" zone showing what's under the mouse pointer, on the right. This square also acts as the "left click" for the mouse.
V​
Thanks vijay555
I´ll try it!
thank you for sharing!
It works on my phone. But one question, it seems a bit slow to pop up the muen, can it be a little faster?
Thank you!
I don't think it can really - the slowest part, enumerating the SIPs, takes approx 350ms on my system, and that part can't really be made faster.
I'll have another look over the code to see if I can streamline it a bit further, but the slow bit can't be made much faster as it's OS dependent
V
vijay555 said:
I don't think it can really - the slowest part, enumerating the SIPs, takes approx 350ms on my system, and that part can't really be made faster.
I'll have another look over the code to see if I can streamline it a bit further, but the slow bit can't be made much faster as it's OS dependent
V
Click to expand...
Click to collapse
Sorry and thank you! Maybe it's the problem of my phone, it's always slow to switch the input keyboard. It takes more than 1s to show up the muen
i like whatever you make.
semi-unrelated question:
could you write sipicon window( on softkeybar etc) hider?
some soft seem to have problem with sipicon space, goddamn rectangle - it pops up not exactly where and when it should(sipicon is seen as window in taskman 3.x which can hide that thing, but it's not exactly pleasant/automated way..).
sipicon is annoying with wad, today replacements, softkeybar removal(sometimes), other soft..
your tool may be sipicon hider helper.
Thanks a lot, included the bonus.
And I am waiting your dpad too.
May I ask for three bonus?
- instead to have only one sip in the command line, alow more than one, and switch between them.
- add in your command line the capability to activate, deactivate, or switch between both status.
- have an exclusion list in your enumaration screen (this one is less, less useful, but useful)
Concerning enumeration of sips, may I propose you that you to not do it each time but use a cache (in memory if the application is resident, or in a file if not). And a command line to update the cache.
thanks a lot VJ
@nothin: I'll try to write something like this. Although easy to do achieve, a neat solution will be fairly messy to write I think (if anyone wants to, make a dll with a dummy wndproc for WM_WINDOWPOSCHANGED, then inject this into the OS and subclass MS_SIPBUTTON's wndproc to point at the dll wndproc; this will save a process slot and resources).
@thierryb: caching the menu is probably a good idea; I will try it at some point, but I'm thinking that for the chance of a cache clash (ie the cache being invalid), and the extra code required to find, load and parse the cache, it probably won't be a great deal faster than enumerating from scratch. As I said, the OS SIP enumerator takes around 350ms. Registry enumeration takes around 400ms so I use the OS enumerator.
On my Blackstone, showing the menu takes less than 1second - it's not instant, but hopefully not a massive inconvenience. How long does it for the menu to come up on your devices?
- instead to have only one sip in the command line, alow more than one, and switch between them.
Click to expand...
Click to collapse
This one is probably possible. I'll try to add this
- the capability to activate, deactivate, or switch between both status.
Click to expand...
Click to collapse
This one is easy, but I'll have to add proper command line switches, eg
PHP:
VJSipSwitchII.exe -sip "keyboard" -toggle
etc, and this will take more time.
an exclusion list
Click to expand...
Click to collapse
again possible, but if this is for the sake of saving time, again, I will have to enumerate all sips merely to exclude one, so it'll be marginally slower, not faster! If it's for the sake of a neater menu, then it's a good idea.
I'm prioritising work on VJVirtualMouseWinFX for now, but if I find myself with some time I'll consider adding some of the above.
V
Guys,
An alternative for switching keyboard for the SIP menu selection is available in the FingerMenu app (on this forum).
Basically it's a big button finger friendly method of changing all of the WM menu's to be more Manilla-ish. There is an option for taking over the SIP menu in the Options.
Just an alternative you could use for the Menu side of things...
Cheers
This is useful if you want to, for example, always use SPB Keyboard as your default SIP.eg:
PHP:
"\Program Files\Vijay555\VJSipSwitchII\VJSipSwitchII.exe" spb keyboard
will switch to SPB Keyboard.
Maybe stupid question but where should we typpe that and how?
I searched in your forum but found nothing about VJSipSwitch there.
Thanks in advance.
make a dll with a dummy wndproc for WM_WINDOWPOSCHANGED, then inject this into the OS and subclass MS_SIPBUTTON's wndproc to point at the dll wndproc; this will save a process slot and resources).
Click to expand...
Click to collapse
it would be just PERFECT method...hm.
but i'll take any method for sipicon hide, actually.
Again: Maybe stupid question but where should we typpe that and how?
I searched in your forum but found nothing about VJSipSwitch there.
Thanks in advance.
sergutel said:
Again: Maybe stupid question but where should we typpe that and how?
I searched in your forum but found nothing about VJSipSwitch there.
Thanks in advance.
Click to expand...
Click to collapse
...just make shortcut with that text...jesus plzz.
make txt file, paste this
"\Program Files\Vijay555\VJSipSwitchII\VJSipSwitchII.exe" spb keyboard
there, change txt to lnk, that's all..
Making a shortcut
Guys,
Read here to find out how to make a shortcut with a command line
http://www.vijay555.com/?Help:Command_Lines
@nothin: although that works, it's best to write
69#"path\to\exe.exe" my command line
The 69 should be the length of the .lnk file, although it is ignored by the OS, so can be any number.
However, VJBrisk 0.4 onwards uses the # to identify the .lnk, so if you're using VJBrisk with VJSipSwitch II (which was the start of the development of VJSipSwitch II), then it's best to make a proper .lnk file.
V
Welcome back bro... been a long time since you disappeared.
Cheers
vijay, it takes about 0.nothing seconds to load on my polaris. really, i click it and it's there. wonderful work. thanks
impressive!
Strangely, this is speedier than the usual approach of clicking the SIP arrow!
Naturally, I have no complaints - great job

Resources