ESP8266 using different flash sizes – FOTA and Download tool

Which goes where – when using a bootloader for FOTA.

The files:

  • master_device_key.bin –  Obtained from Espressif Cloud
  • esp_init_data_default.bin – Stores default RF parameter values
  • boot.bin – bootloader
  • user1.bin and user2.bin – user firmware
  • blank.bin – blank settings , flash to get default parameters
  1. 512KB
  • master_device_key.bin 0x3E000
  • esp_init_data_default.bin 0x7C000
  • blank.bin 0x7E000
  • boot.bin 0x00000
  • user1.bin 0x01000
  • user2.bin 0x41000
  1. 1024KB Flash
  • master_device_key.bin 0x3E000
  • esp_init_data_default.bin 0xFC000
  • blank.bin 0xFE000
  • boot.bin 0x00000
  • user1.bin 0x01000
  • user2.bin 0x81000
  1. 2048KB Flash
  • master_device_key.bin 0x3E000
  • esp_init_data_default.bin 0x1FC000
  • blank.bin 0x1FE000
  • boot.bin 0x00000
  • user1.bin 0x01000
  • user2.bin 0x81000
  1. 4096KB Flash
  • master_device_key.bin 0x3E000
  • esp_init_data_default.bin 0x3FC000
  • blank.bin 0x3FE000
  • boot.bin 0x00000
  • user1.bin 0x01000
  • user2.bin 0x81000

 

Olimex ESP8266 module – MOD-WIFI-ESP8266-DEV

I need a bigger flash and a breadboard friendly board. Quick research lead to the following variants, beside soldering a bigger flash on the ESP-XX series modules.

  1. NodeMCU board’s that have bigger flash and fit on a breadboard but have regulators and usb 2 serial on them.
  2. ESP-XX module with adapter,  don’t like .
  3. MOD-WIFI-ESP8266-DEV

And the winner is Olimex’s – MOD-WIFI-ESP8266-DEV .

i got some of them:

oli6

ESP8266 tcn75a driver

Hi,

A simple i2c driver for the Microchip’s TCN75A thermometer – supports up to 8 thermometers. Driver works in one shot mode which is suitable for battery powered operations. The chip is with quite good specs for its price.

Code at github esp_i2c_tcn75a .

Usage:  checkout user/user_main.c for example usage.

Enjoy!

73

 

esp8266 UDP debugging

After a lots of lots of wasted hours  debugging an I2C driver it came out that the noise from the connected cheep USB2TTL converter is way too much. Would have lost months without the help of the new DS1054z scope i’ve got.

So i came up with this – a simple UDP debugging.

Simple socket to send udp messages.

dbg

Call dbg_udp_start(0) and you are ready to go. If you prefer not to flood your LAN with debug messages broadcasts then instead of 0 provide your workstation IP address.

Rigol DS1054Z

I’ve got a new tool at the LAB!

The Box: rigol_ds1054z_box

 

 

The Tool:  rigol_ds1054z_web

 

Having an oscilloscope is just priceless. You may need it rarely but there are times when you are just lost blind  without it. The video lists all you should now about it and a bit more

If you are considering to get one and you are in EU. I can recommend Silcon.cz – you will get a nice service there.

Three/Mono Phase Asynchronous Motor Simulator

When repairing stuff with a motor  the first question is:

“Is it the motor or is it the board that failed?”

For a recent Inverter Air Conditioner  board repair the following tool helped to answer that question.

 

sch

Simulate the circuit

The circuit can act as Induction Motor aka asynchronous motor .

Inverter Air Conditioners which use AC motors take the 220V from the grid and turn them into about 150V three phase AC which drives the motor.

ESP8266 – easy interrupts

While working on a current project i’ve faced an issue with code reuse. Espressif sdk allows only one interrupt handler for all GPIOs. That’s fine for monolithic code but since we like modular code a dispatcher comes handy.

The little inconvenience i’ve had was like this. I wanted to use the drivers/key.c code but it does use the data argument , so i’ve had to modify it to use a global variable. So i can call it from my own interrupt handler. And that is ugly.

KiCad change fields visibility utility

$ open devlog

I’ve back imported footprints for a .cmp file and I’ve misunderstood  kicad’s question about the imported footprints visibility, so all went visible.

And surprise, you can not edit visibility for all fields at once.

So  little utility was born – fixvis.

Usage is pretty simple:
./fixvis file.sch fieldid newval
where fieldid is:
0 - Reference
1 - Value
2 - Footprint
3 - Datasheet
4+ - custom
newval: 0000 = visible, 0001 = hidden

Apache websockets with proxy_wstunnel and mosquitto

Spend last weekend trying to make apache with proxy_wstunnel to work.
The solution recommended is to add this in the apache config:


ProxyRequests off

ProxyPass /mqtt ws://127.0.0.1:8082

ProxyPassReverse /mqtt ws://127.0.0.1:8082

But no matter what it is a no go. So, where is the problem?

It’s the libwebsockets it doesn’t understand custom http headers X-… but apache adds some.

To add support for them in the file lextable-strings.h append before the blank string :


“x-forwarded-server”,

“x-forwarded-for”,

“x-forwarded-host”,