Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

[MBS] MacUSBMBS question (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] [ANN] 14.0pr2
Next thread: [MBS] Version 13.3 of plugins


Re: [MBS] PortAudioStreamRecorderMBS issue   -   Garth Hjelte
  [MBS] MacUSBMBS question   -   Dean Davis
   Re: [MBS] MacUSBMBS question   -   Christian Schmitz
   Re: [MBS] MacUSBMBS question   -   Dean Davis
   Re: [MBS] MacUSBMBS question   -   Christian Schmitz
   Re: [MBS] MacUSBMBS question   -   Dean Davis
   Re: [MBS] MacUSBMBS question   -   Dean Davis
   Re: [MBS] MacUSBMBS question   -   Dean Davis
   Re: [MBS] MacUSBMBS question   -   Dean Davis
   Re: [MBS] MacUSBMBS question   -   Christian Schmitz
   Re: [MBS] MacUSBMBS question   -   Dean Davis
   Re: [MBS] MacUSBMBS question   -   Christian Schmitz

[MBS] MacUSBMBS question
Date: 08.01.14 03:59 (Tue, 7 Jan 2014 21:59:47 -0500)
From: Dean Davis
How hard is it to work with USB devices?

I have a USB device and the manufacturer has given me a description of the
protocol.
I can connect to it sung MacHIDMBS but I can't communicate with it because
I don't think this device is expecting to communicate using this method.

When I try to connect to is using MacUSBMBS I get an error &hE00002C5
Google tells me that the device is already open. But this is impossible.
No other program on my Mac could possibly communicate with it.
Plus I've just plugged it in when I try to do a connection even after a
restart.

You you need the device to try and work with it?

Dean Davis
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] MacUSBMBS question
Date: 13.01.14 21:11 (Mon, 13 Jan 2014 21:11:11 +0100)
From: Christian Schmitz

Am 13.01.2014 um 18:27 schrieb Dean Davis <<email address removed>>:

> No worries, I'll use it in a thread so I can do constant ReadMessage
> without pausing the UI.
>
> Are there equivalent WinHIDMBS functions available?

Sure. First byte of a package is report ID.

Sincerely
Christian

Re: [MBS] MacUSBMBS question
Date: 13.01.14 18:27 (Mon, 13 Jan 2014 12:27:47 -0500)
From: Dean Davis
No worries, I'll use it in a thread so I can do constant ReadMessage
without pausing the UI.

Are there equivalent WinHIDMBS functions available?

Dean

On Mon, Jan 13, 2014 at 11:57 AM, Christian Schmitz <
<email address removed>> wrote:

>
> Am 13.01.2014 um 17:55 schrieb Dean Davis <<email address removed>>:
>
> > Initial test look very good.
> > Is it going to be possible at some point to get the data back async in
> the
> > DataAvailable event?
>
> The event provides what comes in on interrupt.
>
> The ReadMessage methods can query other things or the same. You can try.
>
> Sincerely
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] MacUSBMBS question
Date: 13.01.14 17:57 (Mon, 13 Jan 2014 17:57:42 +0100)
From: Christian Schmitz

Am 13.01.2014 um 17:55 schrieb Dean Davis <<email address removed>>:

> Initial test look very good.
> Is it going to be possible at some point to get the data back async in the
> DataAvailable event?

The event provides what comes in on interrupt.

The ReadMessage methods can query other things or the same. You can try.

Sincerely
Christian

Re: [MBS] MacUSBMBS question
Date: 13.01.14 17:55 (Mon, 13 Jan 2014 11:55:05 -0500)
From: Dean Davis
Initial test look very good.
Is it going to be possible at some point to get the data back async in the
DataAvailable event?

Dean

On Mon, Jan 13, 2014 at 11:30 AM, Dean Davis <<email address removed>> wrote:

> Disregard, I see it's updated on the web site.
>
> On Mon, Jan 13, 2014 at 11:29 AM, Dean Davis <<email address removed>> wrote:
>
>> I see some added functionality in MacHIDMBS in the new PR, I'm ready to
>> test. Is there some new documentation?
>>
>> Dean
>>
>> On Wed, Jan 8, 2014 at 8:59 PM, Dean Davis <<email address removed>> wrote:
>>
>>> Ok here is some more information about the device I got from the
>>> manufacturer...
>>>
>>> ----------------
>>>
>>> The USB firmware is a human interface device class interface. In the
>>> initialization phase of the USB startup it tells the PC it is a HID class
>>> device and that it has 2 endpoint reports. The endpoint zero report
>>> contains a single sensor report and its measured RSSI value. The second
>>> report contains a single measurement and some coefficients needed to scale
>>> the measurement properly.
>>>
>>> Report 0
>>>
>>> The report zero is 9 bytes long
>>>
>>> Report 1
>>>
>>> Report 1 is 24 bytes in length
>>>
>>> ------------------
>>>
>>> It makes no mention that I have to SEND this device any data in order to
>>> receive the data.
>>>
>>> When I dump some properties of the device I get this...
>>>
>>> Opening HID class device...
>>>
>>> Max Lengths:
>>> Input: 33
>>> Output: 2
>>> Feature: 1
>>>
>>> So maybe the data I need is just an output report 0 and 1 but since
>>> it doesn't require me to send any data to receive I don't know how to use
>>> "SendMessage" in a way that I would expect output.
>>>
>>> Dean
>>>
>>>
>>> On Wed, Jan 8, 2014 at 6:08 PM, Christian Schmitz <
>>> <email address removed>> wrote:
>>>
>>>>
>>>> Am 08.01.2014 um 17:08 schrieb Dean Davis <<email address removed>>:
>>>>
>>>> > In my case it may be specifically a "Feature Report"
>>>> > See this...
>>>> > How hard would it be to add these functions to MacHIDMBS?
>>>>
>>>> Well, we use other APIs from Apple.
>>>> Now I could add function to send Feature Report instead of Output
>>>> Report which SendMessage does now.
>>>>
>>>> I could add that in the next days.
>>>>
>>>> Sincerely
>>>> Christian
>>>>
>>>> --
>>>> Read our blog about news on our plugins:
>>>>
>>>> http://www.mbsplugins.de/
>>>>
>>>> _______________________________________________
>>>> Mbsplugins_monkeybreadsoftware.info mailing list
>>>> <email address removed>
>>>>
>>>> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>>>>
>>>
>>>
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] MacUSBMBS question
Date: 13.01.14 17:30 (Mon, 13 Jan 2014 11:30:44 -0500)
From: Dean Davis
Disregard, I see it's updated on the web site.

On Mon, Jan 13, 2014 at 11:29 AM, Dean Davis <<email address removed>> wrote:

