IVE MADE USB GAMEPADS WORK ON OUR PHONE!!!!! now you can play your nintendo, super nintendo, genesis and playstation emulators on your T.V. and have a matching remote to boot.
You will need the following:
Registry Editor
Hidgamep.dll file (included)
4 in1 cable (and usb gamepad ) any with 1 joypad will work.
1. you will need to unzip the hidgamep.dll file into your windows directory on your phone.
2. open your registry editor, and find the directory [HKEY_LOCAL_MACHINE\Drivers\HID\LoadClients\Default\Default
3. add the value "1_5". ( dont put the "")
4. open the value 1_5 and add the value "gamepad" ( dont put the "")
5. now add the key "hidgamep.dll" ( dont put the "") (this step makes windows use the driver)
6. save your work remove the usb device and reboot your phone.
7. now if you did this right, when you plug in your usb game pad it should give you a message. now all you have to do is set the buttons on your emulator and your off to gaming like a pro!!!!
Questions? email me
If you have any questions please email me at: [email protected]
if you want any other help also email me.
Where do you get a usb game pad? Kind of lost here. Seems interesting though.
it would be nice if you can port USB MassStorage Driver into Athena~
rickyrvl said:
it would be nice if you can port USB MassStorage Driver into Athena~
Click to expand...
Click to collapse
it already has this ??? but there is a size limit
where can u find the playstation emulator
Very interesting! Great work!
Does a normal USB-keyboard work with this?
(And is there a way to use localized keyboards with the Athena?)
Think I shall give this another try
I found the .dll on another forum a while ago but could not get it to work but might of been a very very ancient copy but I think I shall give this a try again, a couple of quick questions do you know how many buttons the .dll supports? And also does it map the pad to the standard joystick layout for games that do not allow you to reconfigure the keys?
If all goes well might consider getting one of these http://www.geniusnet.com/geniusOnli...50&_pageLabel=productPage&test=portlet-action
cuba3377 said:
IVE MADE USB GAMEPADS WORK ON OUR PHONE!!!!! now you can play your nintendo, super nintendo, genesis and playstation emulators on your T.V. and have a matching remote to boot.
Click to expand...
Click to collapse
Do you know if this work on other WM devices too? I might try it next week if you are not sure.
My guess is "no" since it requires a USB host which only Advantage has...
update
this driver supports 2 axis controller and up to 8 buttons.
kareem9nba said:
Where do you get a usb game pad? Kind of lost here. Seems interesting though.
Click to expand...
Click to collapse
you can get a universal usb gamepad anywhere. i got mine at superwalmart 9 bucks
rickyrvl said:
it would be nice if you can port USB MassStorage Driver into Athena~
Click to expand...
Click to collapse
the driver for a mass storage device is already installed. i looked into it. the thing is that the battery on a phone is about 3.7v. a regular usb port has alot more than that. dont expect to power a hard drive with such low current. the drivers are installed so if you use thumb drives or multi usb port drives it will work.
irus said:
where can u find the playstation emulator
Click to expand...
Click to collapse
search google for ps emulator windows mobile fpsece
Moskus said:
Very interesting! Great work!
Does a normal USB-keyboard work with this?
(And is there a way to use localized keyboards with the Athena?)
Click to expand...
Click to collapse
the driver is already preinstalled with windows mobile 6. aslong as the current draw of the keyboard isnt more than 3.7 v
Oberth said:
I found the .dll on another forum a while ago but could not get it to work but might of been a very very ancient copy but I think I shall give this a try again, a couple of quick questions do you know how many buttons the .dll supports? And also does it map the pad to the standard joystick layout for games that do not allow you to reconfigure the keys?
the reason it didnt work is because the buttons need to be maped correctly. all my driver does is tell the pda what we want it to do when you press buttons. the axis is the directional keys on the board.
if you did want to reconfigure the map. its just plug n play with the driver, just remove the current mapping and add the keys you want to the driver. also u will know when u did it right because you will get a pop up box
Click to expand...
Click to collapse
It works
Hi Cuba337,
Got it sussed and now it works with a couple of joypads might get the one I linked above now. For anyone else trying this and getting stuck I found you need to tweak the intructions given.
Step 3, Add a new KEY named "1_5" (ignore the " ")
Step 4, Add a new KEY named "gamepad"
Step 5, Add a new STRING value called "DLL"
Step 5a, edit the value and enter "hidgamep.dll"
And that does the trick for me did not bother reseting the phone just plugged a pad in and it worked. It works with both my genuine HTC 4-in-1 cable and my no name 7500 dock with 2 usb ports on the side. It does feel a touch unresponsive but the only digital gamepad I have laying around is rather shoddy and my other spare pad has analogue pads which it's not keen on either so will get new pad and see what happens, will also see if the new PK4.0 rom helps when that comes out.
Thanks Cuba337
cuba3377 said:
IVE MADE USB GAMEPADS WORK ON OUR PHONE!!!!! now you can play your nintendo, super nintendo, genesis and playstation emulators on your T.V. and have a matching remote to boot.
You will need the following:
Registry Editor
Hidgamep.dll file (included)
4 in1 cable (and usb gamepad ) any with 1 joypad will work.
1. you will need to unzip the hidgamep.dll file into your windows directory on your phone.
2. open your registry editor, and find the directory [HKEY_LOCAL_MACHINE\Drivers\HID\LoadClients\Default\Default
3. add the value "1_5". ( dont put the "")
4. open the value 1_5 and add the value "gamepad" ( dont put the "")
5. now add the key "hidgamep.dll" ( dont put the "") (this step makes windows use the driver)
6. save your work remove the usb device and reboot your phone.
7. now if you did this right, when you plug in your usb game pad it should give you a message. now all you have to do is set the buttons on your emulator and your off to gaming like a pro!!!!
Click to expand...
Click to collapse
nice job... just one question does it work with any game pad?
Awesome job
Thanks for the .dll posting and the notice to get things working for the gamer in all of us
Can you post links to the set of utilities that you are using? A consolidated list of game emulators and versions that support the config that you are using and talking about?
I have all of the older emulators, but I have had trouble getting many of them to work in REALVGA mode. Do you have yours working in VGA mode? Since you have a working solution it would be really really cool to get all of the links from you for the solution that you have put together. I would personnally be grateful for the time saved from testing unknown configurations...
Thanks,
Bob
Auto Config File For The Dll
Instead of asking for it I am deciding to post it. LOL
Create a .REG file and place this into it's content.
Code:
[HKEY_LOCAL_MACHINE\Drivers\HID\LoadClients\Default\Default\1_5\gamepad
"DLL"="hidgamep.dll"
Place the file on your device and run it. I don't know if the run method works as it should on
a windows pc but it should in theory. After a successful merge of the file you may delete it.
Personally I would place it in the DLL's zip file so it does not get lost for future installations.
If there is a CE Hacker out there looking for an example to follow you might want to
consider the following information taken from windowsfordevices.com
DB files define the default RAM-based property database for the object store. The
syntax is a bit cryptic, but it is documented. For Platform Builder-generated systems,
it is rare to need to use the database at all, except to set up the automatic
connection for ActiveSync, as follows:
Code:
; This is the database initialization file.
; format is as follows -
; Database : db name : type in hex : num sort order : hex propid : hex flags ....
; CEDB_SORT_DESCENDING 0x00000001
; CEDB_SORT_CASEINSENSITIVE 0x00000002
; CEDB_SORT_UNKNOWNFIRST 0x00000004
; CEDB_SORT_GENERICORDER 0x00000008
; A database specifier can be followed by any number of record specifiers
; Record :
; A record specifier can be followed by any number of field specifiers
; Field : hex propid : value [ either string or hex dword ]
; End (ends a matching database or a record context)
Database: "DB_notify_events" : 0 : 1 : 0001001F : 0
; 0001001F - PROPIDR_NAME
; 0002001F - PROPIDR_CMDLINE
; 00030013 - PROPIDR_EVENT
Record :
Field : 0001001F : "repllog.exe"
Field : 0002001F : "AppRunAtRs232Detect"
Field : 00030013 : 9
End
End Database
This DB file will set up the notification database to run REPLLOG whenever an RS232
event is triggered. This will start the connection process on the default "hot plug"
port for ActiveSync.
Maybe you can map an 8-way d-pad with buttons to the keyboard with this method and speed up the response time without using C/C#/C++? I Dunno. I Never heard of
using a DB file as a driver until I read up on the REG files.
For those who don't know but are interested RS232 is Infrared. I'm sure the codes
above could be changed to a USB or even Bluetooth COM Port.
Somebody Push this thread to my favorite COOKS!
Related
lately my cd-rw/dvd rom (combo- matshita ujda770) has been giving me some problems.
it reads CDs and DVDs perfectly but it has stopped burning discs.
it makes ticking noises when i try to write a disc. it has stopped recognising blank rewritable discs although it recognises blank CDs.
i have tried reducing burn speeds till 4x but still had no luck.
is there any software which can tell me where the problem lies.
nero gives a "track following error"
NTI gives "hardware error"
can any softeare tell me if the lens is ok (i've tried cleaning that too)
please help me! (or just tell me how much does a new dvd-writer costs for a laptop acer aspire 5500z)
thanks a lot!
Delete Upper and Lower Filters
Step 1: Start Registry Editor
Click Start, click Run, type regedit, and then click OK. Registry Editor starts.
Step 2: Delete the UpperFilters registry entry
1. In Registry Editor, expand My Computer, and then expand HKEY_LOCAL_MACHINE.
2. Expand SYSTEM, and then expand CurrentControlSet.
3. Expand Control, and then expand Class.
4. Under Class, click {4D36E965-E325-11CE-BFC1-08002BE10318}.
5. In the right pane (topic area), click UpperFilters.
Note An UpperFilters.bak registry entry may also appear. To delete the UpperFilters registry entry, you must click UpperFilters and not UpperFilters.bak.
6. On the Edit menu, click Delete.
7. When you receive the following message, click Yes to confirm the deletion of the UpperFilters registry entry:
Are you sure you want to delete this value?
The UpperFilters registry entry is removed from the {4D36E965-E325-11CE-BFC1-08002BE10318} registry subkey.
Note Do not exit Registry Editor. You must have this program for the next step.
Step 3: Delete the LowerFilters registry entry
1. In Registry Editor, expand My Computer, and then expand HKEY_LOCAL_MACHINE.
2. Expand SYSTEM, and then expand CurrentControlSet.
3. Expand Control, and then expand Class.
4. Under Class, click {4D36E965-E325-11CE-BFC1-08002BE10318}.
5. In the right pane (topic area), click LowerFilters.
Note An LowerFilters.bak registry entry may also appear. To delete the LowerFilters registry entry, you must click LowerFilters and not LowerFilters.bak.
6. On the Edit menu, click Delete.
7. When you receive the following message, click Yes to confirm the deletion of the LowerFilters registry entry:
Are you sure you want to delete this value?
The LowerFilters registry entry is removed from the {4D36E965-E325-11CE-BFC1-08002BE10318} registry subkey.
8. Exit Registry Editor.
Step 4: Restart the computer
If problem persists, remove and re-install your CD Writing software(Nero), if issue is still not resolved, then there can be an issue with the optical drive itself. How old is the drive ?
sorry friend,i did all what u said but still i have the same problem.
my drive is 1 and a half year old.
but i still have doubts because it can read perfectly
btw thanks for ur help.
dumped that cd drive and got a new sony g520a dvd-writer for my laptop today for us$75.
All right mate, even i wuz about to advise you to get the lens changed
even thou laptop optical drives are more expesive then desktop ones
i doubt putting too much efford into fixing one would pay off
there are two lenses on a cd/dvd writer one for reading and one for writing. Just a fact i wanted to share
i think i must have screwed up the "writing" part of the writer!
by the way thanks rohit, rudegar and scousemartin for helping me.
one more thing.
now when i burn dvds using my new writer (using nero)
the buffer level (not on dvd drive but on hard disk) is always less than half utilised whereas the buffer on dvd drive is at 100%
this burner should write a dvd at max 8x but i get a max of about 6x.
is it any problem?
my luck is so screwed up.
today the new sony g520a dvd writer stopped recognizing dvds and is not burning dvds too. although cd read/write is fine.
its been just 3 months and this happened again.
i always write on sony media.
Damn, you have no luck
Reminds me of the days when i decided to stop burning discs altogether, buy 4 Seagate 500Gb hard drives and get them in a raid5 array... I had the same kind of issues you have : readers breaking too often, beloved discs unreadable, important data lost...
Hard drives are way safer (get a raid NAS), and cheaper per Go, and faster... i will never burn discs again i swear.
RAID can b a good option, but it's not always feasible to buy 4 500 GBs of HDDs , that too for a laptop. It's not that its gotta b your hardware (DVD writer) on fault. Can b operating system issue as well.
Uninstall and reinstall your burner application(Sonic, Nero), if you are usin' one. Try system restore, if this thing started lately.
Trust me, small simple things work wonders sometimes. Moreover it's NOT RECOGNIZING issue, check and reinstall the drivers, as well.
Good luck, mate.
**BE VERY CAREFUL WITH THESE TOOLS. IT IS ENTIRELY POSSIBLE TO DO IRREPAIRABLE DAMAGE.**
Ripped from the Xperia ROM, these programs allow control over a number of settings in the device.
RegisterEditor should allow direct reading and writing of registers on the qualcomm msm72xx chipset, which will allow control over virtually every setting available, just need to determine addresses and potential values, etc
TBattery talks directly to the battery chipset, and returns values such as mAh capacity, battery temperature, current draw, percentage remaining, etc.
DbgTerm allows real time display of Debug Log on device.
DebugTool allows among other things redirecting of KITL output to USB. You can also configure the level of logging for the Debug Log and have it save the log to SD.
Save Kernel KITL Log to SD:
1.) Open DebugTool.exe, input value 43D in [5]DebugFlags, click menu -> write
2.) Shut Down with Power Button (long press), and start up
3.) Do actions you want to be logged (load program that fails, drivers, etc.)
4.) Plug phone into usb, connect w/activesync and copy off /Storage Card/HtcLog/*.txt
5.) Open DebugTool.exe, input value 0 in [5]DebugFlags, click menu -> write
FMTuner allows direct advanced control over the FM Radio chipset, among other things allows activation without headphones (although I don't see a way to route audio to the speaker)
Uni-AT allows issuing of AT commands to the ROM.
dump a raphael ROM and open up rilphone.dll in a hex editor, look for the strings like +CRING, @AGPSADDRESS, $HSUPA_STATUS, these are AT Commands that can be issued to the radio ROM, to query status and alter settings.
Query an existing setting like so:
AT+CRING?
AT$HSUPA_STATUS?
[email protected]?
Querying a command should give you some input as to the required format.
Change a setting like so:
AT+CRING=1
AT$HSUPA_STATUS=1
[email protected]=1
For a setting with multiple parameters, such as AT+HTCNV, set it like so: AT+HTCNV=param1,param2,param3
Useful AT Commands:
AT+RADIOVER : returns radio rom version
AT+HTCNV : returns +HTCNV: 1,10,8 - param1 = DTM support, 1/0, param2 = MCS support 8/10/12, param3 = HSDPA Category 6/8/12
AT+HTCENS : ENS support 1/0
Reserved for more stuff
WOW!!!!!!!!
this would get alot more views in the diamond section.... thanx for posting it still
Looks like most of these tools were posted in Diamond section already here: http://forum.xda-developers.com/showthread.php?t=416334&highlight=htc+debug+tools
However everyone seemed to miss the significance of RegisterEditor entirely, it's listed in the linked Wiki as a 'very basic registry editor' but it has nothing to do with the registry at all..
Anyway, this is a dup post. Doh! But these versions are newer, and i'll try to make it more useful by including more knowledge about the apps
Wow! Kudos for this! Amazing. Register Editor is very powerful. Gotta map this out
Interesting. I wonder if these tools could be useful in unlocking the FM radio on CDMA Touch Pros.
[Edit: I noticed that you specified these were for the 72XX chipset. Any idea what kind of compatibility they have with the 75XX?]
Not sure, worth a try since they are similar, the api might be the same. You should be able to try a read operation without harming anything..
FMTUner Tested on Raphael
I've tested FMtuner on Raphael CDMA but nothing happens, I mean, the tool works, but no frequency is detected.
Fabian
bedoig said:
Interesting. I wonder if these tools could be useful in unlocking the FM radio on CDMA Touch Pros.
[Edit: I noticed that you specified these were for the 72XX chipset. Any idea what kind of compatibility they have with the 75XX?]
Click to expand...
Click to collapse
there is CDMA debugtools set, grab it from any cdma beta rom (maybe posted on ppcgeeks, if not, i can upload it here), similar to gsm but for example the AT tool differs (UNI_AT will not work on CDMA) etc etc.
bump for adding new AT commands
Is there some documentation for tBattery explaining exactly what each reading is?
Also have a suggestion if possible that it include a time hack with each sampe it saves to the log instead of just a start and end time.
Thanks in advance.
cmonex said:
there is CDMA debugtools set, grab it from any cdma beta rom (maybe posted on ppcgeeks, if not, i can upload it here), similar to gsm but for example the AT tool differs (UNI_AT will not work on CDMA) etc etc.
Click to expand...
Click to collapse
Could you post the CDMA debugtools set?
Thankyou very much
someone asked me in PM today to post the tools, see attachment.
tbattery
how exactly do i install this program? do i just copy it to my SD card and open it from my phone? thanks in advance
yup, copy to eg SDcard to DebugTools folder and run the debugtool
i know we have a few applications that allow us to use our phone's screen and keyboard to control our computer, and while it is cool, it's just not something that i have a use for currently. i was wondering if there were any apps that you know of that allow me to have a window on my comp that is my home screen on my phone and control things on the phone from the comp. i hate when i am working on my themes and i get 100 texts and i have to go from using the comp it using the phone and back and forth. WM had several apps like that and i loved them when i was running windows but now i run linux(ubuntu 8.10) and i would love to be able to type texts and run apps on my phone while using the computer keyboard.
i have looked through the market and can't seem to find anything on there and i was hoping someone could point me to one elsewhere or if i missed one on the market. thanks in advance
That would be cool. A VNC Server has already been ported to iPhone, so it's probably not too difficult for someone who knows what they're doing (i.e, not me =P)
It would definitely be great to be able to type text messages and whatnot using the computer's keyboard and screen instead of that tiny little G1 keyboard.
or if there are some commands i can run from adb shell that would work too, all i have been able to figure out how to do is play an mp3 on the phone by typing the command. cool but not what i would like.
alright, for those that care i have figured out how to start an app on the phone by using the adb shell commands, and i can even start to compose a text if i do it correctly
to start the messaging app you need to type in the adb shell(or android terminal but the point is to be able to do it from the comp
adb shell
am start -a android.intent.action.MAIN -n com.android.mms/com.android.mms.ui.ConversationList
the above line brings up the conversation list to allow you to choose a list, but i have yet to figure out how to atually pick a convo from that page
to bring up the compose message to start a new text type in the following
am start -a android.intent.action.MAIN -n com.android.mms/com.android.mms.ui.ComposeMessageActivity
from there i can input the number to send the message to but not what i want the text to say,
input text <string> #that inputs a single word and no more after the word text
so if i were to type
'input text hello android' my phone would act as if i had just typed hello, this also works on the home screen to search your contacts. i am working on in[utting more than one word and also choosing your conversation from the comp
Cool! nice progress. Maybe other Android intents can be used...
progress
i know i can start any app by knowing the commands for it now and typing it in. but for right now my main concern is getting a multi word string to appear in the text box. if i can get that then i just need to figure out how to attach "input keyevent 66" to it as well so it runs cleanly. key 66 is the enter key and i figured out several others along the way but i will list them later. i pulled the input file from the /system/bin directory and maybe someone else should have a look at it and figure out how to acheive multi word texts without placing "_" between all the words, cause right now that's where i'm at. i'm attaching the file for the guru's to take a look at. obviously it isn't saved as a .txt file on the phone but that's how i uploaded it to here.
CALLING THE ANDROID GURU'S TAKE A LOOK AT THIS
Cool. Once you figure out a bunch of commands, I could try making a user interface for it as a project...
just wanna drop this lines here, there is an app from motorola MPT Motorola Phone tools, and it does all that you want and more, the phone can be connected to the pc via USB or Bluetooth... you can send receive msg, phone calls, see and edit contacts, drop images, ringtones browse the files etc
juangil said:
just wanna drop this lines here, there is an app from motorola MPT Motorola Phone tools, and it does all that you want and more, the phone can be connected to the pc via USB or Bluetooth... you can send receive msg, phone calls, see and edit contacts, drop images, ringtones browse the files etc
Click to expand...
Click to collapse
Im not sure if you know that your posting in a forum dedicated to the G1/android but MPT supports, as the name would suggest, motorola phones only.
juangil said:
just wanna drop this lines here, there is an app from motorola MPT Motorola Phone tools, and it does all that you want and more, the phone can be connected to the pc via USB or Bluetooth... you can send receive msg, phone calls, see and edit contacts, drop images, ringtones browse the files etc
Click to expand...
Click to collapse
does said program work with the G1? i can't imagine moto being nice and making a program that works for everyone else's phone
kp126 said:
Im not sure if you know that your posting in a forum dedicated to the G1/android but MPT supports, as the name would suggest, motorola phones only.
Click to expand...
Click to collapse
yeah I know, my bad.. just wanted to put an example of an app (that of course is only for motorola) for any1 wanting to do something like it
i know there's several out there for different phones, but nothing for android. hell i'd be satisfied if i could just have the emulator read from my phone and let me control it that way. right now i don't like what i have to do to send a text
input text hello
input keyevent 62
input text android
input keyevent 66
that is a whole lot of typing for a simple text that says "hello android" and then sends it
would it be possible to write a program that takes what you type and breaks it into one word or one letter segments and runs the proper keyevent for each charecter there?
from what i remember of my programming in java and visual basic from years ago is that it would basically be set to read an input and use a case method to say if $input=="hello" then adb shell input text hello. it would be easier i would assume to just break it down into words and place "adb keyevent 62" between each word to input the spaces, and at the end of the line of input you would have to have the code "input keyevent 66"
i have the keyevent mapped out for each button and such on the phone if anyone is interested. i will see what i can come up with on my own though for now
Hope!
I would <3 who ever release's this in some form or another =)
I could really use an application that lets me use my phone from my computer. Preferably it'd show the desktop of the phone, and allow remote access to all the features.
I don't know if it's possible, but it sounds like some of you are progressing, so I hope for the best.
that is the goal, but right now i think i want to just get a java script written by the end of the week next week that reads the key i press on the computer and inputs it into the phone. so i have a lot of relearning to do since i haven't written javascript in 4 years and even then it was just simple stuff to be run in a console. if someone wants to take whatever i get done and run with it to make a FREE APP then by all means. if i find my work in a paid app then you better hope the US gov't can't find you cause i'll be at your door ready to kick your ass.
i'm not sure how one would go about coding the computer to display the phone desktop, but however it gets done i would prefer it to be written in java so all users of linux, mac, and windows can use it.
alright i have found a program that allows me to display the phone screen on the computer using java *hooray* but it does not switch to landscape when the phone does, and i can't control the phone from the app. it was written so that people could do presentations with the phone instead of using the emulator. the gist of it is described here
http://groups.google.com/group/cw-android/browse_thread/thread/d2dbcabee6bcba1a
i have already emailed the developer asking politely to see the code and for permission to try and run with it to make the ideal app. at this point the only thing i could come up with would be to make a javascript that had a case for each key on the keyboard and when a key is pressed it sends the corresponding command(adb shell input keyevent ##) to the phone. this would work fine to use the arrow keys to control the phone, and i am not sure how to code the mouse into it yet. i will be waiting for a response from the dev hopefully he will give his permission and blessing for us to use the app.
Tubaking182,
Perhaps I could offer some help. Brad Fitz has written a program that injects keys into the Linux input layer. Perhaps the source code to his project can help you. It appears to contain a key code map. Here is the link to his code:
http://github.com/bradfitz/android-misc/blob/master/type.pl
Also, here is a link to his live journal entry regarding his program.
http://brad.livejournal.com/2400054.html
All of this would be wonderful to have with my G1. I wish all involved the best of luck!
the developer of the program i posted gives his blessing but he claims what we are trying to do is impossible without certain firmware. he claims that android does not support remote control. i have already proven it can be done though but you have to use keyvalues instead of the mouse. i don't know much java, but i know i need a case switch that executes adb shell input keyevent when i press a key on the computer. if someone wants to tell me the proper syntax and java command to run a run a command then awesome i can write this up *hopfully* and start testing it.
would it work if i typed it as
int key = evt.getKeyCode();
switch (key){
case 65: run.exec(adb shell input keyevent 29);
break;
what would be the proper way to execute the adb command
tubaking182 said:
the developer of the program i posted gives his blessing but he claims what we are trying to do is impossible without certain firmware. he claims that android does not support remote control. i have already proven it can be done though but you have to use keyvalues instead of the mouse. i don't know much java, but i know i need a case switch that executes adb shell input keyevent when i press a key on the computer. if someone wants to tell me the proper syntax and java command to run a run a command then awesome i can write this up *hopfully* and start testing it.
would it work if i typed it as
int key = evt.getKeyCode();
switch (key){
case 65: run.exec(adb shell input keyevent 29);
break;
what would be the proper way to execute the adb command
Click to expand...
Click to collapse
I've been doing Java for about 4 or 5 years now, nothing to fancy, but anyway,
Code:
int key = evt.getKeyCode();
switch (key)
{
case 65:
Runtime.getRuntime().exec("adb shell input keyevent 29"); // I dont know if this is what you "run" variable is referring to. and you would need quotes around your command as it takes a String parameter.
break;
Hi everyone,
I have started looking into using a PS3 controller as an input device for my Diamond.
I want the adility to play games using a PS3 contoller over bluetooth, as the device doesnt have good controls for games. I have managed to get my ps3 controller to work over usb on my pc Next step is to get my controller over blueooth to my pc, I will keep updating this thread
I have found some useful web pages
how get input from PS3 controller over wired with source code: http://www.codeproject.com/KB/mcpp/wiredps3axis.aspx
How to get ps3 controller over bluetooth on linux with source code: http://fedoraforum.org/forum/showthread.php?t=199246
I dont really know what Im doing when it comes to wm6 and making a device work with wm6. I dont know much about the bluetooth stack either. I will probably need to write some sort of a driver at some point. To catch the input from the controller and convert it into a command on my diamond.
So any help of any kind would be great. Any problems you can see with my plan?
Sorry not sure if this is the right place to put this thread so move if you want.
Well, that didnt go to well.
The controller is appearing in my bluetooth manager on my pc, but i cant connect or query its services.
Now Im really stuck
if someone could help me get some trace data from the connection, or enlighten me to a way of getting some information out of the bluetooth stack.
Thx,
Chris McNamee
Assuming that the PS3 doesn't use a proprietary communication protocol that can't be reverse engineered, this should be possible.
However, I suggest looking here first to get source and discussion re use of the Wii mote on the PPC first.
Then re implement the PS3's control mechanisms.
http://www.codeplex.com/WiiMoB/Thread/View.aspx?ThreadId=10953
There's further discussions here:
http://forum.xda-developers.com/showthread.php?t=335973
and here:
http://forums.neurostechnology.com/index.php?topic=9759.0
to get you started. Interesting project though!
V
Thanks
Cheers vijay555,
I will have a look as soon as I get a bit of free time
Hmmmm
Thanks vijay555
There is some excellent information on some of those links, but will need to get a wiimote. I cant tell if the drivers have been loaded by the wm6
but i was wondering, how does wm6 know which device its talking to over bluetooth?
It must be via a device serial or something, but what is the term for it?
like i said im a bit of a novice
Yeah, now we're cooking
I found an alternative, the wii remote/classic controller it uses bluetooth and there is lots of source code and examples
http://sourceforge.net/projects/wiiuse/
it comes with a libaray for windows and an example of how to use
all the source code is there to downloading
Now all I need is a wii remote
and to get it going on my pc, then port to PPC.
Then I need to write a frontend to control what action on the mote do on my PPC. Should be easy
sounds like an interesting project, keep us updated!
It has begun
Yesterday I bought a wii controller and got it talking to my pc using the wiiuse.
Wiiuse is open source and it has code already to interpret the controls of the wiimote, including the ir sensing, accelerometer, wii nunchuck, and the classic controller. Which we be very useful, as I dont need to work it out myself.
Also I have got wiimob, kind of working. It uses a library called bluetools to controller the bluetooth (which is pay for, so will need to find/make an alternative at some point but works for now). I have got to the point the author got stuck at (comment in the code says he never got passed), so Im kind of on my own now. Wiimob can search for wiimotes, then search it services but fails when trying to get a stream to the service. Im pretty sure this is because the RemoteService class returned by the bluetools doesnt have the correct GUID, which cause the connection to be refused by the remote device as it doesnt exist.
It is all looking very promising at the min
next steps:
get the bluetools talking to a service on my pc and see if I get the right GUID to determine if its the bluetools code which is failing to get the GUID or the wiimote not giving its GUID for the service.
Will post back with any news
Interesting
It seems that the library doesnt want to connect to a human input device, it wont connect to the wiimote or my bluetooth keyboard. It does seem to work to other services like Obex file transfer.
Hmmm, what?
Guess I found try and find some samples of people using this library and human input device or find a new library. Im not really up for trying to create my own at the min, as it would take a while
O dear
Its really not going well, either my knowledge isnt up to the job or it cant be done.
I have tried hard, but windows mobile is missing the all important hid.dll driver to get a listing of pair bluetooth hid devices so i can open a handle to the device. So I then looked into opening a connection myself and bypassing the hid driver, but from what I can work out it needs two l2cap connections open to the device, 1 on channel 11 for writing and another on channel 13 for reading data. But windows mobile doesnt have an api to access the l2cap layer of the bluetooth stack, the layer down (hci) can be extended but this would take along time to implement as I would then have to implement the l2cap layer myself.
Its turning into a losing battle, I really now doubting that I can do this.
The only idea left is how does the windows mobile use a bluetooth keybaord, does it use a generic driver which it extends or is it complete in its self. If it does uses a generic driver, i need to find some doc.
If anyone has any advice about how to implement l2cap connection or any thing about connecting to a hid device in windows mobile I would be very greatful.
Thanks guys,
But I think this is dead, like many other projects to try and get windows mobile work with a wiimote.
Things have taken a turn
Yeah,
A very helpful guy pointed me down a new line of throught,
I now beleive that I maybe able to do this
well, i need the win ce 6 platform builder
i owuld like to help but not got a clue about these things! keep up the good work
Well, any suggestions
Hmm, the wiimote uses bluetooth hid profile to communicate which talks over a l2cap connection. HID profile uses the universal serial bus (USB) architecture but send data over bluetooth
http://www.bluetooth.com/Bluetooth/Technology/Works/HID.htm
I have two options from what i can see
1. Well, I have found source for a sample keybaord device which I could rip off but cant get it to compile
2. Gain access to the L2CAP layer of the bluetooth stack by extending the stack with some of my own code. Then create my own connections to the wiimote and start sending and receiving reports to the device.
Any suggestions on the best approach?
both will take alot of time either way.
Hmm,
The L2CAP sample code requires some of the core dll for wm. These include coredll.dll and the btd.dll
during the build linking fails as I dont have the lib files, to get the lib files I need to build the os, as these files can change depending on the options specified during the build. I dont really want to do this, as it will limit the software to only one os version of wm, the one i build against.
Next question is can I do a library call and get the function points at runtime?
Well I think I may have to ask on a new thread. I hope so, as it would over come alot of problems, and it wouldnt limit the code to certain versions of the wm
Opened my mouth too quick
I using the wince 6 sdk,
But windows mobile 6 is based on wince 5. Hopefull I will have more luck with the wince 5 sdk
Well, that went a bit better.
Ive got pasted all compiling errors with the sample code I found. I have all the needed include and library files.
When trying to link the compiled code I get a single error now.
1>Compiling...
1>l2capdev.cpp
1>Compiling resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>uafxcw.lib(dllmodul.obj) : error LNK2005: DllMain already defined in l2capdev.obj
1> Creating library Windows Mobile 6 Professional SDK (ARMV4I)\Release/l2capdev.lib and object Windows Mobile 6 Professional SDK (ARMV4I)\Release/l2capdev.exp
1>Windows Mobile 6 Professional SDK (ARMV4I)\Release/l2capdev.dll : fatal error LNK1169: one or more multiply defined symbols found
1>Build log was saved at "file://d:\Documents and Settings\Chris\My Documents\Visual Studio 2008\Projects\Bak new l2capdev\l2capdev\Windows Mobile 6 Professional SDK (ARMV4I)\Release\BuildLog.htm"
1>l2capdev - 2 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
If anyone can help with this error it would be great.
Sorry guys, but Ive got alot of coursework on at the min.
So it might go a bit quite on here for a bit, but done worry.
Im still working on this when I get some spare time, but I dont have much at the min
Any progress on this mcnamee?
No luck
Well, I have given up on this for awhile.
I would like to start working on this project again when I have some more time.
But for now this is dead.
Chris McNamee
If you are interested in alternatives to the MSI or Chainpus BGP100 bluetooth gamepad, google search "modded by bacteria" go to the "work in progress" section of his forums, and search for the thread "Re-housed Bluetooth controller". The creator of the site, Bacteria, will be transplanting the innards of the BGP100 into an SNES controller. Previously, he has transplanted it into a PS1 controller. It seams feasible to DIY into almost any controller housing.
PS3 for EVO?
I'd love to use the bluetooth connectivity for my Evo and playing ROMs. any ideas?
Apologies if this has been mentioned...
I've enhanced my Webserver sample to support reading from the device (where allowed), as well as reading/writing IsolatedStorage
The XAP is located in the Webserver project.
To access the webserver, open the app on your phone (it will disable the idle timer and run behind the lock screen--but WiFi will turn off, so you'll want to be connected via USB or don't let it sleep)
//phone_ip/IsolatedStorage
//phone_ip/Windows
IsolatedStorage is a special case (virtual directory that uses the SDK IsolatedStore APIs), the filesystem is mounted at the root of the webserver. Note that if you navigate to //phone_ip/, you will not see anything, as we are not able to list the contents of the root directory.
I am working to create a real socket library that mimics System.Net/.Sockets, and System.IO for file access. TcpClient and TcpListener are in a mostly functional state already.
Most of the socket and I/O code came from jmorrill. I have pulled code from mono to mimic System.Net.
Perhaps I'll spend some time on the web UI next, maybe a fancy Silverlight uploader. There doesn't seem to be a ton of interest though, so we'll see.
Update ("v2"):
- Authentication
- UI
- Adapter list
- More reliable
nice.. will try it out.
Very nice! Thanks!!
I've updated the sample to one with a UI, Authentication and more reliability.
Looking at your code WP7 looks more and more like a normal windows CE with a secured UI.
Yeah, I think someone with a strong WM background could port code to [native, homebrew] WP7 pretty quickly. Pretty much everything works just fine.... I just wish we could add the System.Net .NET CF assemblies back to the GAC. :/
davux said:
I've enhanced my Webserver sample to support reading from the device (where allowed), as well as reading/writing IsolatedStorage
The XAP is located in the Webserver project.
To access the webserver, open the app on your phone (it will disable the idle timer and run behind the lock screen--but WiFi will turn off, so you'll want to be connected via USB or don't let it sleep)
//phone_ip/IsolatedStorage
//phone_ip/Windows
IsolatedStorage is a special case (virtual directory that uses the SDK IsolatedStore APIs), the filesystem is mounted at the root of the webserver. Note that if you navigate to //phone_ip/, you will not see anything, as we are not able to list the contents of the root directory.
Click to expand...
Click to collapse
Noob questions: It says "connect to your wifi address below". How? Also, connect the phone or the pc? And navigate via IE mobile?
As I said, noob questions. Thanks for any help.
start ie and type in http://wifi address
I have found on alternateboot.reg
HTML:
; Disable MTPz USB function driver
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\CompositeFN]
"ClientDriverList"=multi_sz:"Serial_Class"
What is MTPz USB function driver?
ajhvdb said:
start ie and type in http://wifi address
Click to expand...
Click to collapse
... which gives me the ever-popular "cannot find server or DNS address". What am I doing wrong? I assume you meant IE on my phone.
piaqt said:
... which gives me the ever-popular "cannot find server or DNS address". What am I doing wrong? I assume you meant IE on my phone.
Click to expand...
Click to collapse
I think (might be misreading your question), you'll need to plug your device in to USB (or be prepared to loose the connection), then on your desktop, go to one of the IPs listed (in IE or any other browser).
On the screenshot shown, WiFi is the last one, with "BCMSDDHD1" attached to the label, thought the device name may be different for you. Try one that has "192.168.1." as that'll be the most likely option.
l3v5y said:
I think (might be misreading your question), you'll need to plug your device in to USB (or be prepared to loose the connection), then on your desktop, go to one of the IPs listed (in IE or any other browser).
On the screenshot shown, WiFi is the last one, with "BCMSDDHD1" attached to the label, thought the device name may be different for you. Try one that has "192.168.1." as that'll be the most likely option.
Click to expand...
Click to collapse
Thanks. Next noob question: It asks for a user/password. What do I use and or where do I set it?
piaqt said:
Thanks. Next noob question: It asks for a user/password. What do I use and or where do I set it?
Click to expand...
Click to collapse
I don't know what the default password is, but if you type admin/admin in on the device for user/pass that works fine.
EDIT:
Code:
// In order to secure the device, the default password is a random number, not a static default
So you'll need to change it, unless you can read minds
l3v5y said:
I don't know what the default password is, but if you type admin/admin in on the device for user/pass that works fine.
EDIT:
Code:
// In order to secure the device, the default password is a random number, not a static default
So you'll need to change it, unless you can read minds
Click to expand...
Click to collapse
OK. admin/admin works. Next nq: I get "Error opening directory:O". Is there a specific path to enter?
piaqt said:
OK. admin/admin works. Next nq: I get "Error opening directory:O". Is there a specific path to enter?
Click to expand...
Click to collapse
Try 192.168.1.XX/Windows and that should work.
l3v5y said:
Try 192.168.1.XX/Windows and that should work.
Click to expand...
Click to collapse
Ba-da-bing! We are in business.
this works great! does this work just over USB? I assumed that since I didnt see an SSID advertised that the webserver wasn't broadcasting over WiFi.
A few feature suggestions:
* Make it clearer in the device UI to use the last IP address. I had assumed I would use the SERIAL ON USB IP address
* When browsing files, show a detail view so that you can see date/time modfied, type (optional), size
* when in a subdirectory add an Up ellipsis (...) to more easily walk back up the directory tree.
* be able to filter a directory listing so that you can display just certain file types (ie *.exe)
* Be able to download files
I love it! Its handy to be able to get a file listing that you can copy so that you can capture file listings.
Scratch the suggestion to add downloading files, the filenames are of course URLs which enable http downloads
I found a bug. When you click on a file to download it the href seems to have an issue since the file extension is stripped. You can easily add it during the save but it would be easier to have that done by default. I need to check the syntax but for example for filebrowser.exe the html is:
FileBrowser.exe<br />
This was handy so that it was possible to download an EXE and see what certificate is used for signing.
It looks like if you press Back or Start the webserver shuts down or is tombstoned.
I wonder if anyone has come up with a way to keep an application from being killed.
If that was possible then the webserver could provide active control. In that case if it was running in the background a great feature to add would be a screen capture function.