Using Spacemouse with iOS/Android?

Post questions, comments and feedback to our 3Dconnexion Mac Development Team.

Moderator: Moderators

Post Reply
MMEngineer
Posts: 5
Joined: Fri Jan 23, 2015 12:06 pm

Using Spacemouse with iOS/Android?

Post by MMEngineer » Fri Jan 23, 2015 12:10 pm

(This doesn't seem like quite the right place to post this question, but it's the best match.)

I am a graduate student working on designing a computer system to be used by some types of hospital patients. My system would require a controller that can connect directly to an iPad (or, if necessary, an Android device). I currently have a non-wireless Spacemouse and think it might be the right type of controller; is the wireless Spacemouse capable of interfacing with the iOS or Android systems?

Thank you.

ngomes
Moderator
Moderator
Posts: 1944
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Using Spacemouse with iOS/Android?

Post by ngomes » Fri Jan 23, 2015 12:38 pm

Hi MMEngineer,

Sounds like a fun project.

Apple iOS devices are very locked down. Your best chance is creating a "proxy" of sorts using a separate computer connected through wi-fi to your iOS device. As far as I know, Apple does not allow apps to access unauthorised devices over USB (I believe the USB device needs an Apple-provided chip to authorise it to the iOS device). Bluetooth likewise (very limited set of profiles). Perhaps you can use the audio in jack and do your own DSP to convert audio to a bitstream but it is unlikely to achieve any decent bit rate. Bottom line: connect your SpaceMouse to a host computer (Raspberry Pi, say) and use it as wi-fi proxy.

With Android you should be in the clear provided the device has USB host capabilities (most recent devices should).

Let us know how you get on.

MMEngineer
Posts: 5
Joined: Fri Jan 23, 2015 12:06 pm

Re: Using Spacemouse with iOS/Android?

Post by MMEngineer » Sat Jan 24, 2015 8:12 pm

Thanks. Sounds like a bit of a pain for the iPad, but I can try it out with my personal Android tablet if I get a wireless one. I'm about to get one and try it out, but how will I connect it to my Android tablet? I have a Galaxy Tab 2, if that matters.

Thanks!

ngomes
Moderator
Moderator
Posts: 1944
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Using Spacemouse with iOS/Android?

Post by ngomes » Mon Jan 26, 2015 3:06 am

Hi MMEngineer,
how will I connect it to my Android tablet?
You will need to ensure the tablet has "USB host" capabilities (the specification sheet for the device should tell you this). Then you need to connect either the SpaceMouse wireless dongle or the device itself using a cable.

I do not have code that will read USB data packets on Android. Probably the Open Access Accessory protocol is what you'll need to use.

MMEngineer
Posts: 5
Joined: Fri Jan 23, 2015 12:06 pm

Re: Using Spacemouse with iOS/Android?

Post by MMEngineer » Sun Feb 08, 2015 8:51 am

Just wanted to update you on this (and ask for any followup).

I connected the USB dongle to my Samsung Galaxy Tab 2 7.7" using this adapter - http://smile.amazon.com/gp/product/B005518J6Q - and it automatically started working as a mouse in terms of navigating the home screens. So that's encouraging! My impression was that I would have to do some setup to get it to work at all.

I'll look into AOA, but I'm assuming your setup/calibration apps for my Mac don't have any version for mobile/Android interfaces yet?

Thanks!

ngomes
Moderator
Moderator
Posts: 1944
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Using Spacemouse with iOS/Android?

Post by ngomes » Mon Feb 09, 2015 2:44 am

MMEngineer
I'm assuming your setup/calibration apps for my Mac don't have any version for mobile/Android interfaces yet?
Not sure I follow you. Perhaps you are asking if our SDK sample programs for the Mac can be used on Android? That's an interesting question which I did not consider (using sample code for other platforms). I suspect it will not work but you may want to have a look at our sample code for Linux.

If you can use libusb on Android, then we can share with you Linux sample code that uses libusb.

MMEngineer
Posts: 5
Joined: Fri Jan 23, 2015 12:06 pm

Re: Using Spacemouse with iOS/Android?

Post by MMEngineer » Tue Feb 10, 2015 9:43 am

Thank you! I won't have access to the SpaceMouse until tonight, but it does look at a first glance like libusb can work with Android ( https://github.com/libusb/libusb/tree/master/android ), so if you're able to share the Linux code, that might be very helpful. Much appreciated.

Post Reply