Recent Posts

Pages: [1] 2 3 ... 10
1
USB / Re: USB data packets into Excel
« Last post by Jan Axelson on June 25, 2019, 11:10:44 pm »
You can use any of these to read Input report data:

ReadFile
Filestream.Read
HidD_GetInputReport

My example code should help.
2
USB / Re: USB data packets into Excel
« Last post by gr8guitar on June 25, 2019, 11:35:43 am »
Hello. Thank you for the reply. It looks like I got my work cut out for me. Finally, which Declared Function has the data packets? And how did you know what parameters to use from that Declared Function?
3
USB / Re: USB data packets into Excel
« Last post by Jan Axelson on June 24, 2019, 10:57:33 pm »
Community version, yes.

I am not proficient with VBA.

https://stackoverflow.com/questions/11502788/is-excel-vba-the-same-as-vb-net
4
USB / Re: USB data packets into Excel
« Last post by gr8guitar on June 24, 2019, 01:19:57 pm »
Hello. Thank you for the information. Do you know if the Community version is sufficient for this project? Also, how does:

ReadFile
Filestream.Read
HidD_GetInputReport

translate into VBA? Or what declared function is supplying the information?
6
USB / Re: USB data packets into Excel
« Last post by gr8guitar on June 24, 2019, 11:48:53 am »
Hello. Thank you for your reply. I hope you are referring to generichid_vb_46 or generic_vb_50. I did look at hid.vb but I don't see how this transfers to VBA format. For example, I don't recognize Fieldstream.Read format. I admit I'm a VBA newbie. I know nothing of VB or .net VB. It may be time to learn. Where may one obtain a interpreter/compiler for those?
7
USB / Re: Maximum current in unconfigured state
« Last post by bpaddock on June 24, 2019, 08:49:23 am »
Hi!
I am designing a USB charger which has basic charger detection(primary detection), but there is no communication implemented(so it cannot enumerate).
...

Don't know if it helps for sure without knowing more about your set up.
Take a look at the bq24392 USB charge impedance sensor  to
control how much current USB draws when plugged in to a charger vs PC,
to be compliant with USB BC 1.2 standard.

Maxim makes a similar part.

A compliant WalWart power source will have its data lines shorted to indicate it is a charger source and not a PC.
Sadly many don't, they are just open lines.

8
USB / Re: USB data packets into Excel
« Last post by Jan Axelson on June 23, 2019, 10:16:56 pm »
You can read HID Input reports using

ReadFile
Filestream.Read
HidD_GetInputReport

See my example code.
9
USB / Re: USB data packets into Excel
« Last post by gr8guitar on June 23, 2019, 07:02:54 pm »
Hello. I think I'm getting there. When I typed in the known VendorID and ProductID, I get a response at:
   MyHandle = hidGetHandle(&H16C0, &H486)
To verify, I typed in the VendorID and ProductID of a different USBHID, I get different results:
MyHandle = hidGetHandle(&H1DD2, &H1150)

For example, the first one doesn't give me a serial number but the second one does (B76052). So now I know I'm connecting.  I was able to verify this with Device Manager. So I guess the remaining question is, which of the declared functions actually gives the data packets?
10
USB / Re: USB data packets into Excel
« Last post by gr8guitar on June 22, 2019, 08:28:59 pm »
Hello. Thank you. Are we allowed to post part of the VBA code at this website? I have taken part of what I think I understand but still need help. I think my main issue is I don't understand fully the passing of values/variables... Again, the goal is to retrieve the USB data packets and put it into a cell on a continuous (or loop) basis. Using either an analyzer or the GenericHID.exe, I see the data when a button is pressed or a dial is rotated. Also, the analyzer and GenericHID, don't really respond unless I type in the VendorID (16c0) and the ProductID (486) or the corresponding decimal numbers. The VBA code so far seems to search for any USB HID and then give basic information, like above but not actual data packet that I can use...
Pages: [1] 2 3 ... 10