Inputdriver on MacOS

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Inputdriver on MacOS

daaron
I have a 3DConnexion 3D mouse (USB) and I'd like to try to get it working
with OpenSCAD. According to the wiki -
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/WIP#MacOS - "There's
currently no snapshot builds available, please ask on the forum/mailing list
if you would like to try this feature on MacOS."

I'm using OpenSCAD 2019.01.30 - can anyone send me pointers on how to set
this up on a Mac?



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

MichaelPFrey
On 15.02.19 02:30, daaron wrote:
> I have a 3DConnexion 3D mouse (USB) and I'd like to try to get it working
> with OpenSCAD. According to the wiki -
> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/WIP#MacOS - "There's
> currently no snapshot builds available, please ask on the forum/mailing list
> if you would like to try this feature on MacOS."

The inputdriver was merged into master, so it should now be part of the
development snapshots of all operating systems. The documentation just
does not reflect that.

Also most development was/is done under linux, so if you have any issue
under MacOS, do not hesitate to ask for help.

With kind regards,

Michael Frey


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

daaron
Hi Michael,

Thanks - that’s great news. So how do I activate it / make it work?




> On Feb 15, 2019, at 9:06 AM, Michael Frey <[hidden email]> wrote:
>
>> On 15.02.19 02:30, daaron wrote:
>> I have a 3DConnexion 3D mouse (USB) and I'd like to try to get it working
>> with OpenSCAD. According to the wiki -
>> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/WIP#MacOS - "There's
>> currently no snapshot builds available, please ask on the forum/mailing list
>> if you would like to try this feature on MacOS."
>
> The inputdriver was merged into master, so it should now be part of the development snapshots of all operating systems. The documentation just does not reflect that.
>
> Also most development was/is done under linux, so if you have any issue under MacOS, do not hesitate to ask for help.
>
> With kind regards,
>
> Michael Frey
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

daaron
In reply to this post by MichaelPFrey
Hi All,

Is there anyone who’s gotten 3D mouse support to work with OpenSCAD on a Mac?




>> On Feb 15, 2019, at 9:06 AM, Michael Frey <[hidden email]> wrote:
>>
>> On 15.02.19 02:30, daaron wrote:
>> I have a 3DConnexion 3D mouse (USB) and I'd like to try to get it working
>> with OpenSCAD. According to the wiki -
>> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/WIP#MacOS - "There's
>> currently no snapshot builds available, please ask on the forum/mailing list
>> if you would like to try this feature on MacOS."
>
> The inputdriver was merged into master, so it should now be part of the development snapshots of all operating systems. The documentation just does not reflect that.
>
> Also most development was/is done under linux, so if you have any issue under MacOS, do not hesitate to ask for help.
>
> With kind regards,
>
> Michael Frey
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

kintel
Administrator
I don't think anyone has worked on this on Mac specifically.
Any help to test it and/or write documentation/tutorials would be very helpful.

If you offer some insights into what you've tried so far and what works and doesn't work, perhaps someone here can help you further.

 -Marius

> On Feb 20, 2019, at 10:09, D. A. Karp <[hidden email]> wrote:
>
> Hi All,
>
> Is there anyone who’s gotten 3D mouse support to work with OpenSCAD on a Mac?
>


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

daaron
I'd be delighted to help test and document this. So far, I've installed the 2019.1.30 snapshot build. In the Axis preferences pane, there are five items under "Driver selection." Three are grayed out: SpaceNav, Joystick, and DBus. The other two, HIDAPI and QGamepad, have no effect when selected.

I tried enabling "input-driver-dbus" on the features pane (and restarted), but it did not enable DBus on the Axis pane nor have any other noticeable effect.

Michael Frey suggested that inputdriver "should now be part of the development snapshots of all operating systems" but I haven't found any evidence of this in my installation.

I've installed the software/drivers that came with my 3Dconnexion SpaceMouse, so I know the hardware works. But I haven't been able to get OpenSCAD to respond to it in any way.

