Giter Club home page Giter Club logo

esp8266-dev's People

Contributors

nqd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp8266-dev's Issues

Questions about mDNS

See what you wrote about the mDNS instance: I demonstrated your instance: in the browser input: espmodule.local did not resolve to this url! Is there a problem with your example?
pp

Doesn't work with SDK 1.5.1

Hello nqd, I managed to compile all fine with the new SDK 1.5.1 but it's not compatible with your makefile since the gen_appbin.py file now uses a new parameter (app) which I think only has 3 possible values, 0, 1 and 2. This is coded into the binary so that when the App is downloading the binary it checks to see if it is valid, if it is not it gives an error. I can help you get this working. Send me a personal msg so we can talk via skype or something. Thanks a lot.

ESP07 8MBit error magic! when upgrade

Hi Dinh,

Firstly, many thank for you contribution.

I have update the Makefile.common to support 8MBit flash then try OTA update following your Readme.md instructions. But I have got following log at 74880 baudrate

  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

error magic!
backup boot failed.

user code done```

I also got this problem with original SDK 1.1, 1.2 and 1.3. Do you have any idea about this? Thank so much.

does not compile with flash size 512,1024 or 2048

I was trying to compile the ota-update example per your instructions on ubuntu 14 running in virtualbox environment, but when I try to compile with with any of 512/1024/2048 flash sizes i keep on getting errors. It only works with 4096.

The changes i made were to the makefile.common present under root folder and set the FLASH_SIZE ?= 2048.

On compiling with make OTA=1, i get a lot of errors (attached are couple of screenshots of errors generated)
error1
error2

Does your implementation not support 1024, and 2048 flash size options ( i know 512 is too out of date)?

Paritosh

CRC32 in SDK 1.30

Hello Nguyễn, SDK 1.30 is out and Espressif added a new cool feature (which is really important) to the OTA update methos. A CRC32 was added to the SDK, I believe the update methods verify the CRC32 once the full file is downloaded and it should return error if the CRC32 does not match. To calculate and modify the binary files to include the CRC32, Espressif added a python script.

It would be great if your makefile could include the extra step to add this CRC32 to the binary by using the python script from Espressif. Thanks.

OTA failed after sumlength shown

Hi Dinh,

The ota-update shown following output. I was changed INTERVAL to 120s but same output. Do you have any idea about this?

2nd boot version : 1.4(b1)
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

RT!��PHfxP Ih��|rlS

SDK version: 1.2.0
Compile time: Aug 22 2015 16:48:49
Project otaupdate with version 0.0.1
mode : sta(18:fe:34:99:31:77)
add if0
f 0, scandone
add 0
aid 1
pm open phy_2,type:2 0 0
cnt 

connected with Vinh 1102, channel 7
dhcp client start...
ip:192.168.1.58,mask:255.255.255.0,gw:192.168.1.1
Got IP, start update
system_upgrade_start
upgrade_connect
upgrade_connect_cb
GET /firmwares/55d3345febacf68431a4e757/download HTTP/1.1
Host: 103.253.146.183:3000
Connection: keep-alive
Cache-Control: no-cache
User-Agent: ESP8266
Accept: */*
Content-Type: application/json

sumlength = 257392 

 ets Jan  8 2013,rst cause:4, boot mode:(1,7)

wdt reset

example using secure server

I have tried this with your demo server and it works great! Thank you!

From looking at user_main.c and user_config.h it appears that it might be possible to use this with a secure server, perhaps SSL. Do you have an example of this or any tips on how I might change the configuration to do this?

OTA failure: GET request ignored

Thank you for the awesome library!

Unfortunately, I haven't managed to get fota to work with the ubisen server that is running locally and the fota module from this repo. On the ESP side:

FOTA client: Connect to ip 192.168.30.134:80
FOTA Client: Sent request
FOTA Client: Request timeout, close connection
FOTA Client: Disconnect
Final response: {"application":"otaupdate","last":{"version":"0.0.2","created":"2015-11-19T14:03:34.027Z","protocol":"http:","host":"192.168.30.134","path":"/firmwares/564dd6b6cc2a19680ca603f0/download"}}
    Version 0.0.2
    Host 192.168.30.134
    Path /firmwares/564dd6b6cc2a19680ca603f0/download
    Protocol http:
FOTA Client: Preparing to get firmware
Firmware client: Connect to 192.168.30.134:80
Firmware client: Connected
system_upgrade_start
upgrade_connect
upgrade_connect_cb
GET /firmwares/564dd6b6cc2a19680ca603f0/download HTTP/1.1
Host: 192.168.30.134
Connection: keep-alive
Cache-Control: no-cache
User-Agent: ESP8266
Accept: */*
Content-Type: application/json

HEAD /firmwares/564dd6b6cc2a19680ca603f0/download HTTP/1.1
Host: 192.168.30.134
Connection: close
Cache-Control: no-cache
User-Agent: ESP8266
Accept: */*
Content-Type: application/json

Firmware client: Disconnect
upgrade_check
Firmware upgrade fail

On the server side,

GET /api/otaupdate/versions/image2 200 4.599 ms - 188
HEAD /firmwares/564dd6b6cc2a19680ca603f0/download - - ms - -

So, somehow, the GET request for /firmwares/564dd6b6cc2a19680ca603f0/download is never received but the HEAD request is. Any ideas why this is the case?

Error : implicit declaration of function

First of all thank you so much for the code. I need a little bit of your help now.
I am using Eclipse IDE (Mars) with windows to develop my project. I have included all the necessary files required for your project and made all the necessary change in makefile, user_main.c and user_config.h (otaupdate project). But I am getting this error when trying to build the project

`mingw32-make.exe -f C:/Users/Ashutosh/workspace/ota/Makefile all
CC -c ./user/user_main.c -o .objs/user_main.o
In file included from ./user/user_main.c:12:0:
./user/user_main.c: In function 'connect_status_check':
c:/Espressif/ESP8266_SDK_130/include/osapi.h:42:19: error: implicit declaration of function 'os_printf_plus' [-Werror=implicit-function-declaration]
#define os_printf os_printf_plus
^
./user/user_main.c:34:5: note: in expansion of macro 'os_printf'
os_printf("Got IP, start update\n");
^
c:/Espressif/ESP8266_SDK_130/include/osapi.h:31:25: error: implicit declaration of function 'ets_timer_disarm' [-Werror=implicit-function-declaration]
#define os_timer_disarm ets_timer_disarm
^
./user/user_main.c:39:5: note: in expansion of macro 'os_timer_disarm'
os_timer_disarm(&connect_check_timer);
^
c:/Espressif/ESP8266_SDK_130/include/osapi.h:32:24: error: implicit declaration of function 'ets_timer_setfn' [-Werror=implicit-function-declaration]
#define os_timer_setfn ets_timer_setfn
^
./user/user_main.c:40:5: note: in expansion of macro 'os_timer_setfn'
os_timer_setfn(&connect_check_timer, (os_timer_func_t )connect_status_check, NULL);
^
c:/Espressif/ESP8266_SDK_130/include/osapi.h:30:31: error: implicit declaration of function 'ets_timer_arm_new' [-Werror=implicit-function-declaration]
#define os_timer_arm(a, b, c) ets_timer_arm_new(a, b, c, 1)
^
./user/user_main.c:41:5: note: in expansion of macro 'os_timer_arm'
os_timer_arm(&connect_check_timer, 5000, 0);
^
./user/user_main.c: In function 'user_init':
c:/Espressif/ESP8266_SDK_130/include/osapi.h:12:21: error: implicit declaration of function 'ets_delay_us' [-Werror=implicit-function-declaration]
#define os_delay_us ets_delay_us
^
./user/user_main.c:54:3: note: in expansion of macro 'os_delay_us'
os_delay_us(1000000);
^
./user/user_main.c:58:3: error: implicit declaration of function 'uart0_tx_buffer' [-Werror=implicit-function-declaration]
uart0_tx_buffer("\n", os_strlen("\n"));
^
In file included from ./user/user_main.c:12:0:
c:/Espressif/ESP8266_SDK_130/include/osapi.h:23:19: error: implicit declaration of function 'ets_strlen' [-Werror=implicit-function-declaration]
#define os_strlen ets_strlen
^
./user/user_main.c:58:25: note: in expansion of macro 'os_strlen'
uart0_tx_buffer("\n", os_strlen("\n"));
^
c:/Espressif/ESP8266_SDK_130/include/osapi.h:16:19: error: implicit declaration of function 'ets_memcpy' [-Werror=implicit-function-declaration]
#define os_memcpy ets_memcpy
^
./user/user_main.c:72:3: note: in expansion of macro 'os_memcpy'
os_memcpy(&stationConf.ssid, ssid, 32);
^
cc1.exe: all warnings being treated as errors
mingw32-make.exe: *
* [.objs/user_main.o] Error 1
C:/Users/Ashutosh/workspace/ota/Makefile:258: recipe for target '.objs/user_main.o' failed

