need help adding a new IR keyboard.

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

Moderators: cheriff, TyRaNiD

User avatar
Legacyxero
Posts: 23
Joined: Fri Sep 12, 2008 4:42 am

need help adding a new IR keyboard.

Post by Legacyxero »

I have 0 programming experience besides a little bit of LUA, but i dont really count that.

Im trying to program a driver and a keymap for the old PALM Wireless
Keyboard (P10946-P)(yes its an IR keyboard).

Ive come to understand that I need a program for the psp called irDAcapture to get all the keys from my ir keyboard to my psp. Ive downloaded it, and whenever I press a key on the keyboard, a bunch of unidentified characters show up on my psp screen. I pressed every character on my keyboard (left to right starting with the first row of keys) and then pressed start. I got a file on the root of my MS called irdacapture. this fle has no extension. when i open it with notepad i get this:

ÿÀ*^ÁÿÀ›"ÚÁÿÀ›"ÚÁÿÀ ¹mÁÿÀ‰±éÁÿÀ‰±éÁÿÀ
"_ÁÿÀŠ*ÛÁÿÀŠ*ÛÁÿÀ«NÁÿÀ‹£ÊÁÿÀ‹£ÊÁÿÀ:ÁÿÀŒ¾ÁÿÀŒ¾ÁÿÀ
�+ÁÿÀ�•¯ÁÿÀ�•¯ÁÿÀÁÿÀŽ�ÁÿÀŽ�ÁÿÀ<—ÁÿÀ¼Ÿ�ÁÿÀ¼Ÿ�ÁÿÀ=ÁÿÀ½žÁÿÀ½žÁÿÀ>…(ÁÿÀ¾�¬ÁÿÀ¾�¬ÁÿÀ?9ÁÿÀ¿½ÁÿÀ¿½ÁÿÀ8³MÁÿÀ¸»ÉÁÿÀ¸»ÉÁÿÀ9:\ÁÿÀ¹2ØÁÿÀ¹2ØÁÿÀ2éâÁÿÀ²áfÁÿÀ²áfÁÿÀ±lÁÿÀ˜¹èÁÿÀ˜¹èÁÿÀpñÁÿÀ‘xuÁÿÀ‘xuÁÿÀëÃÁÿÀ’ãGÁÿÀ’ãGÁÿÀbÒÁÿÀ“jVÁÿÀ“jVÁÿÀݦÁÿÀ”Õ"ÁÿÀ”Õ"ÁÿÀT·ÁÿÀ•\3ÁÿÀ•\3ÁÿÀÏ…ÁÿÀ–ÇÁÿÀ–ÇÁÿÀDXôÁÿÀÄPpÁÿÀÄPpÁÿÀEÑåÁÿÀÅÙaÁÿÀÅÙaÁÿÀFJ×ÁÿÀÆBSÁÿÀÆBSÁÿÀGÃÆÁÿÀÇËBÁÿÀÇËBÁÿÀVËÇÁÿÀÖÃCÁÿÀÖÃCÁÿÀWBÖÁÿÀ×JRÁÿÀ×JRÁÿÀXµ.ÁÿÀؽªÁÿÀؽªÁÿÀãÂÁÿÀƒëFÁÿÀƒëFÁÿÀùàÁÿÀ�ñdÁÿÀ�ñdÁÿÀ,ÁÿÀ¬ŸÁÿÀ¬ŸÁÿÀ-Ÿ
ÁÿÀ­—ŽÁÿÀ­—ŽÁÿÀ.8ÁÿÀ®¼ÁÿÀ®¼ÁÿÀ/�)ÁÿÀ¯…­ÁÿÀ¯…­ÁÿÀLxÁÿÀM™iÁÿÀÍ‘íÁÿÀÌüÁÿÀÌüÁÿÀN[ÁÿÀÎ
ßÁÿÀÎ
ßÁÿÀH4>ÁÿÀÈ<ºÁÿÀÈ<ºÁÿÀY<?ÁÿÀÙ4»ÁÿÀÙ4»ÁÿÀ:¡nÁÿÀº©êÁÿÀº©êÁÿÀ*^ÁÿÀ›"ÚÁÿÀ›"ÚÁÿÀ ¹mÁÿÀ‰±éÁÿÀ‰±éÁÿÀ
"_ÁÿÀŠ*ÛÁÿÀŠ*ÛÁÿÀ«NÁÿÀ‹£ÊÁÿÀ‹£ÊÁÿÀ:ÁÿÀŒ¾ÁÿÀŒ¾ÁÿÀ
�+ÁÿÀ�•¯ÁÿÀ�•¯ÁÿÀÁÿÀŽ�ÁÿÀŽ�ÁÿÀ<—ÁÿÀ¼Ÿ�ÁÿÀ¼Ÿ�ÁÿÀ=ÁÿÀ½žÁÿÀ½žÁÿÀ>…(ÁÿÀ¾�¬ÁÿÀ¾�¬ÁÿÀ?9ÁÿÀ¿½ÁÿÀ¿½ÁÿÀ8³MÁÿÀ¸»ÉÁÿÀ¸»ÉÁÿÀ9:\ÁÿÀ¹2ØÁÿÀ¹2ØÁÿÀ2éâÁÿÀ²áfÁÿÀ²áfÁÿÀ±lÁÿÀ˜¹èÁÿÀ˜¹èÁÿÀpñÁÿÀ‘xuÁÿÀ‘xuÁÿÀëÃÁÿÀ’ãGÁÿÀ’ãGÁÿÀbÒÁÿÀ“jVÁÿÀ“jVÁÿÀݦÁÿÀ”Õ"ÁÿÀ”Õ"ÁÿÀT·ÁÿÀ•\3ÁÿÀ•\3ÁÿÀÏ…ÁÿÀ–ÇÁÿÀ–ÇÁÿÀDXôÁÿÀÄPpÁÿÀÄPpÁÿÀEÑåÁÿÀÅÙaÁÿÀÅÙaÁÿÀFJ×ÁÿÀÆBSÁÿÀÆBSÁÿÀGÃÆÁÿÀÇËBÁÿÀÇËBÁÿÀVËÇÁÿÀÖÃCÁÿÀÖÃCÁÿÀWBÖÁÿÀ×JRÁÿÀ×JRÁÿÀXµ.ÁÿÀؽªÁÿÀؽªÁÿÀãÂÁÿÀƒëFÁÿÀƒëFÁÿÀùàÁÿÀ�ñdÁÿÀ�ñdÁÿÀ,ÁÿÀ¬ŸÁÿÀ¬ŸÁÿÀ-Ÿ
ÁÿÀ­—ŽÁÿÀ­—ŽÁÿÀ.8ÁÿÀ®¼ÁÿÀ®¼ÁÿÀ/�)ÁÿÀ¯…­ÁÿÀ¯…­ÁÿÀLxÁÿÀÌüÁÿÀÌüÁÿÀM™iÁÿÀÍ‘íÁÿÀÍ‘íÁÿÀN[ÁÿÀÎ
ßÁÿÀÎ
ßÁÿÀH4>ÁÿÀÈ<ºÁÿÀÈ<ºÁÿÀY<?ÁÿÀÙ4»ÁÿÀÙ4»ÁÿÀ:¡nÁÿÀº©êÁÿÀº©êÁÿÀ£OÁÿÀš«ËÁÿÀš«ËÁÿÀ0|ÁÿÀˆ8øÁÿÀˆ8øÁÿÀ#áãÁÿÀ£égÁÿÀ£égÁÿÀ"hòÁÿÀ¢`vÁÿÀ¢`vÁÿÀF”ÁÿÀ—NÁÿÀ—NÁÿÀ7DµÁÿÀ·L1ÁÿÀ·L1ÁÿÀ$^—ÁÿÀ¤VÁÿÀ¤VÁÿÀQt³ÁÿÀÑ|7ÁÿÀÑ|7ÁÿÀRï�ÁÿÀÒçÁÿÀÒçÁÿÀSf�ÁÿÀÓnÁÿÀÓnÁÿÀPý¢ÁÿÀÐõ&ÁÿÀÐõ&Á


I also have come to understand that I need something called pspirkeyb. I downloaded the latest version but have no idea how to work it or anything.

please bear with me, I baught this keyboard specifically to use with my psp, and I dont want it to just be a waste of money... I dont care how long it takes for me to get it working, But a guide, or even better, some hand on hand help would be BEYOND greatly appreciated.

Can someone please tell me where to go from here??
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Use IRDAMon instead and post the hex codes for each key. I can add it to pspirkeyb no problem.

Generally speaking, IR keyboards work this way -

You get a data packet for each press and release of a key. A data packet generally looks like:

Optional packet start byte. The most common value is 0xC0.
Optional key group code.
Key code. A key up is most often just the same value as key down + 0x80.
Optional key validate code. Most often just the inverse of the keycode.
Optional packet end byte. Most often value is 0xC1.

So a packet can be as simple as 0x11 for a key down and 0x91 for key up, or it may be more complicated with the above optional bytes, like 0xC0 0x20 0x11 0xEE 0xC1 for key down.

The current line of Palm keyboards not only have all the optional bytes mentioned above, but also have a secondary keycode for compatibility with a different line of keyboards.
User avatar
Legacyxero
Posts: 23
Joined: Fri Sep 12, 2008 4:42 am

Post by Legacyxero »

ok, when i hit a key in irDAmon i get 18 sets of characters(36 characters).

each set of 2 characters is seperated by a space.

is this right? if so, is there a way to capture all this text, or am I going to have to manually write it all down?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Legacyxero wrote:ok, when i hit a key in irDAmon i get 18 sets of characters(36 characters).

each set of 2 characters is seperated by a space.

is this right? if so, is there a way to capture all this text, or am I going to have to manually write it all down?
Look for what is in common about the data... generally, only one or two bytes of the packet changes. Mark down the entire packet for one key, then only what changes for everything else.

Sometimes, some of the data doesn't matter at all. For example, the Targus keyboard inserts a random number of 0xFF bytes at the front and tail of each data packet. All of them can be ignored (and are - the driver only looks for the 0xC0 start of packet byte).
User avatar
Legacyxero
Posts: 23
Joined: Fri Sep 12, 2008 4:42 am

Post by Legacyxero »

here they are if i was right, chillywilly.

First row of keys
Image

Second row of keys
Image

third row of keys
Image

fourth row of keys
Image

I'de also like to say that I cant thank you enough dude!
User avatar
Legacyxero
Posts: 23
Joined: Fri Sep 12, 2008 4:42 am

Post by Legacyxero »

oh and, J.F... do you think you could get on aim?

im: legacyxero
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

I'm not one for IMing. Email is fine... you can PM me for that if you want.

How's about a picture of the keyboard? No idea how the keys look. "First Row" means nothing. I can work from the screenshots, just need to know what the key layout is.
:)
User avatar
Legacyxero
Posts: 23
Joined: Fri Sep 12, 2008 4:42 am

Post by Legacyxero »

Its quite a big picture, but i had to keep it big so you could see all the keys.

heres the direct link:

http://i56.photobucket.com/albums/g184/ ... ure001.jpg
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Okay, I've started on the code... it's late so I'll finish it up later tomorrow. So you should have something to try tomorrow evening.

Just in case you have suggestions on mapping, here's my first thoughts on it:

Not pressing BlueFn or GreenFn just gives the main character marked, except for the arrow keys, which are considered main characters in my book. That means the '?' marked key is really UP arrow. That makes more sense... '?' should just be shift+/ like a normal keyboard.

Pressing BlueFn gives the blue marked characters except for ? and the arrows, which become the same as the green marks (PgUp, etc).

Pressing GreenFn doesn't give the green marked characters for anything other the the arrows (which become PgUp, Home, PgDn, End). Instead, the Numbers become F1 to F10, and [ becomes F11, ] becomes F12, and ` becomes ESC. Also, left cmd/alt/ctl become right cmd/alt/ctl.

EDIT: Okay, I got an initial compile of the latest pspirkeyb with support for your keyboard. NOW I'm going off to bed. :)

http://www.mediafire.com/download.php?ytmsxmqni3w

The keyboard type for the new keyboard is 23. You'll need to add it to the ini file and copy the appropriate files to the proper place. Then you can try the sample apps. I updated the sample apps to be 3.xx/4.xx prx apps, and they load irda.prx if you're on 3.80 or newer cfw.
User avatar
Legacyxero
Posts: 23
Joined: Fri Sep 12, 2008 4:42 am

Post by Legacyxero »

THANK YOU SOOOO MUCH

sorry for the newb Q, but how do i install all this new data on my PSP? Its just a bunch of folders.
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

Ahh! J.F. why didn't you PM me? Remember that I need all those for piKey too! lol

I'm the only person who has the LATEST version of the PSPIRKeyB!

It appears you didn't add it to the latest version of the PSPIRKeyB lib. The latest version is a lot tidier and has the Belkin driver.

That said... you've updated all the sample files... I'll just work on re-adding adding the Belkin driver. *Sighs.*

In future J.F, please inform me the next time something IRDA related pops up. School doesn't always allow me to check this place daily.

Angelo
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

...then why didn't you ask for a commit???
Are you the ONLY person on planet having the latest pikey, too?? Because i'm quite improving it.... and this improvement should include a dynamic link with pspirkeyb with no longer need to recompile everything.
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

Argh...

As you know Jean, piKey depends on the PSPIRKeyB. You need to "make install" the PSPIRKeyB first to your environment, then "make" piKey and you have the latest version.

I added a driver a while back and forgot about releasing the PSPIRKeyB to the svn due to school work. I think maybe J.F forgot to update his version.

The version that's in the svn now is quite old. I'll update it when I get a chance with all the drivers and the 4.XX kernel update with IRDA calls.

As for the latest version of piKey. I think it's only me that has the latest version, however there are 3 people working on it. (Me, you and Jube.)

To my understanding, Jube and yourself are mainly focusing on SIO, whilst I'm working on IR.

At the moment, I'm too caught up with school work to think about piKey, but when I get a chance I need to update everything, create an Unofficial piKey 0.5 checkpoint and confirm with everybody, that is working on the application, the future of piKey.

I've seen sources from you and, Jean, and both of you look like you've been working on differant things.

Maybe some day we should combien them all together and release Unofficial 0.5 together.

I'm going to PM you my the changelog so far...

You might want to PM me about piKey's progress...

Angelo
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

angelo wrote:Ahh! J.F. why didn't you PM me? Remember that I need all those for piKey too! lol

I'm the only person who has the LATEST version of the PSPIRKeyB!

It appears you didn't add it to the latest version of the PSPIRKeyB lib. The latest version is a lot tidier and has the Belkin driver.

That said... you've updated all the sample files... I'll just work on re-adding adding the Belkin driver. *Sighs.*

In future J.F, please inform me the next time something IRDA related pops up. School doesn't always allow me to check this place daily.

Angelo
I thought I was working from the latest. If you start making changes, you should have let me know. The only changes I knew of that you made were to the repeat variables, which doesn't affect this. If you have indeed been making changes, add the new palm-one stuff from my files to it and post it again.

And yes, this REALLY needs to get committed. There are lots of devs out there with REALLY old versions of pspirkeyb (cough zx81 cough). The main problem is getting someone with write access to actually do so. Have my changes for SDL and PSPGL been committed yet? I posted a patch file months back that someone said they wanted to check out before committing, and I've not heard a peep since.
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

The last change was the Belkin driver... remember? I was decoding HEX values like an autistic demon child!

I tried to submit the lib to Harold Fielker... no reply.

When I find spare time (school is REALLY busy now), I'll make an Unofficial piKey 0.5 checkpoint and get all libs and samples up to date.

I'll zip it all up and inform the PSPDev comunity. I keep bugging ZX81 about the PSPIRKeyB. I don't think he cares!

Who does have access to the SVN?
User avatar
Legacyxero
Posts: 23
Joined: Fri Sep 12, 2008 4:42 am

JH!

Post by Legacyxero »

I have no idea how to install this onto pikey! please help me!
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Re: JH!

Post by J.F. »

Legacyxero wrote:I have no idea how to install this onto pikey! please help me!
Pikey has to be recompiled with the changed pspirkeyb to get any new changes. Better just wait for angelo to integrate the changes with his own changes to pikey. You're just slightly unlucky that both are in a state of flux preceding the next version of the software. If you can't compile these things yourself, you'll just have to be patient.
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

Ill get him outta his misery. I'll provide him with a IR_IN.PRX with the correct driver.

He's shown initiative, so why not put effort and give him a small gift!

But first... school work! *Sighs*
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

@Jean

What major changes have you made in piKey. Can we mix are ideas together?

Angelo
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

angelo wrote:@Jean

What major changes have you made in piKey. Can we mix are ideas together?

Angelo
Yeah, we should pull everything together and try to get the repo updated. Hopefully then folks will start using a relatively new version for a change. :)
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

