Release [Alpha] PURE


Liboicl

Member
Joined
Aug 20, 2011
Messages
47
Plugin based Usb Ready device Emulator.

This is a program that I have been working on, periodically, for some time. It uses gadgetfs to emulate usb devices via the OTG usb port of the pandora. It is based heavily upon plugin usage. There is only a basic zenity interface to help in selecting which plugin is to be used. Each plugin can then load whatever graphics are necessary.

This is an alpha build, several other features are planned. Some of which are:

  • Loading multiple plugins at once.
  • More included plugins.
  • USB passthrough, to allow a device plugged into the host port to be passed through to the OTG port.
  • Easier remapping of buttons in current plugins.
  • Many more...
This version includes 2 prebuilt plugins.

  1. libkeyboard; a standard keyboard with 101 keys.
  2. libps3; a ps3 controller
Both of the above plugins were wrote by me, but I will release the source to this app, and a tutorial on writing plugins, after I get the time.

Here are some issues with the current implementation.

First of all, the PS3 controller was what I first wrote in order to test this. I used SDL to get the input, which is still the case, so the SDL window needs focus when using the controller. This will likely be replaced by a better plugin.

Secondly, the keyboard behaves as a standard keyboard and, as such, doesn't follow the pandora layout. For example Shift+2 will output @ instead of {.

There is a configuration file which allows the plugins folder location to be specified.

http://repo.openpandora.org/?page=detail&app=pure.liboicl.001
 
Last edited by a moderator:
Well. This is pretty neat stuff. I'm impressed. I think I will try to make my Pandora be a controller for an ASUS tablet now.  ^_^

I wonder what else we can have the Pandora emulate?
 
Outstanding :) I've thought about working on something like this, but I ended up ordering a Teensy instead, make my life a little easier (and new toy!) ..

Totally cool :)

jeff
 
The joystick input for the PS3 controller is a bit messed up. When I press it in certain directions, such as straight up/down/left/right, the input snaps to the center. (Of course, I set the nubs to joystick mode manually to get the input to work at all.)
 
So what kind of things can one use this for ? You mentioned PS3 gamepad control, but how is that different from Qjoy for example ? 
You misunderstand. This allows the Pandora to emulate a PS3 gamepad or other things over the mini-USB port. So you can use the Pandora as a controller for your PC, for example.
 
At least on Windows 8, the keyboard works very well. Windows 8 also does recognize a USB Gamepad if PS3 Joypad emulation is choosen, but I don't have anything to test it with currently.

@Libiocl

Do you plan on integrating the Pandoras action buttons as PageUp,PageDown,Pos1 and End in the keyboard plugin ?
 
Tried the USB Keyboard on windows, works well, but there's a problem with zenity, when I press SPACE the OK button is pressed too, and so the plugin will be closed
 
I like this simplistic approach, actually. A standalone plugin creator would work well with this. I like the idea of a simple drop-down list of device profiles to select.

However, I seem to have similar problems to the "Master Control" PND. Windows detects the devices, but they don't do anything. The first keypress from the keyboard works, but subsequent ones are ignored.
 
The joystick input for the PS3 controller is a bit messed up. When I press it in certain directions, such as straight up/down/left/right, the input snaps to the center. (Of course, I set the nubs to joystick mode manually to get the input to work at all.)
Well, my joysticks are wonky on my pandora. They drag automatically sometimes and such, but they work fine with this program. Maybe the issue is because I was trying to get it to work good with my sticks, or maybe you have issues with yours? Run Pandora Input-Tester from the system menu.

Oh, I'm sorry, I did misunderstand the purpose of this application ! 

That is really cool, then :)

Does it work for all systems ? (windows, Linux?)
Well, I only run Linux, but some users report that it works on Windows.

At least on Windows 8, the keyboard works very well. Windows 8 also does recognize a USB Gamepad if PS3 Joypad emulation is choosen, but I don't have anything to test it with currently.


@Libiocl


Do you plan on integrating the Pandoras action buttons as PageUp,PageDown,Pos1 and End in the keyboard plugin ?
Do they not already work? The plugin reads directly from /dev/input, so it should read those as well.

EDIT: It seems that they do not. That will be fixed. Thanks for the heads up.

Tried the USB Keyboard on windows, works well, but there's a problem with zenity, when I press SPACE the OK button is pressed too, and so the plugin will be closed
Well, I thought about that. For now, just click off of the zenity window. It doesn't require focus.

I like this simplistic approach, actually. A standalone plugin creator would work well with this. I like the idea of a simple drop-down list of device profiles to select.

However, I seem to have similar problems to the "Master Control" PND. Windows detects the devices, but they don't do anything. The first keypress from the keyboard works, but subsequent ones are ignored.
Hmm, that's odd. What version of Windows are you using? If you are willing, I can provide you with a debug version of this app, with loads of extra output, that may help narrow the problem down.

Works fine for the keyboard - it would be great if what we see on the pandora keyboard could be what we type on screen :) But at least it's functional. 
Yeah, I was thinking about hacking that in. The problem is the format of the Pandora, which as far as I know, doesn't follow any standard. Please correct me if I'm wrong. One way around it would be to specify it on the host, but that seems tedious. My other plan is to just send in the correct combination of keys to match what the Pandora shows.
 
Last edited by a moderator:
The joystick input for the PS3 controller is a bit messed up. When I press it in certain directions, such as straight up/down/left/right, the input snaps to the center. (Of course, I set the nubs to joystick mode manually to get the input to work at all.)
Well, my joysticks are wonky on my pandora. They drag automatically sometimes and such, but they work fine with this program. Maybe the issue is because I was trying to get it to work good with my sticks, or maybe you have issues with yours? Run Pandora Input-Tester from the system menu.
I ran Pandora Input-Tester and I can hit each combination of 32,0; -32,0; 0,32; 0,-32 with each nub. Maybe you're not properly handling these cases?
 
The joystick input for the PS3 controller is a bit messed up. When I press it in certain directions, such as straight up/down/left/right, the input snaps to the center. (Of course, I set the nubs to joystick mode manually to get the input to work at all.)
Well, my joysticks are wonky on my pandora. They drag automatically sometimes and such, but they work fine with this program. Maybe the issue is because I was trying to get it to work good with my sticks, or maybe you have issues with yours? Run Pandora Input-Tester from the system menu.
I ran Pandora Input-Tester and I can hit each combination of 32,0; -32,0; 0,32; 0,-32 with each nub. Maybe you're not properly handling these cases?
I found the issue. What happened was when one axis went to zero, so did the other. I have a few other fixes I'm working on and will upload a new version with this fix included.
 
Yeah, I was thinking about hacking that in. The problem is the format of the Pandora, which as far as I know, doesn't follow any standard. Please correct me if I'm wrong. One way around it would be to specify it on the host, but that seems tedious. My other plan is to just send in the correct combination of keys to match what the Pandora shows.
Yeah, that sounds like a good way to fix this.  

Well, I only run Linux, but some users report that it works on Windows.
 

I tried the PS3 mode on Linux, but it did not work at all. (OpenSUSE 12.2).

Not sure why. 
 
 My other plan is to just send in the correct combination of keys to match what the Pandora shows.
Maybe include some sort of "translation" table (much like crionic did it with "master control"), so people that like to alter that, to accomodate their habits, can do it ?
 
Keyboard works nice.

Same problem as Master Control.

Fn Buttons are messed up on German Keyboard.
 
Back
Top