forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IR Keyboard Configuration & Driver Program. v.02

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Agoln



Joined: 08 Jun 2005
Posts: 326
Location: Fort Wayne, IN

PostPosted: Thu Aug 04, 2005 2:09 pm    Post subject: IR Keyboard Configuration & Driver Program. v.02 Reply with quote

Currently this is a driver program, but anyone that wishes to incorperate it into their program can easily do so. All that is needed, is that you include the header file, and compile the C file.

This is work in progress, I will be adding a shift, caps lock, numbers and more as I continue work.

Download the source and 1.5 binaries HERE

Please let me know if this works on other keyboards. I have tried to make this code as modular as possible. It is tested and working on a MP-0118 Micro Innovations keyboard (Pocketop).

To Use:
Copy over the two directories to the psp/game directory and keyboard.dat file to the root of your PSP, then run the program.

*NEW IN THIS VERSION*
Save your data by pressing O
Load your saved data by pressing /\
Added Numlock.
Added Caps Lock.
Added Shift Lock (yes, lock, have to toggle it).
Added Numbers.
Added both Shift's and Both Space Bars
Cleaned up my code a bit.
Removed the running of config and supplied the config file. Although in kbInit.h if you uncomment the #define of CONFIGURE then you will configure your keyboard.

*TODO*
Find a better way to flip the screen (The way in source is slow and buggy)
Add more support for other keyboards.
Finish the current keyboard config file.
_________________
Lego of my Ago!


Last edited by Agoln on Sat Aug 13, 2005 3:23 pm; edited 4 times in total
Back to top
View user's profile Send private message AIM Address
zigzag



Joined: 26 Jan 2005
Posts: 129

PostPosted: Thu Aug 04, 2005 4:29 pm    Post subject: Reply with quote

Does this work in PSP games?
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Thu Aug 04, 2005 6:07 pm    Post subject: Reply with quote

zigzag wrote:
Does this work in PSP games?


They will first have to support keyboards. I think that some homebrew games may support this eventually. Commercial ones is less likely (but not impossible, if the system gets stable and popular enough).
Back to top
View user's profile Send private message
Warren



Joined: 24 Jan 2004
Posts: 173
Location: San Diego, CA

PostPosted: Thu Aug 04, 2005 6:40 pm    Post subject: Reply with quote

Edited title to "IR Keyboard" to reduce confusion.
Back to top
View user's profile Send private message
F9zDark



Joined: 02 Apr 2005
Posts: 127

PostPosted: Sat Aug 06, 2005 2:48 am    Post subject: Reply with quote

Nice work. However, with my keyboard, the space bar is cut in half(to make room for the hinge where the keyboard folds in half). I don't know if your keyboard is made the same way, but with mine, the half of the space bar that I do not press during the configuration is unuseable. Its not a big deal but I thought you should know anyway.
Back to top
View user's profile Send private message AIM Address
Agoln



Joined: 08 Jun 2005
Posts: 326
Location: Fort Wayne, IN

PostPosted: Sat Aug 06, 2005 3:33 am    Post subject: Reply with quote

F9zDark wrote:
Nice work. However, with my keyboard, the space bar is cut in half(to make room for the hinge where the keyboard folds in half). I don't know if your keyboard is made the same way, but with mine, the half of the space bar that I do not press during the configuration is unuseable. Its not a big deal but I thought you should know anyway.


Thanks, I prolly have that same keyboard, but I just did not test both of them.

I'll impliment the change :)
_________________
Lego of my Ago!
Back to top
View user's profile Send private message AIM Address
ironlung



Joined: 21 Jul 2005
Posts: 13

PostPosted: Wed Aug 10, 2005 9:57 am    Post subject: code fix for Adesso keyboard? Reply with quote

I was really excited to see these files available - thanks a ton.

I tried to use my Adesso IR KB but the following occurs:

#press a: -- I press 'a' and all of a sudden the next 5 alphabet choices flash by - basically the keyboard sends a longer signal that your configuration treats as new keystrokes. same occurs using any keys.

Any way to control this? Here is a link to the keyboard I have for reference: http://www.adesso.com/products_detail.asp?productid=190 and the manual http://www.adesso.com/drivers/SK-6688.zip

Its pretty cool that the KB has a IR transmitter above and in front. If I don't want to set it all up, I can just set the KB in front of the PSP otherwise it does great in the cradle with the IR above it.
Back to top
View user's profile Send private message
Agoln



Joined: 08 Jun 2005
Posts: 326
Location: Fort Wayne, IN

PostPosted: Thu Aug 11, 2005 1:03 am    Post subject: Re: code fix for Adesso keyboard? Reply with quote

ironlung wrote:
I was really excited to see these files available - thanks a ton.

I tried to use my Adesso IR KB but the following occurs:

