i see that the device also works as a SOFT_AP and i also can see the wifi network with my cellphone. I did not want this behaviour and did not write code about it. Is this normal? How can I turn off this behaviour?
#include "ets_sys.h"
#include "osapi.h"
#include "os_type.h"
#include "gpio.h"
// see eagle_soc.h for these definitions
#define LED_PIN 4
#define LED_GPIO_MUX PERIPHS_IO_MUX_GPIO4_U
#define LED_GPIO_FUNC FUNC_GPIO4
#define DELAY 500 /* milliseconds */
LOCAL os_timer_t blink_timer;
LOCAL uint8_t led_state=0;
LOCAL void ICACHE_FLASH_ATTR blink_cb(void *arg)
{
GPIO_OUTPUT_SET(LED_PIN, led_state);
led_state ^=1;
//os_printf("...Beat...\n");
}
void user_rf_pre_init(void)
{
}
void user_init(void)
{
gpio_init();
//os_printf("SDK version: %s \n", system_get_sdk_version());
// Configure pin as a GPIO
PIN_FUNC_SELECT(LED_GPIO_MUX, LED_GPIO_FUNC);
// Set up a timer to blink the LED
// os_timer_disarm(ETSTimer *ptimer)
os_timer_disarm(&blink_timer);
// os_timer_setfn(ETSTimer *ptimer, ETSTimerFunc *pfunction, void *parg)
os_timer_setfn(&blink_timer, (os_timer_func_t *)blink_cb, (void *)0);
// void os_timer_arm(ETSTimer *ptimer,uint32_t milliseconds, bool repeat_flag)
os_timer_arm(&blink_timer, DELAY, 1);
}