Apart from the above, I don't know what else to try. Anyone have any suggestions?

On Wed, Feb 20, 2019 at 7:14 AM Marius Kintel <[hidden email]> wrote:
I don't think anyone has worked on this on Mac specifically.
Any help to test it and/or write documentation/tutorials would be very helpful.

If you offer some insights into what you've tried so far and what works and doesn't work, perhaps someone here can help you further.

 -Marius

> On Feb 20, 2019, at 10:09, D. A. Karp <[hidden email]> wrote:
>
> Hi All,
>
> Is there anyone who’s gotten 3D mouse support to work with OpenSCAD on a Mac?
>


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

MichaelPFrey
On 20.02.19 20:29, D. A. Karp wrote:

The other two, HIDAPI and QGamepad, have no effect when selected.

QGamepad is "best with a XBox 360 controller".

Note that I do not consider that good hardware, but QGamepad has a lot of quirks specific to that Microsoft Hardware, making it borderline unusable with other gamepads.

(I still like QGamepad as it is easy to develop with cross platform and makes sense for Windows and also works for MacOSX with an XBox360 controller)


I tried enabling "input-driver-dbus" on the features pane (and restarted), but it did not enable DBus on the Axis pane nor have any other noticeable effect.

dbus is interprocess communcation protocol.

You need an other software to use dbus.
Currently, there is no end user software for dbus, so it is a developer feature only currently.

In other words: Not relevant for just using a 3D-mice.

I've installed the software/drivers that came with my 3Dconnexion SpaceMouse, so I know the hardware works. But I haven't been able to get OpenSCAD to respond to it in any way.

That could be a hint of what is going on.

For a spacemouse, you should active HIDAPI, stop the 3Dconnexion driver and restart OpenSCAD.

At least this is how it works under Windows.

The HIDAPI driver directly talks to the SpaceMouse.

If the original driver is also running, the original driver blocks OpenSCADs low level driver.

To be clear: OpenSCAD is not using an official 3Dconnexion protocol or driver. OpenSCAD has its own driver and directly talks to the 3D-Mice. Having the official driver running prevents that.


Now comes the worrying part:

I had the HIDAPI driver working at one point working on my Ubuntu Linux machine.

Under Linux, programs that want to directly talk to a HID (human interface device) need super user privileges.

meaning, starting openscad with

sudo ./openscad

which is worrying in many ways.

I do understand why linux does not want user space programs to take over control over a HID. (If a user space program could directly talk to a HID like keyboard, the user space programm could privilege escalate by waiting for super user terminal)

I wonder if MacOSX has a similar protection the same reason(s). I also wonder when Microsoft sees the issue in that, blocking our HIDAPI driver under Windows - but given Microsoft track record for Windows 10 updates, Microsoft breaking things by accident seams more likely then improving security by intention.


On Wed, Feb 20, 2019 at 7:14 AM Marius Kintel <[hidden email]> wrote:
I don't think anyone has worked on this on Mac specifically.

To my understanding that is correct.

I would at, the most work was done under linux building on the joystick driver with a gamepad.

A lot of things are generic once the input device is recognized and working, but if not, it gets tricky.

The HIDAPI is partially operating system dependent, so having one Mice working fine under linux does not mean it will work under Windows.

We do not have a documentation for the 3DConnex Device protocols - so reversing the protocol contains trail and error.

Hardware (3D-Mice) is expensive (and every generation, sometimes even variants with in a generation like wireless devices, have protocol quirks), making things even harder.


With kind regards,

Michael Frey


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

thehans

On Wed, Feb 20, 2019 at 2:59 PM Michael Frey <[hidden email]> wrote:
I had the HIDAPI driver working at one point working on my Ubuntu Linux machine.

Under Linux, programs that want to directly talk to a HID (human interface device) need super user privileges.

meaning, starting openscad with

