Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:09 11 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : USB-Panel for shortcuts

Author Message
Arne
Newbie

Joined: 05/01/2025
Location: Germany
Posts: 30
Posted: 03:27pm 06 Jan 2025
Copy link to clipboard 
Print this post

Hi,

I built a panel (basis: bad USB) to enter shortcuts via USB-Hub to Picomite. My keyboard and mouse are working perfect, but when I connect the a.m. panel to the hub it is not detected by the picomite. To test the panel I connected it on a PC/Mac - it was detected and worked as planned.
To check if another programmed bad USB would work on the picomite I tried one programmed for ATtiny85. This was detected an worked.

The difference in the programming of the bad USB’s was:

- The panel was programmed with circuit python on a raspberry pi pico
- The ATtiny85 via Arduino C

Has anyone an idea why the panel will not be detected by the picomite but on PC/Mac?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7858
Posted: 06:45pm 06 Jan 2025
Copy link to clipboard 
Print this post

Hi Arne, and welcome to the 'shed. :)

I'm not certain that the PicoMite will recognise two keyboards. There are four USB "channels":

  Quote  
This will always try and allocate slot 1 to the keyboard and slot 2 to a mouse.
It will always try to allocate slot 3, if free, to the first game controller and slot 4 to the second.

In the event that you are trying to use three of more game controllers or two or more keyboards or mice then this of course will break down and the extra ones will be allocated to the highest available slot.

In any case, your device will have to correctly report itself to be a keyboard.

MM.INFO(USB n)
Returns the device code for any device connected to channel ‘n’ which is a number from 1 to 4.  The returned device code can be:
0=not in use, 1=keyboard, 2=mouse, 128=ps4, 129=ps3, 130=SNES/Generic
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Arne
Newbie

Joined: 05/01/2025
Location: Germany
Posts: 30
Posted: 06:01pm 08 Jan 2025
Copy link to clipboard 
Print this post

Hi Mick,thanks for your welcome and help

I think I found the Problem:

Circuit Python try’s to mount a „combo USB-device“ at startup (e.g. USB-serial, USB-Midi,USB-Storage, USB-Keyboard, USB-Mouse etc.). The single devices can be deactivated/activated during the boot process but not be deleted (at least I don’t know how to delete those not needed USB-devices from the system and activate an USB-Keyboard HID only).Therefore the PicoMite USB-Driver doesn’t see only an  „USB-Keyboard HID„ and doesn’t do anything.

If an ATtiny is plugged in at first it mounts an USB-serial HID for some seconds to allow programming via USB. Will no data be uploaded it dismounts the USB-serial HID. This is a normal behavior of the ATtiny .
Afterwards the ATtiny starts the user app for the USB-Keyboard HID and will be mounted on the PicMite „as Keyboard connected on channel 1“. If I now connect in parallel a real keyboard to the hub it is connected on channel 4 and can be used as usual.

Because of the a.m. facts I cannot use CircuitPython for my project.
Due the ATtiny is very limited in IO‘s I will check to use a Arduino Nano with V-USB.

Arne
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025