Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
qcloud-iotexplorer-appdev-plugin-wificonf-smartconfig
Advanced tools
腾讯云物联网开发平台应用开发小程序端WIFI配网方式之SmartConfig SDK
腾讯云物联网开发平台应用开发小程序端WIFI配网方式之SmartConfig SDK
npm install qcloud-iotexplorer-appdev-sdk
npm install qcloud-iotexplorer-appdev-plugin-wificonf-core
npm install qcloud-iotexplorer-appdev-plugin-wificonf-smartconfig
step1.向sdk里面注册smartconfig插件,sdk的初始化方式,请参考qcloud-iotexplorer-appdev-sdk
import SmartConfigPlug from 'qcloud-iotexplorer-appdev-plugin-wificonf-smartconfig';
sdk.usePlugin(SmartConfigPlug);
step2.开始smartconfig配网,配网流程祥见官方文档
import { constants as WifiConfConstants } from 'qcloud-iotexplorer-appdev-plugin-wificonf-core';
const {
MpStatType, MyStatDimension, WifiConfErrorMsg, WifiConfStepCode,
} = WifiConfConstants;
/**
* smartconfig一键配网
*/
export function SmartConfigConfigure({
token,
wifiInfo = {
SSID: '';
password: '';
BSSID: '';
},
familyId = 'default',
roomId,
reporter,
onStepChange,
onStatusChange,
}) {
const onProgress = (data) => {
reporter.info(data.code, data.detail);
switch (data.code) {
case WifiConfStepCode.PROTOCOL_SUCCESS:
onStepChange(1);
break;
case WifiConfStepCode.CREATE_UDP_CONNECTION_SUCCESS:
onStepChange(2);
break;
case WifiConfStepCode.BUSINESS_QUERY_TOKEN_STATE_SUCCESS:
onStepChange(3);
break;
case WifiConfStepCode.WIFI_CONF_SUCCESS:
onStepChange(4);
break;
}
};
const onComplete = ({ productId, deviceName }) => {
onStatusChange({
status: 'success',
productId,
deviceName,
});
};
const onError = async ({ code, detail }) => {
reporter.error(code, detail);
onStatusChange({ status: 'error' });
};
sdk.plugins['wifiConfSmartConfig'].start({
wifiConfToken: token,
targetWifiInfo: wifiInfo,
autoRetry: true, // 自动处理故障流程
familyId,
roomId,
onProgress,
onComplete,
onError
});
}
FAQs
腾讯云物联网开发平台应用开发小程序端WIFI配网方式之SmartConfig SDK
The npm package qcloud-iotexplorer-appdev-plugin-wificonf-smartconfig receives a total of 6 weekly downloads. As such, qcloud-iotexplorer-appdev-plugin-wificonf-smartconfig popularity was classified as not popular.
We found that qcloud-iotexplorer-appdev-plugin-wificonf-smartconfig demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.