Me Jean Jube... 3 versions. 2 versions too many!
User avatar
Legacyxero
Posts: 23
Joined: Fri Sep 12, 2008 4:42 am

Post by Legacyxero »

thanks alot dude.

could you just post the link in here after you finnish your work?
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

@Angelo
Seems to be quite OT here, but....here we are. As i just finished writing in reply to your PM, fortunately the greatest part of my work is on plugins side; only thing required for my works to behave correctly is to fix or remove at all SIO messing code from PiK. I'm really busy now, too, but when i've time (and when i reach a good point in development) i'll surely let you know.
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

ok guys... all seems fair!

Looks like we're all pretty busy and that we have higher priorities. lol

I'll have to agree with you. I'll PM you when piKey is almost complete.

Thanks

Angelo
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

OK, I fixed and cleared up the PSPIRKeyB lib now! Here's the IR keyboard compatibility list:

Code: Select all

#  0  - No IR Keyboard
#  1  - Compaq / HP Foldable IR Keyboard
#  2  - Snap'n'Type IR Keyboard
#  3  - Belkin F8U1500 IR Keyboard
#  5  - HP Slim IR Keyboard
#  8  - Belkin IR Keyboard &#40;not IrDA&#41;
#  9  - Flexis FX-100 IR Keyboardeyboard
#  10 - Benq G250 IR Gamepad
#  12 - Micro Innovations Foldaway IR Keyboard
#  13 - Micro Innovations IR Datapad
#  14 - Compaq IR Micro Keyboard
#  15 - Targus Universal IR Wireless Keyboard
#  18 - Freedom IR Keyboard
#  19 - NOVAETS - KIS2 - IR Keyboard
#  20 - Palm Universal Wireless IR Keyboard
#  21 - Hama Palm IR Keyboard
#  22 - Sprint PDA Keyboard
#  23 - Palm P10946-P
I also fixed the key repeat values so they are now perfect. Here's the latest PSPIRKey_B lib with the latest drivers and the samples moved to 4.XX kernel with IRDA calls. (Thanks J.F!)

