update package

This commit is contained in:
lyon 2023-01-26 15:59:19 +08:00
parent 897a7eba0b
commit 2eee6e6d43
2 changed files with 5 additions and 6 deletions

View File

@ -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;

View File

@ -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);