IR Keyboard Configuration & Driver Program. v.02

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

IR Keyboard Configuration & Driver Program. v.02

Post by Agoln »

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.
Last edited by Agoln on Sat Aug 13, 2005 3:23 pm, edited 4 times in total.
Lego of my Ago!
zigzag
Posts: 129
Joined: Wed Jan 26, 2005 2:11 pm

Post by zigzag »

Does this work in PSP games?
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

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).
Warren
Posts: 175
Joined: Sat Jan 24, 2004 8:26 am
Location: San Diego, CA

Post by Warren »

Edited title to "IR Keyboard" to reduce confusion.
F9zDark
Posts: 127
Joined: Sat Apr 02, 2005 11:34 am

Post by F9zDark »

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.
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

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!
ironlung
Posts: 13
Joined: Thu Jul 21, 2005 8:00 am

code fix for Adesso keyboard?

Post by ironlung »

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.
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Re: code fix for Adesso keyboard?

Post by Agoln »

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!
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

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?
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

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!
ironlung
Posts: 13
Joined: Thu Jul 21, 2005 8:00 am

Post by ironlung »

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.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

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.
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.
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.
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Update

Post by Agoln »

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!
ironlung
Posts: 13
Joined: Thu Jul 21, 2005 8:00 am

Post by ironlung »

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.
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

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 ... figure.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!
ironlung
Posts: 13
Joined: Thu Jul 21, 2005 8:00 am

Post by ironlung »

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: Select all

	//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.
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

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!
ironlung
Posts: 13
Joined: Thu Jul 21, 2005 8:00 am

Post by ironlung »

Thx Agoln - I'll look fwd to that next week. Cheers 'til then.
Noobacide
Posts: 4
Joined: Sun Jul 03, 2005 12:11 pm

Post by Noobacide »

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)
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

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 ...
ironlung
Posts: 13
Joined: Thu Jul 21, 2005 8:00 am

Post by ironlung »

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
Sirwhizz
Posts: 16
Joined: Wed Jun 08, 2005 4:12 am
Location: Melbourne, FL

Post by Sirwhizz »

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. :-)
ironlung
Posts: 13
Joined: Thu Jul 21, 2005 8:00 am

Post by ironlung »

Agoln? You still out there?

ir kb bump
Dr. Vegetable
Posts: 171
Joined: Mon Nov 14, 2005 1:32 am
Location: Boston, Massachusetts
Contact:

Post by Dr. Vegetable »

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?
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

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)
spinzuer
Posts: 1
Joined: Fri Dec 30, 2005 3:51 am

Feeling a little newbish

Post by spinzuer »

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!
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

Post by weltall »

yes that's a problem to do in that way. you must use the eboot loader by fanjita to make applications work
neocerberus
Posts: 2
Joined: Wed Jan 04, 2006 10:16 am

Post by neocerberus »

greetings!
*newbie moment* forgot to read the directions - sorry :)
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

What would be nice for development is getting a IR-usb device for PC, and then be able to emulate IR keyboards ...
neocerberus
Posts: 2
Joined: Wed Jan 04, 2006 10:16 am

Post by neocerberus »

as picky as the ir port is in recieving a signal I'm glad it finaly has a use :)
Post Reply