USB reports as Arduboy

Hey I noticed when I load the Ardutosh app from @jhhoward the Arduboy reports to windows that it is an Arduboy.

image

Windows still recognizes it as a Leonardo, but the little popup in the corner says Arduboy. That is quite nice.

How is this done? Can we change it in the bootloader too? This would really be a very nice feature that I have a chance to update right now.

ping other smart people like @pharap @mr.blinky and @MLXXXp as well

My Arduboy doesn’t report ‘Arduboy’ in the COM port properties,
so I’m presuming either it’s Windows 10 related or it’s related to the bootloader used by the FX boards.
In absence of any other evidence, I think the latter is more likely.
If you’ve got an Arduboy that hasn’t had its bootloader updated yet, give it a try and see if you get a different result.

I can however confirm that when using <Keyboard.h> and the Arduboy is registered as a Keyboard device the install message will say ‘Arduboy’ for whatever reason.

I don’t remember doing anything specifically in Ardutosh to achieve this. Maybe as @Pharap says it is something happens when in HID mode?

1 Like

Oh in Ardutosh it is initializing the HID mode? That’s probably it.

It can act as a keyboard + mouse in the remote app. It only calls the begin() to the keyboard and mouse libraries if the app is open though.

I think it’s in the class constructor knowing @MLXXXp

There’s nothing in the Arduboy or Arduboy2 libraries that would affect this. My guess it that it will happen when a sketch is compiled with board type Arduboy selected instead of Leonardo. The boards.txt file contains the parameter:
arduboy.build.usb_product="Arduboy"

This is one good reason to install the Arduboy board support package and select board type Arduboy when compiling sketches for the Arduboy. The instructions for installing this are included in Step 2 of the Quick Start Guide.

1 Like

Found it in the bootloader, for sure we can change this, haha late state change @Mr.Blinky ?

;-------------------------------------------------------------------------------
;USB strings

#if DEVICE_PID == 0x0036
#define PRODUCT_STRING          'A','r','d','u','i','n','o',' ','L','e','o','n','a','r','d','o'
#elif DEVICE_PID == 0x0037
#define PRODUCT_STRING          'A','r','d','u','i','n','o',' ','M','i','c','r','o',' ',' ',' '
#elif DEVICE_PID == 0x003C
#define PRODUCT_STRING          'A','r','d','u','i','n','o',' ','E','s','p','l','o','r','a',' '
#elif DEVICE_PID == 0x9205
#define PRODUCT_STRING          'P','r','o',' ','M','i','c','r','o',' ','5','V',' ',' ',' ',' '
#else
#define PRODUCT_STRING          'U','S','B',' ','I','O',' ','b','o','a','r','d',' ',' ',' ',' '
#endif

#if DEVICE_VID == 0x2341
#define MANUFACTURER_STRING     'A','r','d','u','i','n','o',' ','L','L','C'
#elif DEVICE_VID == 0x1B4F
#define MANUFACTURER_STRING     'S','p','a','r','k','F','u','n',' ',' ',' '
#else
#define MANUFACTURER_STRING     'U','n','k','n','o','w','n',' ',' ',' ',' '
#endif
;-------------------------------------------------------------------------------
                            .section .data  ;Initalized data copied to ram
;-------------------------------------------------------------------------------

1 Like

Then my first guess was right:


I have the board package installed and it doesn’t show up as ‘Arduboy’ in the COM properties in my case so it’s unlikely to be related to that.

It’s possible that may somehow affect the message presented when the keyboard driver installs though.

That depends if the arduino.inf ‘driver’ was installed or not. Without the arduino.inf file installed Windows 10 will report it as USB Serial device.

Yes we could. However to save some 150-200 bytes I removed the (optional) Manufacturer and device strings from the bootloader.

When uploading a sketch with the Homemade package installed and board Arduboy selected the device string will read ‘Arduboy’

The device name is only showed when no arduino.inf file is installed yet on Windows (Early versions of Windows 10 and older Windows versions) or when viewing the USB device properties.

Once the arduino.inf is installed it will show up as Arduino Leonardo and Arduino Leonardo bootloader when in bootloader mode.

On recent Windows 10 versions without the arduino.inf installed it will show up as USB serial device

Fun fact: you could edit the arduino.inf file and change lines

leonardo.bootloader.name="Arduino Leonardo bootloader"
leonardo.sketch.name="Arduino Leonardo"

into

leonardo.bootloader.name="Arduboy bootloader"
leonardo.sketch.name="Arduboy "

However as soon as you make any changes it’s no longer a signed driver and Windows 10 doesn’t install unsigned drivers (unless you disable secure boot and disable integritychecks / enable testsigning) Pre windows 10 you could install unsigned drivers more easily.

How about a unique USB VID and PID for Arduboy Inc and Arduboy? :wink:

Looks like it’s not worth the bother since it looks like there are many circumstances windows will just report what it wants anyways so, just curious.

Thought about it, but then you have to license from Arduino in order to get support back in and it’s outrageous.

I think with our own toolchain or forcing people to use a plugin or whatever, but that’s not something I wanted to do in the beginning because I didn’t understand it well.

Getting the ID itself is also expensive.

It’s something I’d do if I was looking at producing 100k or more.