http://piKey.Kloplop321.com/Release/PSPIRKeyB_Lib.zip

And here are the modules compiled using the latest PSPIRKey_B. I compiled Unofficial piKey 0.4 and stripped it down to the PRX modules and the configs. I haven't tested it.

If any help/support is needed, please go to http://forums.noobz.eu/. You'll find help there and I always check the forums and my PM there. I don't want to fill this forum with clutter.

Here's Unofficial piKey 0.4:

http://piKey.Kloplop321.com/Release/piK ... d_Palm.zip

@J.F + Jean + Jube + ZX81 and any other IRDA / piKey dev. Can somebody please post the latest PSPIRKeyB_Lib to the SVN please. It's about time it got revamped!

Anyway... I'm off to do my schoolwork now! *Sighs*.

Have a good day guys!

Angelo
User avatar
zx-81
Posts: 11
Joined: Fri Apr 07, 2006 5:38 pm
Location: France
Contact:

Post by zx-81 »

I've asked for a write access to subversion ps2dev server in Nov 14, 2007 ... and i've never had any chance to get it.

Angelo, may be we can share code using code.google.com account ?
The only good is knowledge and the only evil is ignorance.
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

I've asked for a write access to subversion ps2dev server in Nov 14, 2007 ... and i've never had any chance to get it.
Gee... they're slow!
Angelo, may be we can share code using code.google.com account?
Well it's always going to stay on the server one of my team members have ftp://ftp.kloplop321.com/ but do what you want with it. Nothing is really my work, I just manage it. :)