#press a: -- I press 'a' and all of a sudden the next 5 alphabet choices flash by - basically the keyboard sends a longer signal that your configuration treats as new keystrokes. same occurs using any keys.

Any way to control this? Here is a link to the keyboard I have for reference: http://www.adesso.com/products_detail.asp?productid=190 and the manual http://www.adesso.com/drivers/SK-6688.zip

Its pretty cool that the KB has a IR transmitter above and in front. If I don't want to set it all up, I can just set the KB in front of the PSP otherwise it does great in the cradle with the IR above it.


I will look into this and see what I can do. I hope to be able to have an update by the end of the weekend.
_________________
Lego of my Ago!
Back to top
View user's profile Send private message AIM Address
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Thu Aug 11, 2005 2:25 am    Post subject: Reply with quote

would it be a good idea to make sure that the p-sprint keyboard driver I'm writing is compatible with these IrDA keyboard drivers? That way a program could easily work with both ...

I was thinking that one way we could do it was make a custom extention of the sce pad structure that holds a pressed key value. If I would make a routine that polled for key input, it would each time need the results from the previous poll so that it can build a key value from several button presses. This way polling the keypad and the keyboard driver can be combined, something which I suppose you need to do always anyway.

I suppose that we could/should standardise this further towards a real keyboard driver for microwindows also.

Maybe have a compatible lightweight integrated keypad/keyboard(irda or simulated) poller to start off with? Is it possible to detect the presence of an IrDA and use that, and switch to the simulated keyboard if none is found? Or does the software have to allow for manual switching?
Back to top
View user's profile Send private message
Agoln



Joined: 08 Jun 2005
Posts: 326
Location: Fort Wayne, IN

PostPosted: Thu Aug 11, 2005 2:38 am    Post subject: Reply with quote

Arwin wrote:
would it be a good idea to make sure that the p-sprint keyboard driver I'm writing is compatible with these IrDA keyboard drivers? That way a program could easily work with both ...

I was thinking that one way we could do it was make a custom extention of the sce pad structure that holds a pressed key value. If I would make a routine that polled for key input, it would each time need the results from the previous poll so that it can build a key value from several button presses. This way polling the keypad and the keyboard driver can be combined, something which I suppose you need to do always anyway.

I suppose that we could/should standardise this further towards a real keyboard driver for microwindows also.

Maybe have a compatible lightweight integrated keypad/keyboard(irda or simulated) poller to start off with? Is it possible to detect the presence of an IrDA and use that, and switch to the simulated keyboard if none is found? Or does the software have to allow for manual switching?


I like where you are going with this, and I would be more than willing to help you out with combining efforts and making something standard.

As far as detecting IrDA, as far as I know, the only time that you know that there is anything IR is when a signal is sent to the unit. It is a lot like stdin input, where it's not as though you know that a keyboard is connected to the computer, but you just see when a key is pressed.

My E-Mail is in my profile, along with AIM. Get in touch with me, and we can work towards something.
_________________
Lego of my Ago!
Back to top
View user's profile Send private message AIM Address
ironlung



Joined: 21 Jul 2005
Posts: 13

PostPosted: Thu Aug 11, 2005 6:35 am    Post subject: Reply with quote

Thanks Agoln, Arwin,

If you need any KB testing or feedback I'm happy to help. With the LUA player coming along as it is, to have KB support as well as all the homebrew apps that *could utilize your driver makes this KB appear to have some value and function.
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Thu Aug 11, 2005 7:21 pm    Post subject: Reply with quote

Agoln wrote:
I like where you are going with this, and I would be more than willing to help you out with combining efforts and making something standard.


That's great.

Quote:
As far as detecting IrDA, as far as I know, the only time that you know that there is anything IR is when a signal is sent to the unit. It is a lot like stdin input, where it's not as though you know that a keyboard is connected to the computer, but you just see when a key is pressed.


So I guess we could support a few different modes - one where it loops through reading the IrDA port and the pad buttons and returns a key from whichever first shows one, and one where you can set the driver to use only one specifically if you would ever need that for some reason.

Quote:
My E-Mail is in my profile, along with AIM. Get in touch with me, and we can work towards something.


I only found your AIM which will probably not work too well because we're in different timezones, but I sent you a PM with my email. Alternatively, we can open a thread for this and make the discussion public so that people can chime in. Either suits me fine.

@ironlung: thanks for the offer.
Back to top
View user's profile Send private message
Agoln



Joined: 08 Jun 2005
Posts: 326
Location: Fort Wayne, IN

PostPosted: Sat Aug 13, 2005 3:20 pm    Post subject: Update Reply with quote

