Timeline for How to determine the end of data received by USART?
Current License: CC BY-SA 3.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 14, 2015 at 16:32 | answer | added | Dean | timeline score: 0 | |
May 13, 2015 at 21:26 | vote | accept | Zgrkpnr | ||
May 13, 2015 at 21:17 | comment | added | David | If you control the output of your web server then you need to use or invent some kind of protocol. Do you control the data or not? | |
May 13, 2015 at 20:57 | answer | added | tcrosley | timeline score: 2 | |
May 13, 2015 at 20:52 | comment | added | Zgrkpnr | @KyranF yes. I am able to send get request and it works. I know because I also send a log data to my server and check it there if it received the log data. | |
May 13, 2015 at 20:46 | comment | added | KyranF | Have you got TX, RX (the correct way around) and GND connected/shared between the ESP8266 module and the AVR? | |
May 13, 2015 at 20:44 | comment | added | Zgrkpnr | @KyranF I am receiving them through ESP8266 wifi module. I response to an HTTP request from my server and ESP8266 gets it and then sends it via UART to my MCU. | |
May 13, 2015 at 20:41 | comment | added | KyranF | If it's ASCII data, the /n should be enough to signal the end of the message. There could be wiring issues, or other hardware related issues which you should check/mention first | |
May 13, 2015 at 20:40 | comment | added | DoxyLover | In order to handle what you've shown, you will actually have to "parse" the data as you receive it. For example, if you see that the first 6 characters are "time\r\n", you will need to set a flag to consume through the second coming \r. If you can change the format of the data you're receiving so there is also a fixed EOM character or string, you'll be much better off. | |
May 13, 2015 at 20:40 | comment | added | KyranF | What has a webserver and UART got to do with it though? Is the web server connected over USB to Serial converter to the AVR's UART, and the incoming data on the AVR seems to be incorrect? | |
May 13, 2015 at 20:38 | comment | added | Zgrkpnr | @0x6d64 edited my question. | |
May 13, 2015 at 20:36 | history | edited | Zgrkpnr | CC BY-SA 3.0 |
added 395 characters in body
|
May 13, 2015 at 20:32 | comment | added | Zgrkpnr | @KyranF I am editing my question for details. | |
May 13, 2015 at 20:30 | comment | added | 0x6d64 | Its not clear what you are asking: Is the output of your data source random? Then there is no point in looking for some end marker. Or have you control over the avr? Then make sure that it does not send gibberish after it has sent the data. | |
May 13, 2015 at 20:30 | comment | added | KyranF | we cannot help you unless you describe what sort of data is being sent, at what rate, if it's a stream or a "packet"/burst, etc. And do you know if it's valid/correct data at all? | |
May 13, 2015 at 20:23 | history | asked | Zgrkpnr | CC BY-SA 3.0 |