Usb Emulation And Bluetooth Goodness


Still Fresh
Joined
Feb 18, 2010
Messages
15
Age
36
Location
Midwest Alberta
Pandora is one of very few open-source devices that have a USB client port. The only others I've used are PSP and DS (flash carts, Action Replay etc have USB ports), which have to be hacked and are poorly documented. In comparison, Pandora is fully open and documented, and also has: wifi, USB host port, Bluetooth, 2 SD cards, touchscreen, microphone, speakers, QWERTY keyboard, analog nubs, and a heck of a lot of processor power and battery life. This opens up a pretty crazy number of possibilities that other devices don't have.

Obvious USB devices the Pandora would be able to function as:
  • Game controller (with keyboard for LOTSA BUTTONS :D )
  • Keyboard
  • Mouse (using either nub, or touchscreen)
  • Monitor
  • Speakers
  • Microphone
  • SD adaptor
  • Bluetooth adaptor
  • Wifi adaptor
  • Security dongle (generate a code using the synchronized system clock to unlock a PC)
  • Jiggler ("mouse" that just jiggles itself every couple minutes to prevent screen savers kicking in)
  • Probably more I'm forgetting
It would also be able to emulate a powered hub so that it could function as several of these devices at once. Keyboard, mouse, and gamepad emulation could have all sorts of nifty features like macros and rapid-fire. Combine an actual gamepad plugged in with the Pandora's own inputs and you've got one hell of a joystick going. :D

More interesting possibilities:
  • Emulate any USB device at all, for testing purposes. Say you're developing a driver for some gadget, but you don't actually have the gadget, or you need to test unusual responses such as critical failure. Just have Pandora mimic it.
  • USB logger. Transparently pass packets from the host port to the client port, logging them on the way. Also be able to replay the packets.
  • Multi-medium storage device. Any of SD1, SD2, flash, attached USB device(s), RAM disk, devices connected via Bluetooth, and software "devices" such as /dev/null, /dev/random, loopback etc could all be mapped to partitons on what appears to the PC as one generic USB storage device, or RAIDed, etc. Instead of partitions, you can also have them each appear as a separate disk, the way some-ridiculous-number-in-one flash card readers do.
  • Transform one USB device into another. For example Pandora emulates an ethernet adaptor, but is actually passing the packets on through its internal wifi. This avoids the PC needing to know anything about wifi.
  • Transparent USB bridge/router: pass USB packets on to another machine via wifi/Bluetooth/etc. Say one PC is under your control but another is not (or the former is another Pandora :p ) - plug the USB device into the one that you control, the Pandora into the other, run the appropriate software on both, et voila, seamless wireless USB.
  • If your phone can be controlled via USB, you could plug it into the Pandora and not have to put up with said phone's craptacular software. :p My phone absolutely sucks so this would be great.


Then there's a few Bluetooth ideas I've had kicking around, waiting for the appropriate device. Pandora is also one of few user-programmable Bluetooth devices.
BlueProximity lets your PC detect when your phone is nearby, based on signal strength of its beacons, and lock/unlock automatically when you leave/enter the room. Since it only uses signal strength, though, it's not terribly precise. Mine locks and unlocks every so often if I take a call on the couch, unlocks when I pass the window on the way out, etc. With Pandora, a more flexible and more secure system can be created, that would allow for some user interaction (the PC can tell it what's up, and it can tell you, say by beeping) and wouldn't be fooled by simple MAC spoofing.

When you get close enough, they could automatically sync. I have saved games, notes, etc on my PSP that rarely get backed up because it's a pain, and when I do open up those notes, I have to manually merge the files. Pandora would just be able to automatically connect to a network share and run rsync. It would also be able to tell what you're actually doing. I'd be using mine for music, and when I come home, it could wait until I stop the music player to actually sync. That way it knows I'm not just stopping in for a minute, or if the player wasn't running in the first place, I probably just went into another room.