Update, V.02 HERE
*NEW IN THIS VERSION*
Save your data by pressing O
Load your saved data by pressing /\
Added Numlock.
Added Caps Lock.
Added Shift Lock (yes, lock, have to toggle it).
Added Numbers.
Added both Shift's and Both Space Bars
Cleaned up my code a bit.
Removed the running of config and supplied the config file. Although in kbInit.h if you uncomment the #define of CONFIGURE then you will configure your keyboard.

*TODO*
Find a better way to flip the screen (The way in source is slow and buggy)
Add more support for other keyboards.
_________________
Lego of my Ago!
Back to top
View user's profile Send private message AIM Address
ironlung



Joined: 21 Jul 2005
Posts: 13

PostPosted: Sun Aug 14, 2005 6:48 am    Post subject: Reply with quote

Agoln, does the config eboot from V. 01 have any functionality with this release? Does the # Define allow for configuration using V.01 config? Can you provide an Eboot with the # Define set so l cantest my adesso KB?

I get two keyboard icons plus the corrupt but only have the two KB folders that you provided. Only one of them interacts but they both force Battery removal to quit.

Glad that you've continued on this.
Back to top
View user's profile Send private message
Agoln



Joined: 08 Jun 2005
Posts: 326
Location: Fort Wayne, IN

PostPosted: Mon Aug 15, 2005 4:52 am    Post subject: Reply with quote

ironlung wrote:
Can you provide an Eboot with the # Define set so l cantest my adesso KB?


The .01 configure doesn't configure everything correctly, and I may have changed the way that the data was saved a little bit.

here is a 1.5 version of the configuration: http://www.cs.purdue.edu/homes/ljbuesch/KeyboardConfigure.tar

Let me know if that works for you, as I did not test it on my psp (not on me ATM), I just uncommented the define and rebuilt it.
_________________
Lego of my Ago!
Back to top
View user's profile Send private message AIM Address
ironlung



Joined: 21 Jul 2005
Posts: 13

PostPosted: Tue Aug 16, 2005 7:30 am    Post subject: Reply with quote

Agoln,

Thx for the file. Works exactly as your configuration did before.

The issue regarding the overlapping keypress causing your app to register the a button for a,b,c,d, and e remains tho. Looking at the .c file you provide, is it possible to add a line of code to pause the loop before it breaks out?

Code:
   //set the value from 0-
database[x-'a']=data;
?? pause here ??
break;


I really hope to get this working for my KB and I know you have your hands in plenty of projects but could you explore this pause option? Thank you very much. I'm gonna get the SDK, etc. installed and hopefully using cygwin I'll be able to do these makes myself.
Back to top
View user's profile Send private message
Agoln



Joined: 08 Jun 2005
Posts: 326
Location: Fort Wayne, IN

PostPosted: Tue Aug 16, 2005 8:21 am    Post subject: Reply with quote

Pausing wouldn't be an option, because it's like standard input and get(). Say your key throws 4 signals. Even if I pause for a second, the next time I try and get a key, the other 3 from your press will still be in the queue. What needs to be done is that I make a keypress more than just one value, it needs to be an array of values. Another way is depending on what values are thrown, I could just get the first value, then throw out all the other's... if the first one is unique enough.

I will prolly send you something to get me some more data sometime next week that will help me out.
_________________
Lego of my Ago!
Back to top
View user's profile Send private message AIM Address
ironlung



Joined: 21 Jul 2005
Posts: 13

PostPosted: Sat Aug 20, 2005 8:52 am    Post subject: Reply with quote

Thx Agoln - I'll look fwd to that next week. Cheers 'til then.
Back to top
View user's profile Send private message
Noobacide



Joined: 03 Jul 2005
Posts: 4

PostPosted: Sun Aug 21, 2005 9:56 pm    Post subject: Reply with quote

I've ported this driver: keyboard-symbian
and have it integrated into pvnc, but have no way to test yet. If I don't manage to release pvnc soon I'll try to atleast release the keyboard drivers to help other people out. Just so you know, the pocketop keyboard doesnt use propper IRDA framing, and the think inside (and probably others) do.
edit: (which is why they have more than one byte being sent)
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Sun Aug 21, 2005 10:12 pm    Post subject: Reply with quote

Noobacide wrote:
I've ported this driver: keyboard-symbian
and have it integrated into pvnc, but have no way to test yet. If I don't manage to release pvnc soon I'll try to atleast release the keyboard drivers to help other people out. Just so you know, the pocketop keyboard doesnt use propper IRDA framing, and the think inside (and probably others) do.
edit: (which is why they have more than one byte being sent)


Is the pvnc source public? I hadn't seen it. Or are you the pvnc author/porter? I would like to see p-sprint in pvnc, that should work quite well ...
Back to top
View user's profile Send private message
ironlung



Joined: 21 Jul 2005
Posts: 13

PostPosted: Thu Sep 01, 2005 9:58 am    Post subject: Reply with quote

