esp-idf-provisioning-web 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +129 -0
- package/dist/ESPDevice.d.ts +66 -0
- package/dist/ESPDevice.d.ts.map +1 -0
- package/dist/ESPProvisionManager.d.ts +34 -0
- package/dist/ESPProvisionManager.d.ts.map +1 -0
- package/dist/constants.d.ts +19 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +5085 -0
- package/dist/protocol/protocol.d.ts +4 -0
- package/dist/protocol/protocol.d.ts.map +1 -0
- package/dist/protocol/wifiConfig.d.ts +8 -0
- package/dist/protocol/wifiConfig.d.ts.map +1 -0
- package/dist/protocol/wifiScan.d.ts +8 -0
- package/dist/protocol/wifiScan.d.ts.map +1 -0
- package/dist/security/Security.d.ts +26 -0
- package/dist/security/Security.d.ts.map +1 -0
- package/dist/security/Security0.d.ts +13 -0
- package/dist/security/Security0.d.ts.map +1 -0
- package/dist/transport/BLETransport.d.ts +22 -0
- package/dist/transport/BLETransport.d.ts.map +1 -0
- package/dist/transport/SoftAPTransport.d.ts +27 -0
- package/dist/transport/SoftAPTransport.d.ts.map +1 -0
- package/dist/transport/Transport.d.ts +22 -0
- package/dist/transport/Transport.d.ts.map +1 -0
- package/dist/types.d.ts +73 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/crypto.d.ts +44 -0
- package/dist/utils/crypto.d.ts.map +1 -0
- package/package.json +60 -0
- package/src/ESPDevice.ts +231 -0
- package/src/ESPProvisionManager.ts +78 -0
- package/src/constants.ts +29 -0
- package/src/generated/.gitkeep +0 -0
- package/src/generated/proto.d.ts +3418 -0
- package/src/generated/proto.js +10006 -0
- package/src/index.ts +31 -0
- package/src/proto/constants.proto +14 -0
- package/src/proto/sec0.proto +28 -0
- package/src/proto/sec1.proto +45 -0
- package/src/proto/sec2.proto +48 -0
- package/src/proto/session.proto +25 -0
- package/src/proto/wifi_config.proto +57 -0
- package/src/proto/wifi_constants.proto +32 -0
- package/src/proto/wifi_ctrl.proto +38 -0
- package/src/proto/wifi_scan.proto +63 -0
- package/src/protocol/protocol.ts +23 -0
- package/src/protocol/wifiConfig.ts +108 -0
- package/src/protocol/wifiScan.ts +91 -0
- package/src/security/Security.ts +29 -0
- package/src/security/Security0.ts +40 -0
- package/src/transport/BLETransport.ts +111 -0
- package/src/transport/SoftAPTransport.ts +89 -0
- package/src/transport/Transport.ts +24 -0
- package/src/types.ts +86 -0
- package/src/utils/crypto.ts +129 -0
package/src/constants.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants for ESP provisioning protocol
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Protocol endpoints
|
|
6
|
+
export const PROTO_ENDPOINTS = {
|
|
7
|
+
PROV_SESSION: 'prov-session',
|
|
8
|
+
PROV_SCAN: 'prov-scan',
|
|
9
|
+
PROV_CTRL: 'prov-ctrl',
|
|
10
|
+
PROV_CONFIG: 'prov-config',
|
|
11
|
+
PROTO_VER: 'proto-ver',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// Default device prefix for scanning
|
|
15
|
+
export const DEFAULT_DEVICE_PREFIX = 'PROV_';
|
|
16
|
+
|
|
17
|
+
// Fallback Service UUID
|
|
18
|
+
export const FALLBACK_SERVICE_UUID = '1775244d-6b43-439b-877c-060f2d9bed07';
|
|
19
|
+
|
|
20
|
+
export const FALLBACK_NU_LOOKUP = {
|
|
21
|
+
'prov-session': 'ff51',
|
|
22
|
+
'prov-config': 'ff52',
|
|
23
|
+
'proto-ver': 'ff53',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const DEFAULT_BLE_DEVICE_OPTIONS: RequestDeviceOptions = {
|
|
27
|
+
filters: [{ namePrefix: DEFAULT_DEVICE_PREFIX }, { services: [FALLBACK_SERVICE_UUID] }],
|
|
28
|
+
optionalServices: [FALLBACK_SERVICE_UUID],
|
|
29
|
+
};
|
|
File without changes
|