I have a serial port listener on PC and want to receive data over it from ESP.
How can I do it using just onboard built-in usb to serial functionality (soldered chip like CP210x).
In fact this is listed as com port on PC so how do I set uart parameters on esp?
What is the pin number for that internal RX/TX chip?
Thanks
uart via built in usb on esp board
Re: uart via built in usb on esp board
If you have an ESP32 module/board which already has a USB connector on it, it is likely that the board also contains a USB->UART converter. If you plug your ESP32 into your PC using the USB socket on the ESP32 to a USB socket on your PC, you should find that the PC side will see a new COM port. At this point you can read from the COM port using a terminal emulation program. Serial data written by the ESP32 (such as logging) will then appear on the terminal emulator.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: uart via built in usb on esp board
Is there example of usb sockets on esp?
That built in chip is able to flash the board so it has to be somehow connected and maybe I could access it
What do you suggest?
That built in chip is able to flash the board so it has to be somehow connected and maybe I could access it
What do you suggest?
Re: uart via built in usb on esp board
I'm guessing there is no support for IP over serial in the SDK. Do you have an application on your PC that supports TCP/IP over a serial port? Is there any reason you can't do data xfers by simply talking to the serial port?
John A
John A
Re: uart via built in usb on esp board
Well my question is - how I use uart on ESP to send data to PC serial port?
uart needs a pin number but serial communication is controlled by that converter chip.
So how data from 'printf' is sent to PC ?? It is all sent via usb cable as serial but how?
Should I just use printf() ? or UART hardware
It is possible but how. Please I need help with that
uart needs a pin number but serial communication is controlled by that converter chip.
So how data from 'printf' is sent to PC ?? It is all sent via usb cable as serial but how?
Should I just use printf() ? or UART hardware
It is possible but how. Please I need help with that
Re: uart via built in usb on esp board
I use printf. But you are going to get some bogus data when the unit boots as I haven't seen any way to turn off some of the boot text. The baud rate appears to be set in make menuconfig under serial boot loader/"make monitor" baud rate.
There are also programmatic ways to set the baud (uart_set_baudrate()) and talk to the UART. And this is the link to the docs for that...
https://esp-idf.readthedocs.io/en/lates ... light=uart
If you need to send binary data then I guess the way to go is the UART API.
John A
There are also programmatic ways to set the baud (uart_set_baudrate()) and talk to the UART. And this is the link to the docs for that...
https://esp-idf.readthedocs.io/en/lates ... light=uart
If you need to send binary data then I guess the way to go is the UART API.
John A
Re: uart via built in usb on esp board
yes however uart api needs a pin number but I have no idea what pin number that is.
Or maynbe there is other way
Or maynbe there is other way
Re: uart via built in usb on esp board
TX0 - GPIO 01
RX0 - GPIO 03
or perhaps use UART_PIN_NO_CHANGE since the uart is already configured maybe there is no need to use a pin number.
I'm guessing that every prototype board that uses a UART to talk to the PC for development is going to use the same UART and the same pins since that's all setup in the boot process before your program ever loads.
John A
RX0 - GPIO 03
or perhaps use UART_PIN_NO_CHANGE since the uart is already configured maybe there is no need to use a pin number.
I'm guessing that every prototype board that uses a UART to talk to the PC for development is going to use the same UART and the same pins since that's all setup in the boot process before your program ever loads.
John A
Re: uart via built in usb on esp board
Thanks so much. I will try it and let know if it worked
Re: uart via built in usb on esp board
I cannot get it working. Tried all 3 uarts 0-2 with UART_PIN_NO_CHANGE
Also noticed according to pinout of devkit board uart0 txd is 41 but undefined
I will try wifi then
Also noticed according to pinout of devkit board uart0 txd is 41 but undefined
I will try wifi then
Who is online
Users browsing this forum: Kuralmozhi and 94 guests