0

USB HID on iPad (iOS)
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: USB HID on iPad (iOS)

by Lokido on Tue Oct 20, 2020 7:26 pm

It would be great ! Thanks ! Because I’m still stock with my issue on building the firmware...

Lokido
 
Posts: 4
Joined: Tue Oct 20, 2020 6:33 pm

Re: USB HID on iPad (iOS)

by nineseventytwo on Tue Oct 20, 2020 8:25 pm

I'm happy to include the firmware... But you really should work through(slowly) the tutorial from Adafruit. That way when something doesn't work next time you can fix it. My experience with building firmware with the tutorial is a lot of trial and error. Also, if there is something missing in the tutorial, or something helpful that you found and want to share there's always a link to Feedback? Corrections?
Attachments
firmware.uf2
(361.5 KiB) Downloaded 2 times

nineseventytwo
 
Posts: 31
Joined: Tue Aug 02, 2016 4:20 pm

Re: USB HID on iPad (iOS)

by Lokido on Wed Oct 21, 2020 4:08 am

Thank you nineseventytwo,

Setup :
MacOS Catalina
Circuitpyhton5
Python 3.8.5

I have the following error :

Code: Select all | TOGGLE FULL SIZE
GEN build-seeeduino_xiao/genhdr/mpversion.h
CC ../../py/gc.c
../../py/gc.c: In function 'gc_sweep':
../../py/gc.c:298:68: error: 'MP_QSTR___del__' undeclared (first use in this function)
  298 |                         mp_load_method_maybe(MP_OBJ_FROM_PTR(obj), MP_QSTR___del__, dest);
      |                                                                    ^~~~~~~~~~~~~~~
../../py/gc.c:298:68: note: each undeclared identifier is reported only once for each function it appears in
make: *** [build-seeeduino_xiao/py/gc.o] Error 1


For the step :
Code: Select all | TOGGLE FULL SIZE
make BOARD=seeeduino_xiao
Attachments
Capture d’écran 2020-10-21 à 09.56.18.png
Capture d’écran 2020-10-21 à 09.56.18.png (520.33 KiB) Viewed 34 times

Lokido
 
Posts: 4
Joined: Tue Oct 20, 2020 6:33 pm

Re: USB HID on iPad (iOS)

by danhalbert on Wed Oct 21, 2020 11:54 am

If you do
Code: Select all | TOGGLE FULL SIZE
make BOARD=seeeduino_xiao clean
and then
Code: Select all | TOGGLE FULL SIZE
make BOARD=seeeduino_xiao
do you get the same error?

If that doesn't work...

What does
Code: Select all | TOGGLE FULL SIZE
arm-none-eabi-gcc --version

print?

Did you do all the setup on https://learn.adafruit.com/building-circuitpython/macos ?

(I tried this myself and got a similar error to what you're seeing, but after updating everything (had to brew uninstall and reinstall python3), it's working for me. I had to tediously mark all the executables in arm-none-eabi-* as not malware, but once that was done, it worked.)

danhalbert
 
Posts: 2297
Joined: Tue Aug 08, 2017 12:37 pm

Re: USB HID on iPad (iOS)

by Lokido on Wed Oct 28, 2020 8:57 am

It worked ! Thank you.
The first round with Apple's security prompt seems to have messed everything.

So I desactiveted the security verification with
Code: Select all | TOGGLE FULL SIZE
sudo spctl --master-disable

And after that I re-actived it.

(And Yes I did all the setup on https://learn.adafruit.com/building-circuitpython/macos)

On the Adafruit setup, a line could be add for the Apple security warning. It would be helpful

Lokido
 
Posts: 4
Joined: Tue Oct 20, 2020 6:33 pm

Re: USB HID on iPad (iOS)

by mikemikeymike on Wed Feb 17, 2021 12:36 pm

I'm using a QT PY for a macro keyboard attached to an iPad.
Thanks to Lokido, and other posts here, I got it to work.

Here's a little additional help for those on a Mac.
Per the instructions, create a disk image on your Mac using Disk Utility before doing anything else.
In Disk Utility, go to File/New Image, and fill it in something like this:
    Name: buildDisk
    Size: 10gb
    Format: APFS (Case-sensitive) or other Case-sensitive option depending on your Mac
    Encryption: none
    Partitions: Single partition - GUID Partition Map
    Image Format: sparse bundle disk image
The disk should mount after you create it (you'll see it on your desktop). If it doesn't, click on the file name in the finder; mine is named buildDisk.sparsebundle

Now, in terminal, change to the drive with
Code: Select all | TOGGLE FULL SIZE
cd /Volumes/buildDisk

Then follow Adafruit's instructions: https://learn.adafruit.com/building-circuitpython/build-circuitpython

After downloading the files, and before doing the Make commands, modify the mpconfigboard.mk file as explained in the previous posts in this thread. Basically, add the following line to the end of the file: (Note: don't put spaces after the commas.)
Code: Select all | TOGGLE FULL SIZE
 USB_HID_DEVICES=KEYBOARD,MOUSE,CONSUMER

For the QT PY board (without the soldered-on ram chip), the file is at buildDisk/circuitpython/ports/atmel-samd/boards/qtpy_m0/mpconfigboard.mk

When the instructions say to build Circuit Python, use Lokido's help by entering the additional commands to turn off and on the Mac's file security. For example, for my QT PY, I entered:
Code: Select all | TOGGLE FULL SIZE
cd ports/atmel-samd
sudo spctl --master-disable
make BOARD=qtpy_m0
sudo spctl --master-enable

Continue with the rest of Adafruit's instructions to install the newly created .utf file to your board.
For my QT PY, the .utf file is here:
buildDisk/circuitpython/ports/atmel-samd/build-qtpy_m0/firmware.uf2

When you've got it working, you can eject the buildDisk drive like any other drive. You can also delete the buildDisk.sparsebundle file from your computer to save space.

mikemikeymike
 
Posts: 3
Joined: Sun Feb 06, 2011 4:07 pm

Please be positive and constructive with your questions and comments.