Esp8266 auth: Unterschied zwischen den Versionen
(Die Seite wurde neu angelegt: „==WHAT== ESP 8266 based authentication system used in various things @ metalab.at Source code is found on [https://github.com/Metalab/esp8266_auth github] =…“) |
Pete (Diskussion | Beiträge) |
||
(15 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt) | |||
Zeile 8: | Zeile 8: | ||
* Scannerroom | * Scannerroom | ||
* Elektronikkammerl | * Elektronikkammerl | ||
* MetaFunk Shack | |||
===Command Features=== | |||
* add User IButton via learning Mode | |||
* List saved Users | |||
* delete Users <-- <b>NEW</b> | |||
Zeile 14: | Zeile 19: | ||
Take an ESP8266 module | Take an ESP8266 module | ||
Flash the NodeMCU LUA firmware [https://github.com/nodemcu/nodemcu-firmware github] | Flash the NodeMCU LUA firmware [https://github.com/nodemcu/nodemcu-firmware github] -- actual working precompiled [[Datei:ESP8266_firmware.zip]] | ||
old precompiled: [[Datei:Esp8266-firmware.zip]] | |||
Upload the files. | Upload the files. | ||
==How to flash firmware== | |||
Use esptool in python to flash firmware on esp. <br> | |||
Press flash button and reset and then release first reset button to get in flash mode <br> | |||
0) <b>erase flash</b> | |||
<code>./esptool.py --port /dev/tty<SERIALPORT> erase_flash</code> | |||
1) <b>flash the init data</b> | |||
Following from https://nodemcu.readthedocs.io/en/master/en/flash/ : <br> | |||
If you need to customize init data then first download the Espressif SDK 2.0.0 and extract esp_init_data_default.bin. Then flash that file just like you'd flash the firmware. The correct address for the init data depends on the capacity of the flash chip. | |||
0x7c000 for 512 kB, modules like most ESP-01, -03, -07 etc. | |||
0xfc000 for 1 MB, modules like ESP8285, PSF-A85, some ESP-01, -03 etc. | |||
0x1fc000 for 2 MB | |||
0x3fc000 for 4 MB, modules like ESP-12E, NodeMCU devkit 1.0, WeMos D1 mini | |||
./esptool.py -p /dev/tty<SERIALPORT> write_flash -fm dio 0x00000 <binaryname>.bin | |||
Example: | |||
./esptool.py -p /dev/ttyUSB0 write_flash -fm dio 0x3fc000 esp_init_data_default.bin | |||
2) <b>flash actual working firmware:</b> <br> | |||
If you build your firmware with the cloud builder or the Docker image, or any other method that produces a combined binary, then you can flash that file directly to address 0x00000. | |||
Flashing the nodemcu cloud build on 4MB flash ESP8266 : <br> | |||
<code> ./esptool.py -p /dev/tty<SERIALPORT> write_flash -fm dio 0x00000 <binaryname>.bin</code> | |||
Flashing the nodemcu cloud build on 512 kByte flash ESP8266 : <br> | |||
<code> ./esptool.py -p /dev/tty<SERIALPORT> write_flash -fm qio 0x00000 <binaryname>.bin</code> | |||
Also check out README file in zip for more information. | |||
<b>Old firmware:</b> <br> | |||
Flash command für precompiled Firmware oben <br> | |||
<code> esptool.py -p /dev/tty<SERIALPORT> write_flash 0x00000 0x00000.bin 0x10000 0x10000.bin</code> | |||
or with newer versions of esptool (e.g. 0.4.6 on debian): <code>esptool -ca 0x00000 -cf 0x00000.bin -ca 0x10000 -cf 0x10000.bin</code> | |||
== How to flash .lua files == | |||
<b>For people who enjoy GUIs:</b> <br> | |||
Use [https://esp8266.ru/esplorer/ ESPlorer] tool. Its user friendly and powerful with integrated editor and lots of commands. <br> | |||
Supports NodeMCU and MicroPython. <br> | |||
Needs Java and works on all major PC Plattforms | |||
<b>If you like commandline tools:</b> <br> | |||
Use for example the [https://github.com/kmpm/nodemcu-uploader nodemcu-uploader]: | |||
<code>nodemcu-uploader -B 115200 upload *.lua</code> | |||
Beware: The tool will not tell you that lines are too long and can not be uploaded but instead throw some error messages you do not understand and exit... The solution is to remove the comments at the beginning of the file before uploading or split them up. | |||
==Todo== | ==Todo== |
Aktuelle Version vom 13. Januar 2018, 18:58 Uhr
WHAT
ESP 8266 based authentication system used in various things @ metalab.at
Source code is found on github
What exactly?
- Scannerroom
- Elektronikkammerl
- MetaFunk Shack
Command Features
- add User IButton via learning Mode
- List saved Users
- delete Users <-- NEW
How
Take an ESP8266 module
Flash the NodeMCU LUA firmware github -- actual working precompiled Datei:ESP8266 firmware.zip
old precompiled: Datei:Esp8266-firmware.zip
Upload the files.
How to flash firmware
Use esptool in python to flash firmware on esp.
Press flash button and reset and then release first reset button to get in flash mode
0) erase flash
./esptool.py --port /dev/tty<SERIALPORT> erase_flash
1) flash the init data
Following from https://nodemcu.readthedocs.io/en/master/en/flash/ :
If you need to customize init data then first download the Espressif SDK 2.0.0 and extract esp_init_data_default.bin. Then flash that file just like you'd flash the firmware. The correct address for the init data depends on the capacity of the flash chip.
0x7c000 for 512 kB, modules like most ESP-01, -03, -07 etc. 0xfc000 for 1 MB, modules like ESP8285, PSF-A85, some ESP-01, -03 etc. 0x1fc000 for 2 MB 0x3fc000 for 4 MB, modules like ESP-12E, NodeMCU devkit 1.0, WeMos D1 mini ./esptool.py -p /dev/tty<SERIALPORT> write_flash -fm dio 0x00000 <binaryname>.bin Example: ./esptool.py -p /dev/ttyUSB0 write_flash -fm dio 0x3fc000 esp_init_data_default.bin
2) flash actual working firmware:
If you build your firmware with the cloud builder or the Docker image, or any other method that produces a combined binary, then you can flash that file directly to address 0x00000.
Flashing the nodemcu cloud build on 4MB flash ESP8266 :
./esptool.py -p /dev/tty<SERIALPORT> write_flash -fm dio 0x00000 <binaryname>.bin
Flashing the nodemcu cloud build on 512 kByte flash ESP8266 :
./esptool.py -p /dev/tty<SERIALPORT> write_flash -fm qio 0x00000 <binaryname>.bin
Also check out README file in zip for more information.
Old firmware:
Flash command für precompiled Firmware oben
esptool.py -p /dev/tty<SERIALPORT> write_flash 0x00000 0x00000.bin 0x10000 0x10000.bin
or with newer versions of esptool (e.g. 0.4.6 on debian): esptool -ca 0x00000 -cf 0x00000.bin -ca 0x10000 -cf 0x10000.bin
How to flash .lua files
For people who enjoy GUIs:
Use ESPlorer tool. Its user friendly and powerful with integrated editor and lots of commands.
Supports NodeMCU and MicroPython.
Needs Java and works on all major PC Plattforms
If you like commandline tools:
Use for example the nodemcu-uploader:
nodemcu-uploader -B 115200 upload *.lua
Beware: The tool will not tell you that lines are too long and can not be uploaded but instead throw some error messages you do not understand and exit... The solution is to remove the comments at the beginning of the file before uploading or split them up.
Todo
- Add schematics of current setups for elektrinkkammerl and scannerraum
- Add more doku on how to flash and import the scripts
- Design a breakoutboard with standardized connectors for I-button, and relays