Issues with custom build NodeMCU Firmware, After flashing the custom build firmware to ESP-12E module giving the following error messages - nodemcu

Flashed NodeMCU_float_0.9.6-dev_20150704 on ESP-12E module gpio,timers,file,wifi, mqtt ,tcp and udp connections are working with no issues but i tried HTTP requests like HTTP GET and POST now this time it's giving error
attempt to index global 'http' (a nil value))
HTTP GET request code
http.get("http://httpbin.org/ip", nil, function(code, data)
if (code < 0) then
print("HTTP request failed")
else
print(code, data)
end
end)
it's giving the error messages as
PANIC: unprotected error in call to Lua API (test.lua:1: attempt to
index global 'http' (a nil value))
I thought that the Firmware version i am using Flashed NodeMCU_float_0.9.6-dev_20150704 is not included HTTP module and built the custom build firmware with http,mqtt,net,node,wifi,timer,uart,file and gpio after flashing this custom build firmware contentiously sending the error message
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 29308, room 16
tail 12
chksum 0x9c
ho 0 tail 12 room 4
load 0x3ffe8000, len 2228, room 12
tail 8
chksum 0xe5
load 0x3ffe88b4, len 8, room 0
tail 8
chksum 0x86
csum 0x86
Fatal exception 0(IllegalInstructionCause):
epc1=0x40270858, epc2=0x00000000, epc3=0x00000000, excvaddr=0x4026d205, depc=0x00000000
with 748800 baud rate

You need to make sure that you also flash the esp_init_data_default.bin to its correct location.
Get Espressif NON-OS SDK 1.5.1 and extract esp_init_data_default.bin. Then flash it to address 0x7c000.
With esptool the command would be as follows:
esptool.py --port <USB-port-with-ESP8266> write_flash -fm dio -fs 32m 0x00000 <nodemcu-firmware>.bin 0x7c000 esp_init_data_default.bin
See http://nodemcu.readthedocs.io/en/master/en/flash/#upgrading-from-sdk-09x-firmware for details.

Related

Detecting ESP chip ID and MAC address through UART, but unable to flash / dump the code to detected chip

I am trying to flash code to ESP32-D0WD-V3 (revision 3) which is on custom board. I am able to get the Chip ID and MAC address of the device. But code is not flashing. I am getting the following error message:
esptool.py v3.1-dev
Serial port COM3
Connecting........__
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:dd:57:93:7f:64
Uploading stub...
A fatal error occurred: Invalid head of packet (0x65)
CMake Error at run_serial_tool.cmake:50 (message):
python C:/espidf/esp-idf/components/esptool_py/esptool/esptool.py --chip
esp32 failed.

ESP8266: Timed out waiting for packet header

Hi somebody who can link an beginners guide for ESP 8266 on arduino uno? Or help me with this error :
Arduino:1.8.9 (Windows 10), Kort:"Generic ESP8266 Module, 80 MHz,
Flash, Legacy (new can return nullptr), All SSL ciphers (most
compatible), dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 4MB
(FS:3MB OTA:~512KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory,
Disabled, None, Only Sketch, 115200"
Executable segment sizes:
IROM : 227372 - code in flash (default or
ICACHE_FLASH_ATTR)
IRAM : 26368 / 32768 - code in IRAM (ICACHE_RAM_ATTR,
ISRs...)
DATA : 1252 ) - initialized variables (global, static) in
RAM/HEAP
RODATA : 672 ) / 81920 - constants (global, static) in
RAM/HEAP
BSS : 24848 ) - zeroed variables (global, static) in
RAM/HEAP
Sketch uses 255664 bytes (24%) of program storage space. Maximum is
1044464 bytes. Global variables use 26772 bytes (32%) of dynamic
memory, leaving 55148 bytes for local variables. Maximum is 81920
bytes. esptool.py v2.8 Serial port COM3
Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last): File
"C:\Users\Elev\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3/tools/upload.py",
line 65, in
esptool.main(cmdline) File "C:/Users/Elev/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py",
line 2890, in main
esp.connect(args.before) File "C:/Users/Elev/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py",
line 483, in connect
raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error)) esptool.FatalError: Failed to connect to ESP8266: Timed
out waiting for packet header esptool.FatalError: Failed to connect to
ESP8266: Timed out waiting for packet header
_
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
If still. facing the issue try these settings
To Program Using Arduino Nano
Pin setup in nano:
Connect Nano GND pin to RST pin (ground to reset)
Pin setup in ESP-01
Connect GND to GPIO-0 (Initiates programming mode)
Connect VCC to CH_PD/CH_EN (Power pin to Chip Enable)
Pin setup between nano and ESP-01
Nano to ESP-01
Connect the VCC to VCC and CH_PD/CH_EN
Connect GND to GND and GPIO-0
Connect Tx to Tx
Connect Rx to Rx

ESP32 WROVER-B programming issue

