mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
update package
This commit is contained in:
parent
897a7eba0b
commit
2eee6e6d43
@ -428,7 +428,8 @@ typedef struct pika_hal_WIFI_config {
|
||||
|
||||
typedef struct pika_hal_WIFI_record {
|
||||
char ssid[PIKA_HAL_WIFI_PARAM_MAX_LEN];
|
||||
char bssid[PIKA_HAL_WIFI_PARAM_MAX_LEN];
|
||||
uint8_t bssid[PIKA_HAL_WIFI_PARAM_MAX_LEN];
|
||||
size_t bssid_len;
|
||||
int channel;
|
||||
int rssi;
|
||||
int authmode;
|
||||
|
@ -98,11 +98,8 @@ void _network_WLAN_connectWithBssid(PikaObj* self,
|
||||
return;
|
||||
}
|
||||
pika_hal_WIFI_config cfg = {0};
|
||||
strcpy(cfg.ssid, ssid);
|
||||
strcpy(cfg.password, key);
|
||||
strcpy(cfg.bssid, bssid);
|
||||
check_res(pika_hal_ioctl(hal_wifi, PIKA_HAL_IOCTL_CONFIG, &cfg));
|
||||
check_res(pika_hal_ioctl(hal_wifi, PIKA_HAL_IOCTL_ENABLE));
|
||||
_network_WLAN_connect(self, ssid, key);
|
||||
}
|
||||
|
||||
void _network_WLAN_disconnect(PikaObj* self) {
|
||||
@ -196,7 +193,8 @@ PikaObj* _network_WLAN_scan(PikaObj* self) {
|
||||
Arg* arg = arg_newStr(result->records[i].ssid);
|
||||
PikaStdData_List_append(record, arg);
|
||||
arg_deinit(arg);
|
||||
arg = arg_newStr(result->records[i].bssid);
|
||||
arg = arg_newBytes(result->records[i].bssid,
|
||||
result->records[i].bssid_len);
|
||||
PikaStdData_List_append(record, arg);
|
||||
arg_deinit(arg);
|
||||
arg = arg_newInt(result->records[i].channel);
|
||||
|
Loading…
x
Reference in New Issue
Block a user