ESP8266EX:Fix A Potential Error For Uart RX

Espressif_Kelly
Posts: 140
Joined: Mon Oct 27, 2014 10:40 am

ESP8266EX:Fix A Potential Error For Uart RX

Postby Espressif_Kelly » Fri Oct 31, 2014 11:25 am

updated!:
patch_141118.rar
(89.51 KiB) Downloaded 940 times

fix the bug that sniffer example does not function

==============================================

Hello Everyone,
The previously released SDK for ESP8266EX inadvertently introduced a bug that may cause a little packet loss when transferring packet by Uart RX.
So for now,I will release the patch for this bug.Please download the patch from the attachment,and refer to the following steps:
Following Commands:
1.REPLACE LIBPHY.A IN SDK/LIB
2.ADD LIBPP.A TO SDK/LIB
3.MODIFY SDK/APP/MAKEFILE
4.ADD "-lpp \" AS BELOW
-lgcc
-lhal
-lpp
-lphy
-lnet80211
-llwip
-lwpa
-lmain
-lssc
-lssl

We sincerely apologize for the inconveniences caused. Please contact us, if you need more information.
Attachments
FRM_ERR_PATCH.rar
ESP8266EX:Fix A Potential Error For Uart RX
(178.25 KiB) Downloaded 1847 times

User avatar
dexterash
Posts: 7
Joined: Fri Nov 07, 2014 7:10 pm
Location: Online
Contact:

Re: ESP8266EX:Fix A Potential Error For Uart RX

Postby dexterash » Tue Nov 11, 2014 6:26 am

Hello

We're using 0.9.2 SDK. We're having no problems in running the AT demo, but any IoT demo prints "garbage". The module is an ESP01, connected to a RaspberryPI that's setup to monitor/send at 74880bps.
Any ideas?

Thank you!
Attachments
esp_uart_output.png
esp_uart_output.png (33.71 KiB) Viewed 26794 times

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: ESP8266EX:Fix A Potential Error For Uart RX

Postby costaud » Fri Nov 14, 2014 2:10 am

dexterash wrote:Hello

We're using 0.9.2 SDK. We're having no problems in running the AT demo, but any IoT demo prints "garbage". The module is an ESP01, connected to a RaspberryPI that's setup to monitor/send at 74880bps.
Any ideas?

Thank you!

does the Raspberry really support 74880bps?Try to set the speed to 115200bps in the SDK and run.

User avatar
dexterash
Posts: 7
Joined: Fri Nov 07, 2014 7:10 pm
Location: Online
Contact:

Re: ESP8266EX:Fix A Potential Error For Uart RX

Postby dexterash » Fri Nov 14, 2014 2:15 am

True, I'm not sure that RasPI supports 74880.

Could you, please, pinpoint the exact file to modify? We had a hard time finding it in the case of the IoT example.

Thank you!

Roffey
Posts: 2
Joined: Sat Nov 08, 2014 10:57 pm

Re: ESP8266EX:Fix A Potential Error For Uart RX

Postby Roffey » Sat Nov 15, 2014 2:52 am

Hi,
As a product designer, although I find all the work here fascinating and beyond my capabilities as such, I really just want to use a stable, low cost unit like the esp device.
I don't really want to get involved in developing software for a device where there are so many more capable guys already doing it.
For me, and maybe others who are of a similar status, what would be ideal is the availability of straight forward single binaries that can be flashed into the unit.
(o.k. if necessary then several memory locations) For instance, the case of the uart patch.
I have applications for this device, I just want to keep life 'simple', as there other areas of my work that require devotion and attention.

I have found that up at 921K, things seem to be far more solid?

many regards

Dave Roffey

vowstar
Posts: 15
Joined: Fri Oct 24, 2014 7:23 pm

Re: ESP8266EX:Fix A Potential Error For Uart RX

Postby vowstar » Sun Nov 16, 2014 8:45 pm

If use this patch, the sniffer interface (promiscuous mode) will have bug :| .

tinhead
Posts: 5
Joined: Fri Oct 24, 2014 8:28 pm

