From 7f4b8d21022d4d00075edade9c96e4dbd32295d5 Mon Sep 17 00:00:00 2001 From: tangyuxin <462747508@qq.com> Date: Sat, 23 Jun 2018 14:50:52 +0800 Subject: [PATCH] =?UTF-8?q?[components][drivers]wlan=201.=E4=BF=AE?= =?UTF-8?q?=E6=94=B9wifi=E9=80=9F=E7=8E=87=E5=8D=95=E4=BD=8D=E4=B8=BAbps?= =?UTF-8?q?=202.=E6=89=93=E5=8D=B0ap=E4=BF=A1=E6=81=AF=E6=9B=B4=E5=8A=A0?= =?UTF-8?q?=E5=8F=8B=E5=A5=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/drivers/wlan/wlan_cmd.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/components/drivers/wlan/wlan_cmd.c b/components/drivers/wlan/wlan_cmd.c index 33dfac5b7..eda628a35 100644 --- a/components/drivers/wlan/wlan_cmd.c +++ b/components/drivers/wlan/wlan_cmd.c @@ -426,13 +426,22 @@ int wifi(int argc, char **argv) int index, num; num = scan_result->ap_num; - rt_kprintf("----Wi-Fi APInformation----\n"); + rt_kprintf(" SSID MAC rssi chn Mbps\n"); + rt_kprintf("------------------------------- ----------------- ---- --- ----\n"); for (index = 0; index < num; index ++) { - rt_kprintf("SSID:%-.32s, ", scan_result->ap_table[index].ssid); - rt_kprintf("rssi:%d, ", scan_result->ap_table[index].rssi); - rt_kprintf("chn:%d, ", scan_result->ap_table[index].channel); - rt_kprintf("rate:%d\n", scan_result->ap_table[index].datarate); + rt_kprintf("%-32.32s", scan_result->ap_table[index].ssid); + rt_kprintf("%02x:%02x:%02x:%02x:%02x:%02x ", + scan_result->ap_table[index].bssid[0], + scan_result->ap_table[index].bssid[1], + scan_result->ap_table[index].bssid[2], + scan_result->ap_table[index].bssid[3], + scan_result->ap_table[index].bssid[4], + scan_result->ap_table[index].bssid[5] + ); + rt_kprintf("%4d ", scan_result->ap_table[index].rssi); + rt_kprintf("%2d ", scan_result->ap_table[index].channel); + rt_kprintf("%d\n", scan_result->ap_table[index].datarate / 1000000); } } rt_wlan_release_scan_result(&scan_result); @@ -502,7 +511,7 @@ int wifi(int argc, char **argv) wlan->info->bssid[4], wlan->info->bssid[5]); rt_kprintf(" Channel: %d\n", wlan->info->channel); - rt_kprintf("DataRate: %dMbps\n", wlan->info->datarate / 1000); + rt_kprintf("DataRate: %dMbps\n", wlan->info->datarate / 1000000); rt_kprintf(" RSSI: %d\n", rssi); } else