I believe the following macros need to be re-defined in the ESP32.h file from github, however in XILINX project for Artix A7, there is a uart-lite that is connected via AXI and there is a uart connected to the ESP32 IP. I have tried to define both. When I define this as the uart-lite device ID, I get some output on console, but I cannot successfully connect to WIFI (which makes me believe the AT commands are being sent to AXI-UART , but not to ESP32 device uart). When I define uart_device as ESP device, nothing prints to console terminal. Please let me know if you have any suggestion.
When I try to use the PmodESP32.h / PmodESP32.c included with IP, I am also not able to succesfully communicate with device. I basically do the following
The commands i try to send are for connecting to WIFI and for configuring TCP, the functions return 0, which i understand means not succesful. I have reconfigure some of the functions from the github project to work with PmodESP32.c/PmodESP32.h files (the github project uses a UART only devicePtr, whereas the included PmodESP32 files have GPIO / UART structure).
int set_wifi_mode(PmodESP32 * devicePtr, unsigned int mode) {
u8 tx_buf[50];
if(mode > 3) {
xil_printf("Mode %d is not supported for setting the WiFi mode\n\r");
xil_printf("Please Use Modes:\n\r");
xil_printf("\tNULL_MODE\n\r\tSTATION_MODE\n\r\tSOFTAP_MODE or\n\r\tSOFTAP_AND_STATION_MODE\n\r");
return XST_FAILURE;
}
sprintf(tx_buf, "AT+CWMODE=%d", mode);
ESP32_SendBuffer(devicePtr, tx_buf, strlen(tx_buf));
send_n_clr(devicePtr);
return XST_SUCCESS;
}
Question
elAmericano
Hello,
I am working with Artix A7 board, implementing various PMODs successfully. I am having some issue with PMOD-ESP32 unfortunately.
The source files from a project off github (ESP32.c/ESP32.h) from https://github.com/mitchellorsucci/PMODESP32 as well as the included libraries (PmodESP32.c/PmodESP32.h)
GitHub Project:
I believe the following macros need to be re-defined in the ESP32.h file from github, however in XILINX project for Artix A7, there is a uart-lite that is connected via AXI and there is a uart connected to the ESP32 IP. I have tried to define both. When I define this as the uart-lite device ID, I get some output on console, but I cannot successfully connect to WIFI (which makes me believe the AT commands are being sent to AXI-UART , but not to ESP32 device uart). When I define uart_device as ESP device, nothing prints to console terminal. Please let me know if you have any suggestion.
When I try to use the PmodESP32.h / PmodESP32.c included with IP, I am also not able to succesfully communicate with device. I basically do the following
The commands i try to send are for connecting to WIFI and for configuring TCP, the functions return 0, which i understand means not succesful. I have reconfigure some of the functions from the github project to work with PmodESP32.c/PmodESP32.h files (the github project uses a UART only devicePtr, whereas the included PmodESP32 files have GPIO / UART structure).
int set_wifi_mode(PmodESP32 * devicePtr, unsigned int mode) {
u8 tx_buf[50];
if(mode > 3) {
xil_printf("Mode %d is not supported for setting the WiFi mode\n\r");
xil_printf("Please Use Modes:\n\r");
xil_printf("\tNULL_MODE\n\r\tSTATION_MODE\n\r\tSOFTAP_MODE or\n\r\tSOFTAP_AND_STATION_MODE\n\r");
return XST_FAILURE;
}
sprintf(tx_buf, "AT+CWMODE=%d", mode);
ESP32_SendBuffer(devicePtr, tx_buf, strlen(tx_buf));
send_n_clr(devicePtr);
return XST_SUCCESS;
}
int get_current_AP(PmodESP32 * devicePtr) {
u8 tx[] = "AT+CWJAP?";
ESP32_SendBuffer(devicePtr, tx, strlen(tx));
send_n_clr(devicePtr);
return XST_SUCCESS;
}
int set_current_AP(PmodESP32 * devicePtr, char * ssid, char * pwd, char * bssid) {
u8 tx_buf[100];
sprintf(tx_buf, "AT+CWJAP=\"%s\",\"%s\"", ssid, pwd);
if(bssid != NULL) {
int cursor = strlen(tx_buf);
sprintf(tx_buf + cursor, ",\"%s\"");
}
ESP32_SendBuffer(devicePtr, tx_buf, strlen(tx_buf));
sendNLCR(devicePtr);
return XST_SUCCESS;
}
int list_available_APs(PmodESP32 * devicePtr, char * ssid) {
u8 tx_buf[100];
sprintf(tx_buf, "AT+CWLAP");
if(ssid != NULL) {
int cursor = strlen(tx_buf);
sprintf(tx_buf + cursor, "=\"%s\"", ssid);
}
ESP32_SendBuffer(devicePtr, tx_buf, strlen(tx_buf));
sendNLCR(devicePtr);
return XST_SUCCESS;
}
ESP32.c ESP32.h PmodESP32.c PmodESP32.h
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.