14:28:57 Build Finished (took 5s.326ms)`

I tried with SDK version 1.5 and 1.3 but i get the same error every time.
I use the same header file in my other projects "osapi.h" and it works fine.
I don't know where the problem exists. Any help would be appreciated

ESP8266 BOOTLOADER

hi~
I want to download WiFi binary file to ERP8266 chip. I have WiFi binary file。I successed by PC tool
to download WiFi binary file to ERP8266 chip. Now,I want to download file by my the C language program code instead of PC tool. I have set ESP8266 chip into boot mode by GPIO。However, I don't know how to communicate with ESP8266 chip boot without ESP8266 Chip Protocol documents.
Can you give me some advice or documents?
Thank you

Firmware upgrade fail

Hi,

I can't manage to get OTA update working, I thought the issue was with my project, but even with your ota-example, it fails.

I've setup your OTA-server locally, and I'm using ota-client to register new version.

The issue occurs during firmware download, the upgrade_responsecallback is call before the file is completely downloaded.

Here's the log :

FOTA client: Connect to ip 192.168.1.14:3000
FOTA Client: Sent request
FOTA Client: Request timeout, close connection
FOTA Client: Disconnect
Final response: {"application":"otaupdate","last":{"version":"0.0.1","created":"2015-07-15T13:59:06.380Z","protocol":"http:","host":"192.168.1.14","path":"/firmwares/55a6672a6586573405757431/download"}}
    Version 0.0.1
    Host 192.168.1.14
    Path /firmwares/55a6672a6586573405757431/download
    Protocol http:
FOTA Client: We have lastest firmware (current 0.0.1 vs online 0.0.1)
FOTA client: Connect to ip 192.168.1.14:3000
FOTA Client: Sent request
FOTA Client: Request timeout, close connection
FOTA Client: Disconnect
Final response: {"application":"otaupdate","last":{"version":"0.0.2","created":"2015-07-15T16:51:55.273Z","protocol":"http:","host":"192.168.1.14","path":"/firmwares/55a68fab6586573405757437/download"}}
    Version 0.0.2
    Host 192.168.1.14
    Path /firmwares/55a68fab6586573405757437/download
    Protocol http:
FOTA Client: Preparing to get firmware
Firmware client: Connect to 192.168.1.14:3000
Firmware client: Connected
system_upgrade_start
upgrade_connect
upgrade_connect_cb
GET /firmwares/55a68fab6586573405757437/download HTTP/1.1
Host: 192.168.1.14
Connection: keep-alive
Cache-Control: no-cache
User-Agent: ESP8266
Accept: */*
Content-Type: application/json

sumlength = 257360 
upgrade file download start.
totallen = 1460
totallen = 2920
totallen = 4380
totallen = 5840
totallen = 7300
totallen = 8760
totallen = 10220
totallen = 11680
totallen = 13140
totallen = 14600
totallen = 16060
totallen = 17520
totallen = 18980
totallen = 20440
totallen = 21900
upgrade_check
Firmware upgrade fail
FOTA client: Connect to ip 192.168.1.14:3000
FOTA Client: Sent request
FOTA Client: Request timeout, close connection
FOTA Client: Disconnect
Final response: {"application":"otaupdate","last":{"version":"0.0.2","created":"2015-07-15T16:51:55.273Z","protocol":"http:","host":"192.168.1.14","path":"/firmwares/55a68fab6586573405757437/download"}}
    Version 0.0.2
    Host 192.168.1.14
    Path /firmwares/55a68fab6586573405757437/download
    Protocol http:
FOTA Client: Preparing to get firmware
Firmware client: Connect to 192.168.1.14:3000
Firmware client: Connected
system_upgrade_start
upgrade_connect
upgrade_connect_cb
GET /firmwares/55a68fab6586573405757437/download HTTP/1.1
Host: 192.168.1.14
Connection: keep-alive
Cache-Control: no-cache
User-Agent: ESP8266
Accept: */*
Content-Type: application/json

sumlength = 257360 
upgrade file download start.
totallen = 1460
totallen = 2920
totallen = 4380
totallen = 5840
totallen = 7300
totallen = 8760
totallen = 10220
totallen = 11680
totallen = 13140
totallen = 14600
totallen = 16060
totallen = 17520
totallen = 18980
upgrade_check
Firmware upgrade fail

Any idea about what's going on ?

system_upgrade_reboot() fail to reboot

Great project !!!

I success to compile and load directly examples.

I create a small OTA server with node.js to deliver the user2.bin.

The download is OK and the upgrade_check is done.

totallen = 181040
totallen = 182500
totallen = 183960
totallen = 185136
upgrade file download finished.
upgrade_check
Firmware upgrade success
reboot to use2
rm match
pm close 7 0 0/9654968
del if0
usl
sul 0 0

ets Jan 8 2013,rst cause:4, boot mode:(1,7)

wdt reset

But the program don't start without a manual hardware reset :

rll��|�l�|�l�b|����r�b�b��nn�lnn���bpllblrlp�n��lbn�|l�b��nn�l��l�nnlnr���nblp�n�r�����bn�|쎎�b��nn�l�nnlnr���n�lp�n�r������bn�|�p�b��nn�l�nnl�lnr���nblr��nblrl��n���nn����rnnn�l�b�rlbl��l������lll~rl��llln���l�lll��l��n�n�n~���n�ll��n�n���nl�|bblrl�ՁMEM CHECK FAIL!!!
�r,WIFI_INIT
mode : sta(18:fe:34:9f:88:0f)
add if0

Every time, i reboot the upload program is lunch with this message 'MEM CHECK FAIL!!!'

Have you an idea to solve this issue ?

Best Regards,

Stéphane

Build issue with mqtt & json

Hi,

Since your last commit I can't build mqtt and json examples. I'm trying to build for my ESP-12E with a 4MB flash.

⋅⋅* For mqtt it seems like it is linked to ssl, here's the log :

CC -c modules/wifi.c -o .objs/wifi.o
CC -c ./user/user_main.c -o .objs/user_main.o
CC -c ../../dev/driver/gpio16.c -o .objs/gpio16.o
CC -c ../../dev/driver/i2c_master.c -o .objs/i2c_master.o
CC -c ../../dev/driver/key.c -o .objs/key.o
CC -c ../../dev/driver/mcp3221.c -o .objs/mcp3221.o
CC -c ../../dev/driver/pwm.c -o .objs/pwm.o
CC -c ../../dev/driver/spi.c -o .objs/spi.o
CC -c ../../dev/driver/uart.c -o .objs/uart.o
CC -c ../../dev/utils/utils.c -o .objs/utils.o
CC -c ../../apps/mqtt/mqtt.c -o .objs/mqtt.o
CC -c ../../apps/mqtt/mqtt_msg.c -o .objs/mqtt_msg.o
CC -c ../../apps/mqtt/proto.c -o .objs/proto.o
CC -c ../../apps/mqtt/queue.c -o .objs/queue.o
CC -c ../../apps/mqtt/ringbuf.c -o .objs/ringbuf.o
LD -T../../esp-sdk/ld/eagle.app.v6.new.2048.ld .objs/app.out
../../esp-sdk/lib/libssl.a(ssl_loader.o): In function `ssl_obj_free':
(.irom0.text+0x4c4): undefined reference to `default_private_key_len'
../../esp-sdk/lib/libssl.a(ssl_loader.o): In function `ssl_obj_free':
(.irom0.text+0x4c8): undefined reference to `default_certificate_len'
collect2: error: ld returned 1 exit status
make: *** [.objs/app.out] Error 1

⋅⋅* The json error is a bit more problematic, as it seems the ram block is full ? Here's the log :

CC -c ./user/json_example.c -o .objs/json_example.o
CC -c ./user/user_main.c -o .objs/user_main.o
CC -c ../../dev/driver/gpio16.c -o .objs/gpio16.o
CC -c ../../dev/driver/i2c_master.c -o .objs/i2c_master.o
CC -c ../../dev/driver/key.c -o .objs/key.o
CC -c ../../dev/driver/mcp3221.c -o .objs/mcp3221.o
CC -c ../../dev/driver/pwm.c -o .objs/pwm.o
CC -c ../../dev/driver/spi.c -o .objs/spi.o
CC -c ../../dev/driver/uart.c -o .objs/uart.o
CC -c ../../dev/utils/utils.c -o .objs/utils.o
CC -c ../../apps/jsmn/jsmn.c -o .objs/jsmn.o
LD -T../../esp-sdk/ld/eagle.app.v6.new.2048.ld .objs/app.out
/opt/esp-open-sdk/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .objs/app.out section `.text' will not fit in region `iram1_0_seg'
collect2: error: ld returned 1 exit status
make: *** [.objs/app.out] Error 1

Any suggestion on what happens ?

Thanks, Jérémie.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.