Re: ESP8266EX:Fix A Potential Error For Uart RX

Postby tinhead » Sun Nov 16, 2014 9:19 pm

vowstar wrote:If use this patch, the sniffer interface (promiscuous mode) will have bug :| .


what a bug? what exactly is not working ?

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: ESP8266EX:Fix A Potential Error For Uart RX

Postby costaud » Sun Nov 16, 2014 11:38 pm

dexterash wrote:True, I'm not sure that RasPI supports 74880.

Could you, please, pinpoint the exact file to modify? We had a hard time finding it in the case of the IoT example.

Thank you!


try this to set baudrate to 115200 bps.

Code: Select all

#include "driver/uart_register.h"
void user_init(void)
{

   uart_div_modify(0, UART_CLK_FREQ / 115200);
   //clear rx and tx fifo,not ready
   SET_PERI_REG_MASK(UART_CONF0(0), UART_RXFIFO_RST | UART_TXFIFO_RST);
   CLEAR_PERI_REG_MASK(UART_CONF0(0), UART_RXFIFO_RST | UART_TXFIFO_RST);

   os_printf("set baudrate to 115200\n\r");
       os_printf("SDK version:%d.%d.%d\n", SDK_VERSION_MAJOR, SDK_VERSION_MINOR, SDK_VERSION_REVISION);



#if ESP_PLATFORM
    user_esp_platform_init();
#endif

    user_devicefind_init();
#ifdef SERVER_SSL_ENABLE
    user_webserver_init(SERVER_SSL_PORT);
#else
    user_webserver_init(SERVER_PORT);
#endif
}


download setting,(choose dout if you use a dual flash instead of a quad one) :
dl_path.jpg
dl_path.jpg (80.08 KiB) Viewed 26416 times



set uart speed to 115200
the print log is like below

Code: Select all

rl岒nn瀕nn溾?bp寧lrlrlp騨? ?l b n鈢?巔? b岒nnl`nr帓抧 忪抈p騨? r寽溾? b n鈢靗帋 b岒nnn鈢 ll帋b岒nnl`nr帓抧 b ?lr拻n b ?l
set baudrate to 115200
SDK version:0.9.2
mode : sta(18:fe:34:97:f5:e8) + softAP(1a:fe:34:97:f5:e8)
add if0
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100

tinhead
Posts: 5
Joined: Fri Oct 24, 2014 8:28 pm

Re: ESP8266EX:Fix A Potential Error For Uart RX

Postby tinhead » Mon Nov 17, 2014 1:35 am

tinhead wrote:
vowstar wrote:If use this patch, the sniffer interface (promiscuous mode) will have bug :| .


what a bug? what exactly is not working ?


ahh i see, already here is a problem with the sniffer example:

wifi_set_promiscuous_rx_cb(wifi_promiscuous_rx);

there is no callback data what so ever (i've changed the wifi_promiscuous_rx to show me the callback buffer, but there is nothing when linked with new libs). I did some debug work (replaced objects until callback was broken), the problem seems to be somewhere in one of these sources "esf_buf.c, pm.c, pp.c, wdev.c", so it s indeed related to the topic.

vowstar
Posts: 15
Joined: Fri Oct 24, 2014 7:23 pm

Re: ESP8266EX:Fix A Potential Error For Uart RX

Postby vowstar » Mon Nov 17, 2014 12:52 pm

tinhead wrote:
tinhead wrote:
vowstar wrote:If use this patch, the sniffer interface (promiscuous mode) will have bug :| .


what a bug? what exactly is not working ?


ahh i see, already here is a problem with the sniffer example:

wifi_set_promiscuous_rx_cb(wifi_promiscuous_rx);

there is no callback data what so ever (i've changed the wifi_promiscuous_rx to show me the callback buffer, but there is nothing when linked with new libs). I did some debug work (replaced objects until callback was broken), the problem seems to be somewhere in one of these sources "esf_buf.c, pm.c, pp.c, wdev.c", so it s indeed related to the topic.


Yes, it not working.

Who is online

Users browsing this forum: No registered users and 13 guests