> I see some added functionality in MacHIDMBS in the new PR, I'm ready to
> test. Is there some new documentation?
>
> Dean
>
> On Wed, Jan 8, 2014 at 8:59 PM, Dean Davis <<email address removed>> wrote:
>
>> Ok here is some more information about the device I got from the
>> manufacturer...
>>
>> ----------------
>>
>> The USB firmware is a human interface device class interface. In the
>> initialization phase of the USB startup it tells the PC it is a HID class
>> device and that it has 2 endpoint reports. The endpoint zero report
>> contains a single sensor report and its measured RSSI value. The second
>> report contains a single measurement and some coefficients needed to scale
>> the measurement properly.
>>
>> Report 0
>>
>> The report zero is 9 bytes long
>>
>> Report 1
>>
>> Report 1 is 24 bytes in length
>>
>> ------------------
>>
>> It makes no mention that I have to SEND this device any data in order to
>> receive the data.
>>
>> When I dump some properties of the device I get this...
>>
>> Opening HID class device...
>>
>> Max Lengths:
>> Input: 33
>> Output: 2
>> Feature: 1
>>
>> So maybe the data I need is just an output report 0 and 1 but since
>> it doesn't require me to send any data to receive I don't know how to use
>> "SendMessage" in a way that I would expect output.
>>
>> Dean
>>
>> On Wed, Jan 8, 2014 at 6:08 PM, Christian Schmitz <
>> <email address removed>> wrote:
>>
>>>
>>> Am 08.01.2014 um 17:08 schrieb Dean Davis <<email address removed>>:
>>>
>>> > In my case it may be specifically a "Feature Report"
>>> > See this...
>>> > How hard would it be to add these functions to MacHIDMBS?
>>>
>>> Well, we use other APIs from Apple.
>>> Now I could add function to send Feature Report instead of Output Report
>>> which SendMessage does now.
>>>
>>> I could add that in the next days.
>>>
>>> Sincerely
>>> Christian
>>>
>>> --
>>> Read our blog about news on our plugins:
>>>
>>> http://www.mbsplugins.de/
>>>
>>> _______________________________________________
>>> Mbsplugins_monkeybreadsoftware.info mailing list
>>> <email address removed>
>>>
>>> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>>>
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] MacUSBMBS question
Date: 13.01.14 17:29 (Mon, 13 Jan 2014 11:29:38 -0500)
From: Dean Davis
I see some added functionality in MacHIDMBS in the new PR, I'm ready to
test. Is there some new documentation?

Dean

On Wed, Jan 8, 2014 at 8:59 PM, Dean Davis <<email address removed>> wrote:

> Ok here is some more information about the device I got from the
> manufacturer...
>
> ----------------
>
> The USB firmware is a human interface device class interface. In the
> initialization phase of the USB startup it tells the PC it is a HID class
> device and that it has 2 endpoint reports. The endpoint zero report
> contains a single sensor report and its measured RSSI value. The second
> report contains a single measurement and some coefficients needed to scale
> the measurement properly.
>
> Report 0
>
> The report zero is 9 bytes long
>
> Report 1
>
> Report 1 is 24 bytes in length
>
> ------------------
>
> It makes no mention that I have to SEND this device any data in order to
> receive the data.
>
> When I dump some properties of the device I get this...
>
> Opening HID class device...
>
> Max Lengths:
> Input: 33
> Output: 2
> Feature: 1
>
> So maybe the data I need is just an output report 0 and 1 but since
> it doesn't require me to send any data to receive I don't know how to use
> "SendMessage" in a way that I would expect output.
>
> Dean
>
> On Wed, Jan 8, 2014 at 6:08 PM, Christian Schmitz <
> <email address removed>> wrote:
>
>>
>> Am 08.01.2014 um 17:08 schrieb Dean Davis <<email address removed>>:
>>
>> > In my case it may be specifically a "Feature Report"
>> > See this...
>> > How hard would it be to add these functions to MacHIDMBS?
>>
>> Well, we use other APIs from Apple.
>> Now I could add function to send Feature Report instead of Output Report
>> which SendMessage does now.
>>
>> I could add that in the next days.
>>
>> Sincerely
>> Christian
>>
>> --
>> Read our blog about news on our plugins:
>>
>> http://www.mbsplugins.de/
>>
>> _______________________________________________
>> Mbsplugins_monkeybreadsoftware.info mailing list
>> <email address removed>
>>
>> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>>
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] MacUSBMBS question
Date: 09.01.14 02:59 (Wed, 8 Jan 2014 20:59:08 -0500)
From: Dean Davis
Ok here is some more information about the device I got from the
manufacturer...

----------------

The USB firmware is a human interface device class interface. In the
initialization phase of the USB startup it tells the PC it is a HID class
device and that it has 2 endpoint reports. The endpoint zero report
contains a single sensor report and its measured RSSI value. The second
report contains a single measurement and some coefficients needed to scale
the measurement properly.