Agoln wrote:

I will prolly send you something to get me some more data sometime next week that will help me out.


Agoln,
Any chance that you're had time to look into the keyboard issue I've got?

I'd really like to get it working with your driver but I need your help.

Thanks
Back to top
View user's profile Send private message
Sirwhizz



Joined: 08 Jun 2005
Posts: 16
Location: Melbourne, FL

PostPosted: Fri Sep 02, 2005 6:24 am    Post subject: Reply with quote

Quote:
Is the pvnc source public? I hadn't seen it. Or are you the pvnc author/porter? I would like to see p-sprint in pvnc, that should work quite well ....



Actually I have it if anyone needs it. I downloaded PVNC and it came with the source files. You can also get it here http://psp-news.dcemu.co.uk/portablevnc.shtml. Just unzip it and all the source files are in src directory. I added a neat feature to the Game Mode Option. I deleted their game mode code and added my code which was a program which sends the PSP Buttons pressed over UDP to the computer. And if you have a program which you can set to listen to the UDP and use it as a controller for the program. It allows you to control the program with the PSP and view it on the PSP. :-)
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
ironlung



Joined: 21 Jul 2005
Posts: 13

PostPosted: Wed Sep 21, 2005 4:36 am    Post subject: Reply with quote

Agoln? You still out there?

ir kb bump
Back to top
View user's profile Send private message
Dr. Vegetable



Joined: 14 Nov 2005
Posts: 171
Location: Boston, Massachusetts

PostPosted: Wed Dec 21, 2005 7:51 am    Post subject: Reply with quote

I just noticed this thread (finally figuring out how to use Forum Search effectively) and thought I'd add a link to this other thread which also relates to IR keyboard support. In fact, there is some discussion about the Adesso keyboard there, where some clues about its bizarre communication protocol are emerging.

Anyway, I'm glad I found this thread, because I would like to add support for my Belkin IR keyboard into a standard keyboard library. Did anything ever come of the idea to add IR keyboard support into p-sprint?
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Wed Dec 21, 2005 9:25 am    Post subject: Reply with quote

Dr. Vegetable wrote:
I just noticed this thread (finally figuring out how to use Forum Search effectively) and thought I'd add a link to this other thread which also relates to IR keyboard support. In fact, there is some discussion about the Adesso keyboard there, where some clues about its bizarre communication protocol are emerging.

Anyway, I'm glad I found this thread, because I would like to add support for my Belkin IR keyboard into a standard keyboard library. Did anything ever come of the idea to add IR keyboard support into p-sprint?


Well, if anyone figures out how to read an IR keyboard, the source for p-sprint is open enough to be able to pick up an IR keyboard or p-sprint keytaps depending on hardware availability. So I'll gladly help with anything in that respect - I just don't have a keyboard myself so I can't help with that (and currently I am at 2.0 for PoP Revelations, but p-sprint at least still works with Fanjita)
Back to top
View user's profile Send private message
spinzuer



Joined: 30 Dec 2005
Posts: 1

PostPosted: Fri Dec 30, 2005 4:05 am    Post subject: Feeling a little newbish Reply with quote

Hello all,

I came across this information for getting the IR keyboard to work with the PSP when I was looking for the real drivers for the exact keyboard I have had for a few years. I decided to try it out on the PSP but I seem to be missing something...

Whenever I load the drivers (ie folders and the .dat file) onto the PSP they transfer fine but when I go to load them from the "Games" off my data stick I get errors. The 1st thing I encounter is this, it shows 2 programs, the KB one and another that just says it's corrupted. Now when I try to run the KB one it says it cannot load, the data was corrupted.

Has anyone run into this? Am I missing something? I have the 2.00 Update for the PSP, is that a problem?

Thanks for any help you might be able to give me!
Back to top
View user's profile Send private message
weltall



Joined: 20 Feb 2004
Posts: 310

PostPosted: Fri Dec 30, 2005 7:56 am    Post subject: Reply with quote

yes that's a problem to do in that way. you must use the eboot loader by fanjita to make applications work
Back to top
View user's profile Send private message Visit poster's website
neocerberus



Joined: 04 Jan 2006
Posts: 2

PostPosted: Wed Jan 04, 2006 10:24 am    Post subject: Reply with quote

greetings!
*newbie moment* forgot to read the directions - sorry :)
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Wed Jan 04, 2006 10:31 pm    Post subject: Reply with quote

What would be nice for development is getting a IR-usb device for PC, and then be able to emulate IR keyboards ...
Back to top
View user's profile Send private message
neocerberus



Joined: 04 Jan 2006
Posts: 2

PostPosted: Thu Jan 05, 2006 12:59 pm    Post subject: Reply with quote

as picky as the ir port is in recieving a signal I'm glad it finaly has a use :)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group