Angelo
User avatar
Legacyxero
Posts: 23
Joined: Fri Sep 12, 2008 4:42 am

Post by Legacyxero »

YES, its almost perfect. All i need now is the keymap from JF.
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

Don't bother J.F for the keymap mate. He's a busy man and he also doesn't have the keyboard. Making a perfect keymap will be pretty difficault.

Make the keymap yourself. It's dead easy! Download Unofficial pikey 0.4 and read the piKey's Guide to keymaps. Then, basing it on the "Qwerty.ini" map, you can build your own! It's dead easy!

You need to get the piKey I sent you working though and a fixed version of the piKey Sample to write the keymap.

Did piKey work well on your PSP... except from the incorrect OSK characters?

I can help you make it if you want... but over MSN. Not email! I'll post a link of the working piKey Sample. I'm kinda busy now...

Angelo

EDIT: IF piKey is properly installed, then this should work just fine. Copy the "piKey_Sample" folder to ms0:\PSP\Game.

Link: http://piKey.Kloplop321.com/Release/Sample.zip
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Legacyxero wrote:YES, its almost perfect. All i need now is the keymap from JF.
Well, I'm not sure if the keys are all correct as I don't have that particular keyboard. I told you the layout in my post above:

Not BlueFn or GreenFn: Key is as marked with the exception of the arrow keys. I think the arrow keys are important, so I made them the primary mapping of those keys.

BlueFn: Key is as marked with the exception of the arrow keys again. Since the arrows were made primary, BlueFn + arrow is the same as the green marking (PgUp, Home, PgDn, End). Note that most of the green markings can be had by BlueFn+Shift. That makes more sense than GreeFn (e.g., @ = shift + 2 which is shift+ (BlueFn + W)).

GreenFn: Virtually none of the green marked keys are used with GreenFn... that didn't make sense. Instead, I use GreenFn for yet more of the missing keys. GreenFn + Number gives a F1 to F10. GreenFn + [ = F11, and GreenFn + ] = F12 (that makes the top row just like the top row of a regular keyboard - the only thing missing is Esc, which I made GreenFn + `). GreenFn + CMD/ALT/CTL = right CMD/ALT/CTL.

If you find a key that is wrong (like A is not A), then let me or angelo know so we can correct the maps.
Post Reply