sudo ./openscad

which is worrying in many ways.

I do understand why linux does not want user space programs to take over control over a HID. (If a user space program could directly talk to a HID like keyboard, the user space programm could privilege escalate by waiting for super user terminal)


I haven't tried the input devices stuff personally, but I think if you just make sure your user is added to the group "input" , it should work without requiring sudo
> adduser USER GROUP


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

thehans
By the way, a quick way to troubleshoot this sort of permissions issue in general, before resorting to running your program with sudo,  is to "ls -la /dev/input" or whatever device file is giving you trouble, and you can see the group its assigned to.

Alternatively you can modify the device permissions with a udev rule, but i think they should be already set for reasonable group permissions.

On Wed, Feb 20, 2019 at 3:16 PM Hans L <[hidden email]> wrote:

On Wed, Feb 20, 2019 at 2:59 PM Michael Frey <[hidden email]> wrote:
I had the HIDAPI driver working at one point working on my Ubuntu Linux machine.

Under Linux, programs that want to directly talk to a HID (human interface device) need super user privileges.

meaning, starting openscad with

sudo ./openscad

which is worrying in many ways.

I do understand why linux does not want user space programs to take over control over a HID. (If a user space program could directly talk to a HID like keyboard, the user space programm could privilege escalate by waiting for super user terminal)


I haven't tried the input devices stuff personally, but I think if you just make sure your user is added to the group "input" , it should work without requiring sudo
> adduser USER GROUP


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

tp3
I just tried with the latest snapshot version on my old MacBook
and the only change required was to enable the "HIDAPI" driver.

Could you please show the USB information of the device? Attached
image shows the info from my SpaceMouse Wireless with the dongle
connected.

It seems there are different receivers and we have some trouble
with the "Universal Receiver"

With the driver enabled and a device detected, it should show
up like in the Help->Library Info screenshot in the InputDriver
section.

Note that it's not our choice to stay away from the SDK but
the licensing of it sadly is totally incompatible with any open
source software.

ciao,
   Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

hidapi-openscad-info.png (166K) Download Attachment
hidapi-usb-info.png (131K) Download Attachment
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

daaron
Thanks for your help Torsten!  So I uninstalled the 3DConnexion software and rebooted. The spacemouse is now apparently being treated as a normal mouse everywhere, including OpenSCAD: twist zooms, other gestures pan. In other words, it's not working.

In Lib & Build Info, I see "InputDrivers: HidApiInputDriver" (image attached)

So are you saying that all I should need is the latest snapshot (I have 2019.2.20) and the HIDAPI option enabled? Am I missing something?



On Feb 20, 2019, at 2:50 PM, Torsten Paul <[hidden email]> wrote:

I just tried with the latest snapshot version on my old MacBook
and the only change required was to enable the "HIDAPI" driver.

Could you please show the USB information of the device? Attached
image shows the info from my SpaceMouse Wireless with the dongle
connected.

It seems there are different receivers and we have some trouble
with the "Universal Receiver"

With the driver enabled and a device detected, it should show
up like in the Help->Library Info screenshot in the InputDriver
section.

Note that it's not our choice to stay away from the SDK but
the licensing of it sadly is totally incompatible with any open
source software.

ciao,
 Torsten.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

daaron
In reply to this post by MichaelPFrey
Thanks, Michael. The HIDAPI driver that comes with OpenSCAD - do I need to do anything beyond enabling HIDAPI in the Axis preferences pane to activate/install the driver?



On Feb 20, 2019, at 12:59 PM, Michael Frey <[hidden email]> wrote:

For a spacemouse, you should active HIDAPI, stop the 3Dconnexion driver and restart OpenSCAD.

At least this is how it works under Windows.

The HIDAPI driver directly talks to the SpaceMouse.

If the original driver is also running, the original driver blocks OpenSCADs low level driver.

