HIDAPIDeviceMBS.Open not working on Ubuntu

XOJO 2013 R3.3
MBS 16.1
UBUNTU 11.04 (libudev installed)

I cannot get HIDAPIDeviceMBS.Open to open a USB device on Ubuntu 11.04.

[code]Function DeviceOpen() As Boolean

dim m_device As HIDAPIDeviceMBS

// init
if HIDAPIDeviceMBS.Init <> 0 then
Return FALSE //failed to initialize
end if

// Open the device using the VID, PID,
// and optionally the Serial number.
m_device = HIDAPIDeviceMBS.Open(VENDOR_ID, PRODUCT_ID, “”)

if not IsOpen() then
Return FALSE //failed to open
end

Return TRUE

End Function[/code]

The device does enumerate. m_device is NIL after call to Open. It works perfectly on Mac. VENDOR_ID and PRODUCT_ID are both correct.

Could someone please try to open a device and confirm it does not work on Linux??

Thanks

Aha! I had to create a udev rule to set the correct permissions and then place it in /etc/udev/rules.d.

Once I did that, it worked!

Thanks for helping yourself :slight_smile:

Hi David,

I am facing exactly the same issue you reported with my Raspberry Pi 3b and Raspbian Scratch. I am trying to use an 8 Channel USB Relay with the Raspberry Pi and a Xojo App. With HIDAPIDeviceInfoMBS is it possible to read VID, PIC, SerialNo, etc. from the device. However HIDAPIDeviceMBS.Open(VENDOR_ID, PRODUCT_ID, “”) constantly returns NIL. What exactly did you do by creating the udder rule? Or is there any other way around?

Thanks a lot,

Julian