Connecting to Spark Core with Chrome app

has anyone tried using the Chrome app usb API to communicate with a Spark Core?

I’m specifically looking for pointers on how to send either a “w” or “i” to the Spark Core and read its response.

I’ve tried using bulk, interrupt and control transfers with no success. my assumption was that I would need to send the character code for “i” or “w” to endpoint 3 using an “out” bulkTransfer and then retrieve the result with either an “in” intrerruptTransfer on endpoint 130 or an “in” bulkTransfer on endpoint 129.

any suggestions would be greatly appreciated.

thanks,
Chris

Never used it, but I think you need to use the Serial API instead of the USB API.

I just built out a basic one with the Serial API. Here’s the GitHub repo. It’s in beta, but working well for me. Any feedback would be appreciated. It’s my first Chrome App. See screenshot below.

1 Like