To be clear: OpenSCAD is not using an official 3Dconnexion protocol or driver. OpenSCAD has its own driver and directly talks to the 3D-Mice. Having the official driver running prevents that.



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

tp3
In reply to this post by daaron
On 21.02.19 20:10, D. A. Karp wrote:
> So are you saying that all I should need is the latest
> snapshot (I have 2019.2.20) and the HIDAPI option enabled?
> Am I missing something?

It's more likely that it's an unknown receiver so the
driver does not find the device. We can check via the
USB info that should show the VENDORID and PRODUCTID.
We have a similar issue in discussion (for Windows)
with a device which calls itself "Universal Receiver".
(https://github.com/openscad/openscad/pull/2734)

Looks like the screenshots didn't make it, I think there
are some limits on attachment file size so maybe Nabble
stripped those out?

ciao,
   Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

daaron
In reply to this post by tp3
Hi Torsten,

In OpenSCAD's Library Info, it does not identify my hardware like it does on yours. And in the Hardware pane of About This Mac, the entry for my spacemouse is similar to yours, but the product ID is different. I have the Spacemouse Compact, not the wireless. Could that be the problem?



On Feb 20, 2019, at 2:50 PM, Torsten Paul wrote:

I just tried with the latest snapshot version on my old MacBook
and the only change required was to enable the "HIDAPI" driver.

Could you please show the USB information of the device? Attached
image shows the info from my SpaceMouse Wireless with the dongle
connected.

It seems there are different receivers and we have some trouble
with the "Universal Receiver"

With the driver enabled and a device detected, it should show
up like in the Help->Library Info screenshot in the InputDriver
section.

Note that it's not our choice to stay away from the SDK but
the licensing of it sadly is totally incompatible with any open
source software.

ciao,
 Torsten.
<hidapi-openscad-info.png><hidapi-usb-info.png>_______________________________________________


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

tp3
On 23.02.19 19:31, D. A. Karp wrote:
> I have the Spacemouse Compact, not the wireless. Could that
> be the problem?

Yes, we did not have that device yet. I've added it to the list
hoping it will use the same data as the other devices.
We'll need to check with a new snapshot if it works now. If not,
I have to get the debug stuff in shape for official inclusion
so we can track what's going on...

ciao,
   Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

daaron
Is there anything I can do now to help test it, or should I just wait for the next snapshot?



> On Feb 23, 2019, at 10:43 AM, Torsten Paul wrote:
>
> Yes, we did not have that device yet. I've added it to the list
> hoping it will use the same data as the other devices.
> We'll need to check with a new snapshot if it works now. If not,
> I have to get the debug stuff in shape for official inclusion
> so we can track what's going on...
>
> ciao,
>  Torsten.
>
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

kintel
Administrator
On Feb 23, 2019, at 14:03, D. A. Karp <[hidden email]> wrote:
>
> Is there anything I can do now to help test it, or should I just wait for the next snapshot?
>
I'll build one today and let you know.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

kintel
Administrator
In reply to this post by daaron
Try the latest snapshot: 2019.02.23

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

daaron
Thanks, Marius. Just tried 2019.02.23 - it now recognizes the Spacemouse (see screenshot) but I get no response whatsoever when I move the mouse. Anything else I can try?


On Feb 23, 2019, at 12:25 PM, Marius Kintel <[hidden email]> wrote:

Try the latest snapshot: 2019.02.23

-Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Inputdriver on MacOS

tp3
On 24.02.19 01:02, D. A. Karp wrote:
> Thanks, Marius. Just tried 2019.02.23 - it now recognizes the Spacemouse
> (see screenshot) but I get no response whatsoever when I move the
> mouse. Anything else I can try?

Aww, that means it's sending data different from the other known
devices.

I'll get the tracing code into shape for actually shipping it, so
far it was only meant for some special testing...
So please hold on for a bit, there should be a version shortly that
(hopefully) dumps the info about the device into a file so we can
see how to support this device.

ciao,
   Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
12