Skip to content

Instantly share code, notes, and snippets.

@dnc40085
dnc40085 / init.lua
Created July 17, 2016 02:09
event monitor code
wifi.eventmon.register(wifi.eventmon.STA_CONNECTED, function(T)
print("\n\tSTA - CONNECTED".."\n\tSSID: "..T.SSID.."\n\tBSSID: "..
T.BSSID.."\n\tChannel: "..T.channel.."\n")
end)
wifi.eventmon.register(wifi.eventmon.STA_DISCONNECTED, function(T)
print("\n\tSTA - DISCONNECTED".."\n\tSSID: "..T.SSID.."\n\tBSSID: "..
T.BSSID.."\n\treason: "..T.reason.."\n")
end)
@dnc40085
dnc40085 / wifi_set_event_handler_cb.asm
Last active February 21, 2016 18:04
assembler code for esp8266 function wifi_set_event_handler from ESP8266_NONOS_SDK_V1.5.1_16_01_08.zip
40213fd0 <wifi_set_event_handler_cb>:
40213fd0: fffd31 l32r a3, 40213fc4 <wifi_set_status_led_output_level+0x48>
40213fd3: f0c112 addi a1, a1, -16
40213fd6: 0129 s32i.n a2, a1, 0
40213fd8: 1109 s32i.n a0, a1, 4
40213fda: 000332 l8ui a3, a3, 0
40213fdd: fffa01 l32r a0, 40213fc8 <wifi_set_status_led_output_level+0x4c>
40213fe0: 23ec bnez.n a3, 40214006 <wifi_set_event_handler_cb+0x36>
40213fe2: fffa21 l32r a2, 40213fcc <wifi_set_status_led_output_level+0x50>
40213fe5: 531c movi.n a3, 21
@dnc40085
dnc40085 / 0_readme.txt
Last active October 27, 2019 21:02
FlashMod example
Flashmod was created by dpwhittaker (http://www.esp8266.com/viewtopic.php?f=19&t=1940)
Instructions for this example:
1. Upload "flashmod.lua" to your ESP8266.
2. Run flashmod.lua with "dofile("flashmod.lua")", this will create the file "flash_flashMod.lc" then it will delete "flashmod.lua" since it is no longer needed.
3. Upload init.lua then restart your ESP8266.