Standard USB protocol for firmware upgrade is DFU. Linux has 2 tools to work with DFU devices:
dfu-util is more advanced and for example allows to list connected DFU-capable devices, e.g. when run on my laptop:
# dfu-util -l
dfu-util 0.5
[...]
Found Runtime: [0a5c:21e6] devnum=0, cfg=1, intf=3, alt=0, name="UNDEFINED"
Both of the tools may be useful though when working with different devices and their peculiarities.
Note though:
- Quite a few vendors don't go out of their way and just use DFU, for which standard implementations and tools are available. But of course, any particular device may use a proprietary upgrade protocol. One particular case is when device uses USB solely for async serial protocol (UART/RS-232) emulation.
- While DFU provides means for both reading and writing firmware, any particular device may block reading as basic means of IP protection.
- As for writing firmware, it may be protected with check codes/signatures, so writing arbitrary firmware may be not possible.
If you want to upgrade and modify firmware, consider buying only open devices (use community resources to discover them), and avoid, ignore, and warn other users of non-open ones.
bNumConfiguration
field in the USB Device descriptor (see USB specs). It indicates the number of configurations available at the current operating speed. I assume this field can also give away the availability of a DFU or SW upgrade mode or not.