With Pandora's crazy battery life, and especially with AC power, it could also function as one hell of an alarm clock. I am a goddamn zombie in the mornings - I can get up, switch off any alarm clock no matter how complex, and go back to sleep without ever turning my brain on. By using wifi/Bluetooth to tell if it's still in range of my PC/router, it could refuse to shut up until I've actually left. :p (Maybe some modding required to prevent me just switching it off though, haha. I think as long as I could power it on, and it can be turned off via software, that would do... no real need to turn it off anyway.)

Speaking of music, obvious: support for Bluetooth headphones, complete with the control buttons. I hate not being able to use those with generic transmitters.


Now, a more ambitious idea... Bluetooth is a sucky proprietary protocol. (I don't say it's sucky because it's proprietary... I say it's sucky because it sucks. :p ) With Pandora, and open phones such as Android, all coming out around the same time (plus iPhone and PSPGo hacks), suddenly we have a bunch of open-source Bluetooth devices out there. This is the time to develop a new, open protocol that uses existing Bluetooth hardware, and get it into these devices so it might actually stand a chance at getting popular. If it's nicer to work with than Bluetooth, and since it's all in software, with enough push I can see at least some devices supporting both... with any luck, it eventually overtakes Bluetooth entirely. Now is the time!
(Even if it doesn't take off, us Linux users could still enjoy the benefits of our open devices and PCs all using it. :D )


I wish I could do more than just speculate and give out ideas, but it's hard to develop for hardware you don't have, and it's going to be a while yet before I manage to get one. So hopefully someone with access to it can put some of these ideas to work.
 
One of the first things I'm going to get working is my PS3 controller. It works with linux and works over USB and BT. Should be handy for multiplayer gaming. Or possible even better do the reverse like the parent said. Maybe with remote play?
 
HEY! didn't you listen to this guy!?!
WoD said:
There should be an "Offtopic" thread where any member of the forums with a join date > 2007 is automatically sandboxed until they're actively working on a port or have proven themselves by a series of trials and tests.
MOVE ALONG NOW!!!

no really though, that's a great idea, I was actually thinking about useing the pandora as a game controller/keyboard/virtual trackpad input for my htpc (home theater PC) at some point in the future
 
Last edited by a moderator:
Bluetooth modules tend to implement at least HCI, with others (especially those with UART interfaces designed for interfacing with weak microcontrollers) implementing specific higher level profiles like SPP. So at least part of the Bluetooth stack is going to be in hardware. I'm not saying that completely low level access can't be achieved by this, but I don't know that it can either. Or maybe you weren't counting the first levels of the stack up to HCI as something to replace?
 
there is some app for the ipod/iphone that streams touchscreen input over ip via wifi, not sure if it was because of exophase is saying with the bluetooth (alot of his posts go way over my head) and how locked down apple's got it, or what, but it didn't work out too bad just turning it into a trackpad and virtual keyboard given the limited size, i can image that on the pandora would totally rock with as much as it's got going on
 
jb0yx said:
there is some app for the ipod/iphone that streams touchscreen input over ip via wifi, not sure if it was because of exophase is saying with the bluetooth (alot of his posts go way over my head) and how locked down apple's got it, or what, but it didn't work out too bad just turning it into a trackpad and virtual keyboard given the limited size, i can image that on the pandora would totally rock with as much as it's got going on
Exo was referring to the comment of replacing Bluetooth. In a lot of cases, layers of the Bluetooth protocol are implemented in hardware rather than software (specifically when used with embedded devices / microcontrollers - imagine them as very weak versions of your computer processor - not a lot of memory and computing power, so if you want to communicated with your computer over Bluetooth from a microcontroller, the bluetooth module you're using with the microcontroller better be damn good at handling most of the bluetooth itself.)
 
Last edited by a moderator:
⬡, we've discussed the Pandora-as-USB-slave a few times in the past. Everyone agrees that all those features you list would be awesome, but no one really knows how (or if) it can be implemented. It's my understanding that, in USB slave mode, the hardware will present the SD cards as mass storage devices to the host; everything else, though, would need to be routed through software, and no one's taken a stab at that yet. But if you've got the know-how, please give it a shot, this is a feature I would love!
 
Back
Top