How to emulate a HID device (mouse) on rPI Zero

116 views Asked by At

I am trying to get my RaspberryPi Zero to act as a USB mouse on my Macbook (OSX). I followed this guide (pi-zero as universal usb stick) Sorry, but it's a German guide. As I understood it statse that I could use a Raspbian Lite which I flashed on my SD card with Raspbian Pi Manager (https://www.raspberrypi.com/software/). I added

dtoverlay=dwc2

to the /boot/cmdline.txt Then I installed git with

sudo apt-get install git

and finnaly I installed the git-project that provides the script to add the universal USB functionality:

git clone https://github.com/bablokb/raspi2go.git
cd raspi2go
sudo tools/install

I then rebooted with

sudo shutdown -r now

But when I connect my RPI Zero with the data USB port (not the 5V USB port of course) I don't see any change regarding USB on my macbook. I installed lsusb to see my connected USB devices

brew install lsusb

and then ran

lsusb -v

There is no change in the list of USB devices on my macbook. So I figure that somehow something didn't work. If it worked (adding USB storage device + USB serial device) I would have activated the HID functionality of the script and would have tried to follow the answer given here to get the mouse functionality: Emulate Mouse Movement with a HID device using python

Any guidance on what I'm doing wrong? I also tried to debug this, but I have no idea how to do this on my rPI. I can login with ssh via Wifi, but on the console I'm not sure where I should start to see if things are working out.

I tried to see if I can find the endpoints that I can see in the script but I don't find something like functions/acm.USB0. I have limited know-how of Linux, so I'm not sure where exactly I would find these virtual devices that seem to be part of ConfigFS. It would be great if somebody could tell me how I can debug this on the rPI side and on the mac. Thanks in advance!

Juergen

0

There are 0 answers