forked from NabuCasa/silabs-firmware-builder
-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from darkxst/gh-v24
Add SLZB-07Mg24 to webflasher
- Loading branch information
Showing
30 changed files
with
2,166 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,10 @@ | |
|
||
1. Head over to https://realfavicongenerator.net/ to add your own favicons. | ||
2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet. | ||
<!-- src="https://unpkg.com/@nabucasa/[email protected]/dist/web/nabucasa-zigbee-flasher.js?module" --> | ||
{% endcomment %} | ||
<script | ||
<script> | ||
type="module" | ||
src="https://unpkg.com/@nabucasa/[email protected]/dist/web/nabucasa-zigbee-flasher.js?module"> | ||
|
||
src="/silabs-firmware-builder/dist/web/nabucasa-zigbee-flasher.js" | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"product_name": "SMLIGHT SLZB-07Mg24", | ||
"baudrates": { | ||
"bootloader": [115200], | ||
"ezsp": [115200, 230400], | ||
"spinel": [460800], | ||
"router": [115200] | ||
}, | ||
"usb_filters": [ | ||
{ | ||
"pid": 60000, | ||
"vid": 4292 | ||
} | ||
], | ||
"firmwares": [ | ||
{ | ||
"name": "Zigbee (EZSP)", | ||
"url": "https://raw.githubusercontent.com/darkxst/silabs-firmware-builder/main/firmware_builds/slzb-07mg24/ncp-uart-hw-v7.4.4.0-slzb-07mg24-115200.gbl", | ||
"type": "ncp-uart-hw", | ||
"version": "7.4.4.0" | ||
}, | ||
{ | ||
"name": "Zigbee (EZSP SiSDK)", | ||
"url": "https://github.com/darkxst/silabs-firmware-builder/releases/download/20241106/slzb07Mg24_zigbee_ncp_8.0.2.0_115200.gbl", | ||
"type": "ncp-uart-hw", | ||
"version": "8.0.2.0" | ||
}, | ||
{ | ||
"name": "OpenThread", | ||
"url": "https://raw.githubusercontent.com/darkxst/silabs-firmware-builder/main/firmware_builds/slzb-07mg24/ot-rcp-v2.4.4.0-slzb-07mg24-460800.gbl", | ||
"type": "ot-rcp", | ||
"version": "2.4.4.0" | ||
}, | ||
{ | ||
"name": "OpenThread (SiSDK)", | ||
"url": "https://github.com/darkxst/silabs-firmware-builder/releases/download/20241106/slzb07Mg24_opentread_rcp_2.5.2.0_GitHub-1fceb225b_gsdk_2024.6.2_460800.gbl", | ||
"type": "ot-rcp", | ||
"version": "2.5.2.0" | ||
} | ||
], | ||
"allow_custom_firmware_upload": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
export declare const mdiFirmware = "M9.5,8.5L11,10L8,13L11,16L9.5,17.5L5,13L9.5,8.5M14.5,17.5L13,16L16,13L13,10L14.5,8.5L19,13L14.5,17.5M21,2H3A2,2 0 0,0 1,4V20A2,2 0 0,0 3,22H21A2,2 0 0,0 23,20V4A2,2 0 0,0 21,2M21,20H3V6H21V20Z"; | ||
export declare const mdiThread = "M12 0C5.383 0 0 5.384 0 12.002 0 18.574 5.31 23.928 11.865 24V12.012H7.938A2.12 2.12 0 0 0 5.82 14.13a2.12 2.12 0 0 0 2.116 2.117v2.616a4.738 4.738 0 0 1-4.731-4.733 4.738 4.738 0 0 1 4.731-4.734h3.928V8.074a3.943 3.943 0 0 1 3.938-3.94 3.944 3.944 0 0 1 3.94 3.94 3.944 3.944 0 0 1-3.94 3.939H14.48v11.731C19.911 22.598 24 17.77 24 12.002 24 5.384 18.617 0 12 0Zm5.127 8.073a1.325 1.325 0 0 0-1.324-1.324 1.325 1.325 0 0 0-1.323 1.324v1.323h1.323a1.325 1.325 0 0 0 1.324-1.323z"; | ||
export declare enum ApplicationType { | ||
GECKO_BOOTLOADER = "bootloader", | ||
CPC = "cpc", | ||
EZSP = "ezsp", | ||
SPINEL = "spinel", | ||
ROUTER = "router" | ||
} | ||
export declare const ApplicationNames: { | ||
bootloader: string; | ||
cpc: string; | ||
ezsp: string; | ||
spinel: string; | ||
router: string; | ||
}; | ||
export declare enum FirmwareType { | ||
ZIGBEE_NCP = "zigbee_ncp", | ||
ZIGBEE_ROUTER = "zigbee_router", | ||
OPENTHREAD_RCP = "openthread_rcp", | ||
BOOTLOADER = "bootloader", | ||
MULTIPAN = "multipan", | ||
UNKNOWN = "unknown" | ||
} | ||
export declare const LegacyTypeToFirmwareType: { | ||
'ncp-uart-hw': FirmwareType; | ||
'ncp-uart-sw': FirmwareType; | ||
'rcp-uart-802154': FirmwareType; | ||
'ot-rcp': FirmwareType; | ||
'gecko-bootloader': FirmwareType; | ||
}; | ||
export declare const FirmwareIcons: { | ||
zigbee_ncp: string; | ||
zigbee_router: string; | ||
multipan: string; | ||
openthread_rcp: string; | ||
bootloader: string; | ||
unknown: string; | ||
}; | ||
export declare const FirmwareNames: { | ||
zigbee_ncp: string; | ||
zigbee_router: string; | ||
multipan: string; | ||
openthread_rcp: string; | ||
bootloader: string; | ||
unknown: string; | ||
}; | ||
export declare const ApplicationTypeToFirmwareType: { | ||
cpc: FirmwareType; | ||
ezsp: FirmwareType; | ||
router: FirmwareType; | ||
spinel: FirmwareType; | ||
bootloader: FirmwareType; | ||
}; | ||
export interface USBFilter { | ||
pid: number; | ||
vid: number; | ||
} | ||
export interface Firmware { | ||
name: string; | ||
url: string; | ||
type: FirmwareType; | ||
version: string; | ||
} | ||
export interface ManifestBaudrates { | ||
bootloader: number[]; | ||
cpc: number[]; | ||
ezsp: number[]; | ||
spinel: number[]; | ||
router: number[]; | ||
} | ||
export interface Manifest { | ||
product_name: string; | ||
baudrates: ManifestBaudrates; | ||
usb_filters: USBFilter[]; | ||
firmwares: Firmware[]; | ||
allow_custom_firmware_upload: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { mdiMulticast, mdiZigbee, mdiRouter } from '@mdi/js'; | ||
export const mdiFirmware = 'M9.5,8.5L11,10L8,13L11,16L9.5,17.5L5,13L9.5,8.5M14.5,17.5L13,16L16,13L13,10L14.5,8.5L19,13L14.5,17.5M21,2H3A2,2 0 0,0 1,4V20A2,2 0 0,0 3,22H21A2,2 0 0,0 23,20V4A2,2 0 0,0 21,2M21,20H3V6H21V20Z'; | ||
export const mdiThread = 'M12 0C5.383 0 0 5.384 0 12.002 0 18.574 5.31 23.928 11.865 24V12.012H7.938A2.12 2.12 0 0 0 5.82 14.13a2.12 2.12 0 0 0 2.116 2.117v2.616a4.738 4.738 0 0 1-4.731-4.733 4.738 4.738 0 0 1 4.731-4.734h3.928V8.074a3.943 3.943 0 0 1 3.938-3.94 3.944 3.944 0 0 1 3.94 3.94 3.944 3.944 0 0 1-3.94 3.939H14.48v11.731C19.911 22.598 24 17.77 24 12.002 24 5.384 18.617 0 12 0Zm5.127 8.073a1.325 1.325 0 0 0-1.324-1.324 1.325 1.325 0 0 0-1.323 1.324v1.323h1.323a1.325 1.325 0 0 0 1.324-1.323z'; | ||
export var ApplicationType; | ||
(function (ApplicationType) { | ||
ApplicationType["GECKO_BOOTLOADER"] = "bootloader"; | ||
ApplicationType["CPC"] = "cpc"; | ||
ApplicationType["EZSP"] = "ezsp"; | ||
ApplicationType["SPINEL"] = "spinel"; | ||
ApplicationType["ROUTER"] = "router"; | ||
})(ApplicationType || (ApplicationType = {})); | ||
export const ApplicationNames = { | ||
[ApplicationType.GECKO_BOOTLOADER]: 'Bootloader (recovery)', | ||
[ApplicationType.CPC]: 'Multi-PAN (RCP)', | ||
[ApplicationType.EZSP]: 'Zigbee (EZSP)', | ||
[ApplicationType.SPINEL]: 'OpenThread (RCP)', | ||
[ApplicationType.ROUTER]: 'Zigbee Router', | ||
}; | ||
export var FirmwareType; | ||
(function (FirmwareType) { | ||
FirmwareType["ZIGBEE_NCP"] = "zigbee_ncp"; | ||
FirmwareType["ZIGBEE_ROUTER"] = "zigbee_router"; | ||
FirmwareType["OPENTHREAD_RCP"] = "openthread_rcp"; | ||
FirmwareType["BOOTLOADER"] = "bootloader"; | ||
FirmwareType["MULTIPAN"] = "multipan"; | ||
FirmwareType["UNKNOWN"] = "unknown"; | ||
})(FirmwareType || (FirmwareType = {})); | ||
export const LegacyTypeToFirmwareType = { | ||
'ncp-uart-hw': FirmwareType.ZIGBEE_NCP, | ||
'ncp-uart-sw': FirmwareType.ZIGBEE_NCP, | ||
'rcp-uart-802154': FirmwareType.MULTIPAN, | ||
'ot-rcp': FirmwareType.OPENTHREAD_RCP, | ||
'gecko-bootloader': FirmwareType.BOOTLOADER, | ||
}; | ||
export const FirmwareIcons = { | ||
[FirmwareType.ZIGBEE_NCP]: mdiZigbee, | ||
[FirmwareType.ZIGBEE_ROUTER]: mdiRouter, | ||
[FirmwareType.MULTIPAN]: mdiMulticast, | ||
[FirmwareType.OPENTHREAD_RCP]: mdiThread, | ||
[FirmwareType.BOOTLOADER]: mdiFirmware, | ||
[FirmwareType.UNKNOWN]: mdiFirmware, | ||
}; | ||
export const FirmwareNames = { | ||
[FirmwareType.ZIGBEE_NCP]: 'Zigbee (EZSP)', | ||
[FirmwareType.ZIGBEE_ROUTER]: 'Zigbee Router', | ||
[FirmwareType.MULTIPAN]: 'Multi-PAN (RCP)', | ||
[FirmwareType.OPENTHREAD_RCP]: 'OpenThread (RCP)', | ||
[FirmwareType.BOOTLOADER]: 'Gecko Bootloader', | ||
[FirmwareType.UNKNOWN]: 'Unknown', | ||
}; | ||
export const ApplicationTypeToFirmwareType = { | ||
[ApplicationType.CPC]: FirmwareType.MULTIPAN, | ||
[ApplicationType.EZSP]: FirmwareType.ZIGBEE_NCP, | ||
[ApplicationType.ROUTER]: FirmwareType.ZIGBEE_ROUTER, | ||
[ApplicationType.SPINEL]: FirmwareType.OPENTHREAD_RCP, | ||
[ApplicationType.GECKO_BOOTLOADER]: FirmwareType.BOOTLOADER, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import sys | ||
import unittest.mock | ||
|
||
|
||
class DummyFinder: | ||
""" | ||
Combined module loader and finder that recursively returns Mock objects. | ||
""" | ||
|
||
def __init__(self, name): | ||
self.name = name | ||
|
||
def find_module(self, fullname, path=None): | ||
if fullname.startswith(self.name): | ||
return self | ||
|
||
def load_module(self, fullname): | ||
return sys.modules.setdefault(fullname, unittest.mock.MagicMock(__path__=[])) | ||
|
||
|
||
def __getattr__(name): | ||
return unittest.mock.MagicMock() | ||
|
||
|
||
sys.meta_path.append(DummyFinder(__name__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { LitElement } from 'lit'; | ||
import type { Pyodide } from './setup-pyodide'; | ||
import type { Manifest } from './const'; | ||
import './usf-file-upload'; | ||
import './usf-icon'; | ||
import '@material/mwc-dialog'; | ||
import '@material/mwc-button'; | ||
import '@material/mwc-formfield'; | ||
import '@material/mwc-radio'; | ||
import '@material/mwc-circular-progress'; | ||
type GBLImage = any; | ||
export declare function parseFirmwareBuffer(pyodide: Pyodide, buffer: ArrayBuffer): Promise<GBLImage>; | ||
export declare class FirmwareSelector extends LitElement { | ||
pyodide: Pyodide; | ||
manifest: Manifest; | ||
private firmwareUploadIndex; | ||
private firmwareLoaded; | ||
firstUpdated(): void; | ||
private firmwareUploadTypeChanged; | ||
private customFirmwareChosen; | ||
private loadFirmware; | ||
render(): import("lit-html").TemplateResult<1>; | ||
static styles: import("lit").CSSResult; | ||
} | ||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'firmware-selector': FirmwareSelector; | ||
} | ||
} | ||
export {}; |
Oops, something went wrong.