In trying to use a CPX as a USB HID device on an iPhone or iPad, I’m getting this error:
“CANNOT USE ACCESSORY
CPlay Express (app): This accessory requires too much power.”
I believe there is a USB report descriptor that can be set to a value that makes the phone/tablet happy, as I’ve had Circuit Playground Express running CircuitPython code in the past.
You can see the different reports on a Mac in System Report for a Circuit Playground Express running MakeCode vs. CircuitPython, on the MakeCode board there is a “Current Required (mA):500” line that may be causing the problem.
Running MakeCode:
CPlay Express (app):
Product ID: 0x2402
Vendor ID: 0x03eb (Atmel Corporation)
Version: 42.02
Serial Number: 1318705658
Speed: Up to 12 Mb/sec
Manufacturer: CPlay Express (app)
Location ID: 0x14100000 / 10
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA):0
Running CircuitPython:
CircuitPlayground Express:
Product ID:0x8019
Vendor ID:0x239a
Version:1.00
Serial Number:8E1438657525D4050213E25354D1E0FF
Speed:Up to 12 Mb/sec
Manufacturer:Adafruit Industries LLC
Location ID:0x14100000 / 14
Current Available (mA):500
Extra Operating Current (mA):0
The HID driver was contributed by Adafruit. Do you know who is the maintainer on the CircuitPython side? they might have a better idea of what’s going on.
Yes, though it would be probably better to do it on the pxt side, not codal side. I would think that CPX can consume more than 100mA at peak, but maybe we’ll just ignore this…
@mmoskal What does the timeframe of codal being tagged and bumped in the PXT targets look like? Circuit Playground Express still causes the same error message on iOS so I’m guessing that hasn’t happened yet. Thanks.
@peli@mmoskal did something get rolled back? This no longer works. Using Circuit Playground Express version 1.5.20, MC version 5.32.3, codal-circuit-playground runtime 2.0.1
It is reporting 500mA required on mac usb report and causing iPad to say accessory using too much power.
There may be some cache of USB descriptors that iOS and mac os have, going to look into clearing those.
UPDATE: restarting the mac did clear the cache which now reports current required as 100mA, but iPad still basically rejects it.