53 (0x04D8, 0xEDBE), # maholli SAM32 |
54 (0x04D8, 0xEDBE), # maholli SAM32 |
54 (0x04D8, 0xEE8C), # J&J Studios LLC datum-Distance |
55 (0x04D8, 0xEE8C), # J&J Studios LLC datum-Distance |
55 (0x04D8, 0xEE8D), # J&J Studios LLC datum-IMU |
56 (0x04D8, 0xEE8D), # J&J Studios LLC datum-IMU |
56 (0x04D8, 0xEE8E), # J&J Studios LLC datum-Light |
57 (0x04D8, 0xEE8E), # J&J Studios LLC datum-Light |
57 (0x04D8, 0xEE8F), # J&J Studios LLC datum-Weather |
58 (0x04D8, 0xEE8F), # J&J Studios LLC datum-Weather |
|
59 (0x04D8, 0xEF67), # senseBox MCU |
58 (0x054C, 0x0BC2), # Sony Spresense |
60 (0x054C, 0x0BC2), # Sony Spresense |
59 (0x1209, 0x2017), # Benjamin Shockley Mini SAM M4 |
61 (0x1209, 0x2017), # Benjamin Shockley Mini SAM M4 |
60 (0x1209, 0x3252), # Targett Module Clip w/Wroom |
62 (0x1209, 0x3252), # Targett Module Clip w/Wroom |
61 (0x1209, 0x3253), # Targett Module Clip w/Wrover |
63 (0x1209, 0x3253), # Targett Module Clip w/Wrover |
62 (0x1209, 0x4D43), # Robotics Masters Robo HAT MM1 M4 |
64 (0x1209, 0x4D43), # Robotics Masters Robo HAT MM1 M4 |
63 (0x1209, 0x4DDD), # ODT CP Sapling |
65 (0x1209, 0x4DDD), # ODT CP Sapling |
64 (0x1209, 0x4DDE), # ODT CP Sapling M0 w/ SPI Flash |
66 (0x1209, 0x4DDE), # ODT CP Sapling M0 w/ SPI Flash |
|
67 (0x1209, 0x4DDF), # ODT CP Sapling Rev B |
65 (0x1209, 0x5BF0), # Foosn Fomu |
68 (0x1209, 0x5BF0), # Foosn Fomu |
|
69 (0x1209, 0x7150), # Electronic Cats Hunter Cat NFC |
66 (0x1209, 0x805A), # Electronic Cats BastBLE |
70 (0x1209, 0x805A), # Electronic Cats BastBLE |
67 (0x1209, 0xBAB0), # Electronic Cats Bast WiFi |
71 (0x1209, 0xBAB0), # Electronic Cats Bast WiFi |
68 (0x1209, 0xBAB1), # Electronic Cats Meow Meow |
72 (0x1209, 0xBAB1), # Electronic Cats Meow Meow |
69 (0x1209, 0xBAB2), # Electronic Cats CatWAN USBStick |
73 (0x1209, 0xBAB2), # Electronic Cats CatWAN USBStick |
70 (0x1209, 0xBAB3), # Electronic Cats Bast Pro Mini M0 |
74 (0x1209, 0xBAB3), # Electronic Cats Bast Pro Mini M0 |
71 (0x1209, 0xBAB6), # Electronic Cats Escornabot Makech |
75 (0x1209, 0xBAB6), # Electronic Cats Escornabot Makech |
72 (0x1209, 0xBAB8), # Electronic Cats NFC Copy Cat |
76 (0x1209, 0xBAB8), # Electronic Cats NFC Copy Cat |
73 (0x1209, 0xC051), # Betrusted Simmel |
77 (0x1209, 0xC051), # Betrusted Simmel |
74 (0x1209, 0xE3E3), # StackRduino M0 PRO |
78 (0x1209, 0xE3E3), # StackRduino M0 PRO |
75 (0x1209, 0xF500), # Silicognition LLC M4-Shim |
79 (0x1209, 0xF500), # Silicognition LLC M4-Shim |
|
80 (0x16D0, 0x08C6), # Pimoroni Keybow 2040 |
|
81 (0x16D0, 0x08C7), # Pimoroni Tiny 2040 |
|
82 (0x16D0, 0x08C8), # Pimoroni PicoSystem |
76 (0x1915, 0xB001), # Makerdiary Pitaya Go |
83 (0x1915, 0xB001), # Makerdiary Pitaya Go |
77 (0x1B4F, 0x0015), # SparkFun RedBoard Turbo Board |
84 (0x1B4F, 0x0015), # SparkFun RedBoard Turbo Board |
78 (0x1B4F, 0x0016), # SparkFun SAMD51 Thing+ |
85 (0x1B4F, 0x0016), # SparkFun SAMD51 Thing+ |
79 (0x1B4F, 0x0017), # SparkFun LUMIDrive Board |
86 (0x1B4F, 0x0017), # SparkFun LUMIDrive Board |
|
87 (0x1B4F, 0x0020), # SparkFun MicroMod SAMD51 |
|
88 (0x1B4F, 0x0021), # SparkFun SFE_nRF52840_MicroMod |
|
89 (0x1B4F, 0x0024), # SparkFun MicroMod RP2040 |
|
90 (0x1B4F, 0x0025), # SparkFun Thing Plus RP2040 |
|
91 (0x1B4F, 0x0026), # SparkFun Pro Micro RP2040 |
80 (0x1B4F, 0x5289), # SparkFun SFE_nRF52840_Mini |
92 (0x1B4F, 0x5289), # SparkFun SFE_nRF52840_Mini |
81 (0x1B4F, 0x8D22), # SparkFun SAMD21 Mini Breakout |
93 (0x1B4F, 0x8D22), # SparkFun SAMD21 Mini Breakout |
82 (0x1B4F, 0x8D23), # SparkFun SAMD21 Dev Breakout |
94 (0x1B4F, 0x8D23), # SparkFun SAMD21 Dev Breakout |
83 (0x1B4F, 0x8D24), # SparkFun Qwiic Micro |
95 (0x1B4F, 0x8D24), # SparkFun Qwiic Micro |
84 (0x1D50, 0x60E8), # Radomir Dopieralski PewPew M4 |
96 (0x1D50, 0x60E8), # Radomir Dopieralski PewPew M4 |
92 (0x2886, 0xF001), # Makerdiary nRF52840 M.2 Developer Kit |
104 (0x2886, 0xF001), # Makerdiary nRF52840 M.2 Developer Kit |
93 (0x2886, 0xF002), # Makerdiary M60 Keyboard |
105 (0x2886, 0xF002), # Makerdiary M60 Keyboard |
94 (0x2B04, 0xC00C), # Particle Argon |
106 (0x2B04, 0xC00C), # Particle Argon |
95 (0x2B04, 0xC00D), # Particle Boron |
107 (0x2B04, 0xC00D), # Particle Boron |
96 (0x2B04, 0xC00E), # Particle Xenon |
108 (0x2B04, 0xC00E), # Particle Xenon |
|
109 (0x2E8A, 0x1000), # Cytron Maker Pi RP2040 |
|
110 (0x2E8A, 0x1002), # Pimoroni Pico LiPo (4MB) |
|
111 (0x2E8A, 0x1003), # Pimoroni Pico LiPo (16MB) |
|
112 (0x2E8A, 0x1008), # Pimoroni PGA2040 |
|
113 (0x303A, 0x8002), # UnexpectedMaker TinyS2 |
97 (0x303A, 0x8007), # LILYGO TTGO T8 ESP32-S2 |
114 (0x303A, 0x8007), # LILYGO TTGO T8 ESP32-S2 |
98 (0x3171, 0x0101), # 8086 Consultancy Commander |
115 (0x303A, 0x80AA), # Espressif Franzininho WIFI w/Wroom |
|
116 (0x303A, 0x80AD), # Espressif Franzininho WIFI w/Wrover |
|
117 (0x303A, 0x80AF), # Artisense Reference Design RD00 |
|
118 (0x303A, 0x80B2), # Muselab nanoESP32-S2 w/Wrover |
|
119 (0x3171, 0x0101), # 8086.net Commander |
99 (0x31E2, 0x2001), # BDMICRO LLC VINA-D21 |
120 (0x31E2, 0x2001), # BDMICRO LLC VINA-D21 |
100 (0x31E2, 0x2011), # BDMICRO LLC VINA-D51 |
121 (0x31E2, 0x2011), # BDMICRO LLC VINA-D51 |
|
122 (0x31E2, 0x2021), # BDMICRO LLC VINA-D51 |
101 (0x32BD, 0x3001), # Alorium Tech. AloriumTech Evo M51 |
123 (0x32BD, 0x3001), # Alorium Tech. AloriumTech Evo M51 |
102 (0x4097, 0x0001), # TG-Boards Datalore IP M4 |
124 (0x4097, 0x0001), # TG-Boards Datalore IP M4 |
103 |
125 |
104 (0x239A, None), # Any Adafruit Boards |
126 (0x239A, None), # Any Adafruit Boards |
105 ], |
127 ], |
199 for deviceDict in Preferences.getMicroPython("ManualDevices"): |
221 for deviceDict in Preferences.getMicroPython("ManualDevices"): |
200 manualDevices[(deviceDict["vid"], deviceDict["pid"])] = deviceDict |
222 manualDevices[(deviceDict["vid"], deviceDict["pid"])] = deviceDict |
201 |
223 |
202 availablePorts = QSerialPortInfo.availablePorts() |
224 availablePorts = QSerialPortInfo.availablePorts() |
203 for port in availablePorts: |
225 for port in availablePorts: |
204 supported = False |
226 if port.hasVendorIdentifier() and port.hasProductIdentifier(): |
205 vid = port.vendorIdentifier() |
227 supported = False |
206 pid = port.productIdentifier() |
228 vid = port.vendorIdentifier() |
207 |
229 pid = port.productIdentifier() |
208 if not port.isValid(): |
230 |
209 # no device detected at port |
231 for board in SupportedBoards: |
210 continue |
|
211 |
|
212 for board in SupportedBoards: |
|
213 if ( |
|
214 (vid, pid) in SupportedBoards[board]["ids"] or |
|
215 (vid, None) in SupportedBoards[board]["ids"] |
|
216 ): |
|
217 if ( |
232 if ( |
218 board in ("bbc_microbit", "calliope") and |
233 (vid, pid) in SupportedBoards[board]["ids"] or |
219 (port.description().strip() != |
234 (vid, None) in SupportedBoards[board]["ids"] |
220 SupportedBoards[board]["port_description"]) |
|
221 ): |
235 ): |
222 # both boards have the same VID and PID |
236 if ( |
223 # try to differentiate based on port description |
237 board in ("bbc_microbit", "calliope") and |
224 continue |
238 (port.description().strip() != |
|
239 SupportedBoards[board]["port_description"]) |
|
240 ): |
|
241 # both boards have the same VID and PID |
|
242 # try to differentiate based on port description |
|
243 continue |
|
244 foundDevices.append(( |
|
245 board, |
|
246 port.description(), |
|
247 SupportedBoards[board]["description"], |
|
248 port.portName(), |
|
249 vid, |
|
250 pid, |
|
251 )) |
|
252 supported = True |
|
253 if not supported and (vid, pid) in manualDevices: |
|
254 # check the locally added ones next |
|
255 board = manualDevices[(vid, pid)]["type"] |
225 foundDevices.append(( |
256 foundDevices.append(( |
226 board, |
257 board, |
227 port.description(), |
258 port.description(), |
228 SupportedBoards[board]["description"], |
259 SupportedBoards[board]["description"], |
229 port.portName(), |
260 port.portName(), |
230 vid, |
261 vid, |
231 pid, |
262 pid, |
232 )) |
263 )) |
233 supported = True |
264 supported = True |
234 if not supported and (vid, pid) in manualDevices: |
265 if not supported: |
235 # check the locally added ones next |
266 if vid and pid: |
236 board = manualDevices[(vid, pid)]["type"] |
267 if (vid, pid) not in IgnoredBoards: |
237 foundDevices.append(( |
268 unknownDevices.append((vid, pid, port.description())) |
238 board, |
269 logging.debug("Unknown device: (0x%04x:0x%04x %s)", |
239 port.description(), |
270 vid, pid, port.description()) |
240 SupportedBoards[board]["description"], |
271 else: |
241 port.portName(), |
272 # either VID or PID or both not detected |
242 vid, |
273 desc = port.description() |
243 pid, |
274 if not desc: |
244 )) |
275 desc = QCoreApplication.translate("MicroPythonDevice", |
245 supported = True |
276 "Unknown Device") |
246 if not supported: |
277 unknownPorts.append((vid, pid, desc, port.portName())) |
247 if vid and pid: |
|
248 if (vid, pid) not in IgnoredBoards: |
|
249 unknownDevices.append((vid, pid, port.description())) |
|
250 logging.debug("Unknown device: (0x%04x:0x%04x %s)", |
|
251 vid, pid, port.description()) |
|
252 else: |
|
253 # either VID or PID or both not detected |
|
254 desc = port.description() |
|
255 if not desc: |
|
256 desc = QCoreApplication.translate("MicroPythonDevice", |
|
257 "Unknown Device") |
|
258 unknownPorts.append((vid, pid, desc, port.portName())) |
|
259 |
278 |
260 return foundDevices, unknownDevices, unknownPorts |
279 return foundDevices, unknownDevices, unknownPorts |
261 |
280 |
262 |
281 |
263 def getDeviceIcon(boardName, iconFormat=True): |
282 def getDeviceIcon(boardName, iconFormat=True): |