Report 0

The report zero is 9 bytes long

Report 1

Report 1 is 24 bytes in length

------------------

It makes no mention that I have to SEND this device any data in order to
receive the data.

When I dump some properties of the device I get this...

Opening HID class device...

Max Lengths:
Input: 33
Output: 2
Feature: 1

So maybe the data I need is just an output report 0 and 1 but since
it doesn't require me to send any data to receive I don't know how to use
"SendMessage" in a way that I would expect output.

Dean

On Wed, Jan 8, 2014 at 6:08 PM, Christian Schmitz <
<email address removed>> wrote:

>
> Am 08.01.2014 um 17:08 schrieb Dean Davis <<email address removed>>:
>
> > In my case it may be specifically a "Feature Report"
> > See this...
> > How hard would it be to add these functions to MacHIDMBS?
>
> Well, we use other APIs from Apple.
> Now I could add function to send Feature Report instead of Output Report
> which SendMessage does now.
>
> I could add that in the next days.
>
> Sincerely
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] MacUSBMBS question
Date: 09.01.14 00:08 (Thu, 9 Jan 2014 00:08:47 +0100)
From: Christian Schmitz

Am 08.01.2014 um 17:08 schrieb Dean Davis <<email address removed>>:

> In my case it may be specifically a "Feature Report"
> See this...
> How hard would it be to add these functions to MacHIDMBS?

Well, we use other APIs from Apple.
Now I could add function to send Feature Report instead of Output Report which SendMessage does now.

I could add that in the next days.

Sincerely
Christian

Re: [MBS] MacUSBMBS question
Date: 08.01.14 17:08 (Wed, 8 Jan 2014 11:08:45 -0500)
From: Dean Davis
OK, doing some more research this may be a HID device so I could use
MacHIDMBS.
I can currently connect to the device using MacHIDMBS but I can't seems to
get any data from it.
I think I need the ability to get a report from the device.
In my case it may be specifically a "Feature Report"
See this...
https://developer.apple.com/library/mac/documentation/devicedrivers/conceptual/HID/new_api_10_5/tn2187.html#//apple_ref/doc/uid/TP40000970-CH214-SW81
Look at the section headed "Getting and Setting HID Reports"
Looks like I may need the funcitons...
IOHIDDeviceGetReport, IOHIDDeviceGetReportWithCallback, IOHIDDeviceSetReport,
and IOHIDDeviceSetReportWithCallback

A good test may be the versions without Callbacks.

How hard would it be to add these functions to MacHIDMBS?

Dean Davis




On Wed, Jan 8, 2014 at 3:33 AM, Christian Schmitz <
<email address removed>> wrote:

>
> Am 08.01.2014 um 03:59 schrieb Dean Davis <<email address removed>>:
>
> > How hard is it to work with USB devices?
>
> Very hard.
>
> > When I try to connect to is using MacUSBMBS I get an error &hE00002C5
> > Google tells me that the device is already open. But this is impossible.
>
> I bet one of the system extensions was loaded to handle the device.
>
> > You you need the device to try and work with it?
>
> A lot of clients choose to provide me a device for testing if they have
> problems.
> This way I got a lot of little gadgets in my office :-)
>
> Sincerely
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] MacUSBMBS question
Date: 08.01.14 09:33 (Wed, 8 Jan 2014 09:33:25 +0100)
From: Christian Schmitz

Am 08.01.2014 um 03:59 schrieb Dean Davis <<email address removed>>:

> How hard is it to work with USB devices?

Very hard.

> When I try to connect to is using MacUSBMBS I get an error &hE00002C5
> Google tells me that the device is already open. But this is impossible.

I bet one of the system extensions was loaded to handle the device.

> You you need the device to try and work with it?

A lot of clients choose to provide me a device for testing if they have problems.
This way I got a lot of little gadgets in my office :-)

Sincerely
Christian