Package: pykitinfo
pykitinfopykitinfo provides information about connected Microchip development kits and toolsOverviewpykitinfo will scan the USB subsystem for connected Microchip development kits, and provide information such as kit name, mounted device, serial port identifier, and extension information.pykitinfo is available:install using pip from pypi:https://pypi.org/project/pykitinfobrowse source code on github:https://github.com/microchip-pic-avr-tools/pykitinforead API documentation on github:https://microchip-pic-avr-tools.github.io/pykitinfopykitinfo currently supports:all PKOB nano (nEDBG), mEDBG and EDBG kitsAtmel-ICE, Power Debugger, JTAGICE3PICkit3, PKOBPICkit4, Snap, PKOB4, PICkit5Usagepykitinfo can be used as a library or as a CLIExample - simple list of connected kitspykitinfoDisplays a simple list of kits in the form:
Kit SERIAL-NUMBER: 'KIT-NAME' (DEVICE-NAME) on SERIAL-PORTFor example:pykitinfo
LookingforMicrochipkits...
Compatiblekitsdetected:6KitMCHP3349011800000000:'AVR-IoT WA'(ATmega4808)onCOM21
KitMCHP3280021800000000:'AVR128DA48 Curiosity Nano'(AVR128DA48)onCOM17
KitATML2241020200000000:'SAM L21 Xplained Pro'(ATSAML21J18A)onCOM34
KitJ41800000000:'Atmel-ICE CMSIS-DAP'()onN/A
KitJ50200000000:'Power Debugger CMSIS-DAP'()onN/A
KitATML2323040200000000:'mEDBG'(ATmega328P)onCOM26Example - simple list of connected kits with specific serial numberpykitinfo-s<serialnumberending>Displays a simple list of kits in the form:
Kit SERIAL-NUMBER: 'KIT-NAME' (DEVICE-NAME) on SERIAL-PORTFor example:pykitinfo-s29LookingforMicrochipkits...
Compatiblekitsdetected:1KitMCHP3352011800000029:'PIC-IoT WA'(PIC24FJ128GA705)onCOM22Example - brief lookup of serial port of connected kitpykitinfo-bDisplays ONLY the serial port name of a connected kit.  This can be useful for command chaining.For example:pykitinfo-b-s123456COM12Example - long form list of kitspykitinfo-lDisplays a JSON formatted list of dictionaries.For example:pykitinfo-l
LookingforMicrochipkits...
Compatiblekitsdetected:2[{"debugger":{"device":"ATmega4808","kitname":"AVR-IoT WA","product":"nEDBG CMSIS-DAP","protocol":"edbg","serial_number":"MCHP3349011800000000","serial_port":"COM21"},"usb":{"interface":"hid","packet_size":64,"product_id":8565,"product_string":"nEDBG CMSIS-DAP","serial_number":"MCHP3349011800000000","vendor_id":1003}},{"debugger":{"device":"AVR128DA48","kitname":"AVR128DA48 Curiosity Nano","product":"nEDBG CMSIS-DAP","protocol":"edbg","serial_number":"MCHP3280021800000000","serial_port":"COM17"},"usb":{"interface":"hid","packet_size":64,"product_id":8565,"product_string":"nEDBG CMSIS-DAP","serial_number":"MCHP3280021800000000","vendor_id":1003}}]Example - library usage# Example: using pykitinfo as a libraryimportlogginglogging.basicConfig(format="%(levelname)s:%(message)s",level=logging.ERROR)frompykitinfoimportpykitinfokits=pykitinfo.detect_all_kits()forkitinkits:print("Found kit: '{}'".format(kit['debugger']['kitname']))Notes for Linux® systemsThis package uses pyedbglib and other libraries for USB transport and some udev rules are required. For details see the pyedbglib package:https://pypi.org/project/pyedbglibChangelog[1.0.3] - January 2024AddedDSG-5792 added brief mode for reporting serial port onlyDSG-6091 added support for reading out nEDBG extension informationDSG-6444 added support for PICkit 5FixedDSG-5767 fixed unicode output in long modeDSG-6310 added fault tolerance for non-numeric interface numbersDSG-7084 fixed crash on Mac when virtual serial port is missing serial numberDSG-7087 added fault tolerance for USB devices missing serial number[0.4.0] - November 2022ChangedDSG-5562 added catch-all exception handling in CLI; added return codeDSG-5624 improved port detection using updated pyedbglib (requirement)DSG-5551 removed metadata tag for Python 3.6DSG-5450 added metadata tag for Python 3.10[0.3.1] - December 2021AddedDSG-3826 PICkit3 supportDSG-3903 WinUSB tools supportDSG-4140 Help updatesDSG-4195 Documentation outputFixedDSG-3407 Serial port detection on Xplained ProDSG-3409 CLI argument -RDSG-3410 Xplained Pro kit name reporting[0.1.2] - May 2021First public release to PyPi