trying to program ESP32-WROVER-B it stops just after start, I have connected button EN (on pin EN) and tried various combinations but it didn't help.
Also tried to change baudrate, fix flash size to 4MB but still nothing.
This is the output:
$ make -j4 flash monitor
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
App "websocket_server" version: b4b6984-dirty
Python requirements from C:/ESP32/esp-idf/requirements.txt are satisfied.
Flashing binaries to serial port COM8 (app at offset 0x10000)...
esptool.py v2.6-beta1
Serial port COM8
Connecting........_____..
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 24:6f:28:4c:9b:4c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 230400
Changed.
Configuring flash size...
Compressed 24240 bytes to 14517...
Wrote 24240 bytes (14517 compressed) at 0x00001000 in 0.7 seconds (effective 295.4 kbit/s)...
A fatal error occurred: Timed out waiting for packet header
make: *** [/c/ESP32/esp-idf/components/esptool_py/Makefile.projbuild:63: flash] Error 2
Any hint?
In case your ESP32 looks like this one you need to keep pressed the RST button while uploading the new code to avoid that error.
Hope this helps you!

Yocto Boot Partition error (Intel Edison)

I was trying to resize partitions of Intel Edison which runs on Yocto system. I destroyed partition 1 somehow. So when I reboot system it loops forever to boot the system correctly. So, interrupted boot sequence and checked for partitions to see what is wrong. As you can see down below partitions start from number two not one! According to error from bootloader it searches for part 1 but cannot find . So how can I add/ create/ repair manually partition 1 to recover system?
boot > printenv partitions
partitions=uuid_disk=${uuid_disk};name=u-boot0,start=1MiB,size=2MiB,uuid=${uuid_uboot0};name=u-boot-env0,size=1MiB,uuid=${uuid_uboot_env0};name=u-boot1,size=2MiB,uuid=${uuid_uboot1};name=u-boot-env1,size=1MiB,uuid=${uuid_uboot_env1};name=factory,size=1MiB,uuid=${uuid_factory};name=panic,size=24MiB,uuid=${uuid_panic};name=boot,size=32MiB,uuid=${uuid_boot};name=rootfs,size=512MiB,uuid=${uuid_rootfs};name=update,size=768MiB,uuid=${uuid_update};name=home,size=-,uuid=${uuid_home};
boot > mmc part
Partition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
2 16 7634928 00000000-02 83
Boot Sequence
******************************
PSH KERNEL VERSION: b0182727
WR: 20104000
******************************
SCU IPC: 0x800000d0 0xfffce92c
PSH miaHOB version: TNG.B0.VVBD.0000000c
microkernel built 23:15:13 Apr 24 2014
******* PSH loader *******
PCM page cache size = 192 KB
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000
pageStoreSize(IMR Size) = 0x00080000
*** Ready to receive application ***
U-Boot 2014.04 (Oct 14 2014 - 15:19:04)
Watchdog enabled
DRAM: 980.6 MiB
MMC: tangier_sdhci: 0
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
Target:blank
Partitioning already done...
Flashing already done...
**dfu_fill_entity_mmc: could not find partition #1 on mmc device #0!
ERROR: DFU entities configuration failed!**
at drivers/dfu/dfu.c:71/dfu_init_env_entities()
dfu - Device Firmware Upgrade
Usage:
dfu <USB_controller> <interface> <dev> [list|timeout]
- device firmware upgrade via <USB_controller>
on device <dev>, attached to interface
<interface>
[list] - list available alt settings
[timeout] - specify inactivity timeout in sec, doesn't work whit list
** Invalid partition 7 **
Error: Invalid Boot Flag (found 0xffef, expected 0xaa55)
## Kernel loading failed ...
zboot - Boot bzImage
Usage:
zboot [addr] [size] [initrd addr] [initrd size]
addr - The optional starting address of the bzimage.
If not set it defaults to the environment
variable "fileaddr".
size - The optional size of the bzimage. Defaults to
zero.
initrd addr - The address of the initrd image to use, if any.
initrd size - The size of the initrd image to use, if any.
Unknown boot mode: boot
Saving Environment to MMC...
Writing to MMC(0)... done
Resetting to default boot mode and reboot...
resetting ...
I solved that problem myself. After interrupting boot sequence use gpt command to add new partition to mmc. Then, system boots correctly.

error during transfer issue when initial mmc card in U-Boot

how should i debug the error during transfer when i init mmc card by send uboot command: mmc rescan ? this bug only when i init mmc card, SD card won't happen. Though this warning happened, but the response looks like OK.
thanks
mmc_send_cmd: error during transfer: 0x00408001
mmc_send_cmd: error during transfer: 0x00208001
mmc_send_cmd: error during transfer: 0x00108001
=================================================================================
CURR STATE:4
CMD_SEND:8
ARG 0x00000000
FLAG 0
mmc_send_cmd: error during transfer: 0x00208001
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:6
ARG 0x03B70000
FLAG 0
MMC_RSP_R1b 0x7FFBF590
CMD_SEND:13
ARG 0x00000000
FLAG 0
MMC_RSP_R1,5,6,7 0x00000900
CURR STATE:4
CMD_SEND:16
ARG 0x00000200
FLAG 0
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:17
ARG 0x00000000
FLAG 0
mmc_send_cmd: error during transfer: 0x00108001
MMC_RSP_R1,5,6,7 0x00000900
ORIGEN #
I got an answer after survey more webpages,
error during transfer means that time-out error happened while read from storage.
1) For check H/W side
Can you try again after re-connect the CPU board?
Connection of CPU board can be loosen during delivery.
2) For check S/W side
I'd like to ask for make sure, did you use our bootloader?
Previous version of Linaro's bootloader can happen those thing depend on situation.
If you still have problem then it might be eMMC problem.
more over, this error code(TIMEOUT) is -19

Resources