Search found 4 matches

by bal.jop@gmail.com
Fri Apr 28, 2023 4:24 am
Forum: ESP-IDF
Topic: ESP 32 does not connect to wifi, AUTH EXPIRE error.
Replies: 2
Views: 7867

ESP 32 does not connect to wifi, AUTH EXPIRE error.

int scanNconnectWifi() { ESP_ERROR_CHECK(esp_netif_init()); sta_netif = esp_netif_create_default_wifi_sta(); assert(sta_netif); wifi_init_config_t wifi_config = WIFI_INIT_CONFIG_DEFAULT(); ESP_ERROR_CHECK(esp_wifi_init(&wifi_config)); ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT, ...
by bal.jop@gmail.com
Wed Nov 02, 2022 5:31 am
Forum: ESP-IDF
Topic: UART communication in ESP 32
Replies: 4
Views: 2853

Re: UART communication in ESP 32

The code as I've used. #include <stdio.h> #include <string.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "driver/uart.h" #include "driver/gpio.h" #include "sdkconfig.h" #include "esp_log.h" #define ECHO_UART_PORT_NUM UART_NUM_0 #define ECHO_TEST_TXD 1 #define ECHO_TEST_RXD 3 ...
by bal.jop@gmail.com
Tue Nov 01, 2022 4:42 am
Forum: ESP-IDF
Topic: UART communication in ESP 32
Replies: 4
Views: 2853

Re: UART communication in ESP 32

data and data1 are heap memories allocated prior to starting the loop;

Code: Select all

char *data=(char *) malloc(2048);
char *data1=(char *) malloc(2048);
by bal.jop@gmail.com
Mon Oct 31, 2022 11:36 pm
Forum: ESP-IDF
Topic: UART communication in ESP 32
Replies: 4
Views: 2853

UART communication in ESP 32

I am new to esp idf and I am trying uart echo. I tried modifying uart echo code to; uart_flush_input(ECHO_UART_PORT_NUM); while (1) { memset (data,'\0',BUF_SIZE); len=0; // Read data from the UART len= uart_read_bytes(ECHO_UART_PORT_NUM, data, (BUF_SIZE - 1), 20 / portTICK_PERIOD_MS); if (len >= 1){...