first commit

This commit is contained in:
David R.
2025-09-05 18:58:05 +02:00
parent fc13e0779b
commit ed05c83ac6
3678 changed files with 832193 additions and 0 deletions
@@ -0,0 +1,6 @@
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wifi_scan)
@@ -0,0 +1,65 @@
dependencies:
espressif/eppp_link:
component_hash: f82b41b83936cb99b01129c0aec5ebf39c4bbff252bea400062d8bc4e7b83e20
dependencies:
- name: espressif/esp_serial_slave_link
registry_url: https://components.espressif.com
require: private
version: ^1.1.0
- name: idf
require: private
version: '>=5.2'
source:
registry_url: https://components.espressif.com
type: service
version: 0.3.1
espressif/esp_hosted:
component_hash: b655ac537a11d2257c75f88a0445cbaf19c71a5e1170ec7f287936efac169d7d
dependencies:
- name: idf
require: private
version: '>=5.3'
source:
registry_url: https://components.espressif.com
type: service
version: 2.0.13
espressif/esp_serial_slave_link:
component_hash: d8c13c033a7604e9333b5d8ea45e0d6fec908fd552df7db20d33dd8d6916528d
dependencies:
- name: idf
require: private
version: '>=5.0'
source:
registry_url: https://components.espressif.com
type: service
version: 1.1.0~1
espressif/esp_wifi_remote:
component_hash: 2264e0e004ec9a2c165e19e8c25e649cf01e3417a5ec3edb4759355710e1c9a1
dependencies:
- name: espressif/eppp_link
registry_url: https://components.espressif.com
require: private
version: '>=0.1'
- name: espressif/esp_hosted
registry_url: https://components.espressif.com
require: private
rules:
- if: target in [esp32h2, esp32p4]
version: '>=0.0.6'
- name: idf
require: private
version: '>=5.3'
source:
registry_url: https://components.espressif.com/
type: service
version: 0.14.2
idf:
source:
type: idf
version: 5.5.0
direct_dependencies:
- espressif/esp_wifi_remote
- idf
manifest_hash: 520c2f19dc2bf10602c22fb475d2f9dd307068cf5ab996f0cfb491ca2db22ced
target: esp32p4
version: 2.0.0
@@ -0,0 +1,2 @@
idf_component_register(SRCS "wifi_scan.c"
INCLUDE_DIRS ".")
@@ -0,0 +1,17 @@
## IDF Component Manager Manifest File
dependencies:
## Required IDF version
idf:
version: '>=4.1.0'
# # Put list of dependencies here
# # For components maintained by Espressif:
# component: "~1.0.0"
# # For 3rd party components:
# username/component: ">=1.0.0,<2.0.0"
# username2/component2:
# version: "~1.0.0"
# # For transient dependencies `public` flag can be set.
# # `public` flag doesn't have an effect dependencies of the `main` component.
# # All dependencies of `main` are public by default.
# public: true
espressif/esp_wifi_remote: ^0.14.2
@@ -0,0 +1,42 @@
#include <stdio.h>
#include <string.h>
#include "esp_err.h"
#include "esp_log.h"
#include "esp_event.h"
#include "esp_check.h"
#include "esp_wifi.h"
#include "esp_wifi_remote.h"
#define TAG "app_main"
#define SCAN_LIST_SIZE 20
void app_main(void)
{
ESP_ERROR_CHECK(esp_event_loop_create_default());
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
esp_wifi_set_mode(WIFI_MODE_STA);
esp_wifi_start();
uint16_t number = SCAN_LIST_SIZE;
wifi_ap_record_t ap_info[SCAN_LIST_SIZE];
uint16_t ap_count = 0;
memset(ap_info, 0, sizeof(ap_info));
esp_wifi_scan_start(NULL, true);
ESP_ERROR_CHECK(esp_wifi_scan_get_ap_num(&ap_count));
ESP_ERROR_CHECK(esp_wifi_scan_get_ap_records(&number, ap_info));
ESP_LOGI(TAG,"-------------------------------------------------------");
ESP_LOGI(TAG,"|\tSSID\t\t\t\t RSSI\t\t|");
for (int i = 0; (i < SCAN_LIST_SIZE) && (i < ap_count); i++) {
ESP_LOGI(TAG,"|\t%-*s %d\t\t|",33,ap_info[i].ssid, ap_info[i].rssi);
}
ESP_LOGI(TAG,"-------------------------------------------------------");
}
@@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, , 8M,
storage, data, spiffs, , 7M,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
3 nvs, data, nvs, 0x9000, 0x6000,
4 phy_init, data, phy, 0xf000, 0x1000,
5 factory, app, factory, , 8M,
6 storage, data, spiffs, , 7M,
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
# This file was generated using idf.py save-defconfig. It can be edited manually.
# Espressif IoT Development Framework (ESP-IDF) 6.0.0 Project Minimal Configuration
#
CONFIG_IDF_TARGET="esp32p4"
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_SPIRAM=y
CONFIG_SPIRAM_SPEED_200M=y
CONFIG_IDF_EXPERIMENTAL_FEATURES=y
File diff suppressed because it is too large Load Diff