Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
an-erd
@an-erd
Hi, is there a way to point the timer callback function to a class function. (I found ways to do it with interrupts and with gotIpEventHandler_ = WiFi.onStationModeGotIP(), but this last piece for os_timer_setfn(). Thanks!
brutzler
@brutzler

@bertmelis
back to serial swap:
I have connected my IR-R/W-Unit to TXD2/RXD2 (IO15/IO13).

  #define ITFserial Serial
......
   ITFserial.begin(9600);    
   Serial.swap();

thats IMHO all code I need.
BUT. its not working proper. If I disconnect the TX/RX wires, start the ESP and connect the two wires its working. With fully connected IR-unit, the ESP fails to start, and the IR-TX-LED is always ON.
Something, I do not see?

brutzler
@brutzler
Additional: With connected device on TXD2/RXD2 I am not even able to make serial download :-(
Is GPIO13/15 needed for download or booting?
Bert Melis
@bertmelis
I'll try to figure out my steps tonight...
Give me an hour and I'll be back
Remark: instead of defining your serial, you could also make it a hardwareserial pointer or reference. That way, you can use your own name and still assign the seriazl interface you like.
hreintke
@hreintke
@an-erd see esp8266/Arduino#2738
Bert Melis
@bertmelis
@brutzler It'll be for tomorrow (or even later) as I did made some changes to the firmware I wanted to test with and now it doesn't work anymore :worried: :cry:
brutzler
@brutzler
Remark: instead of defining your serial, you could also make it a hardwareserial pointer or reference. That way, you can use your own name and still assign the seriazl interface you like.
You have an example for me?
brutzler
@brutzler
Think I figured out the problem. On the D1 mini (or on a NodeMCU too) GPIO15 is pulled down to GND with a 12k resistor.
My IR-Unit pulls TXD up to Vcc.
Hmmm...just thinking about SoftwareSerial. Never tried on an ESP. Any chance for working? only need 9600Baud.
Mike Kranidis
@mikekgr
Dear Friends, I have a problem that it drive me mad! Tested In several ESP8266 Based on ESP-12F modules all the same problem, I running my sketch that is Arduino ESP8266 Core 2.3.0 ( also tested with the git recent version, same problem... ) based mostly used Blynk 0.4.7 library. When I running the module(s) at my home using TpLink 4G router M7350 UN then keeping printing the ESP Free Heap this memory always auto reduced without a reason... WITH Exactly the same hardware/software , when I move the setup to my works WiFi THEN I HAVE NOT any ESP Free Heap memory "Auto" reduction... I can suppose that something is wrong in the TCP/IP stack but I am not software engineer. Please try to help me. The important point is that with all the same except the routers the behaviour changes dramatically from working OK ( when at work WiFi ) to very fast heap auto reduction ( when at home with 4G router ).
Bert Melis
@bertmelis
@brutzler: softwareserial should work, it isn't capable of setting data/parity/stop bit though.
an-erd
@an-erd
@hreintke Thanks!
brutzler
@brutzler
Is SerialEvent() atm working on an ESP?
oh, sorry. SerialEvent is not implemented
but it is hardly of any use. It's just a function call at every loop(). It is NOT interrupt-based or something async-like.
Benjamin Burns
@benjamincburns
Are there people who work full time on esp8266/Arduino, or is it entirely a part-time/volunteer effort?
Also if ESP8266 core is LGPL, I assume that everything depending on esp8266/Arduino must be made open source under LGPL or another compatible license, correct? That is, it'd seem there's likely no way to dynamically link to only that component
Clemens Kirchgatterer
@everslick
but providing object files fulfils the LPGL requirement for being able to relink the binary with newer versions of the COre.
Bert Melis
@bertmelis
It's only needed to open the source when you're distributing your code. If you keep it private you don't have to do anything.
Clemens Kirchgatterer
@everslick
@bertmelis no need to provide source code even when distributeing
it is LGPL and not GPL
Bert Melis
@bertmelis
yeah, you "need to do everything that enables the user to replace/improve/... the LGPL code"
Clemens Kirchgatterer
@everslick
exactly
if you hand over the object files and build script together with the binary all is good.
Mike Kranidis
@mikekgr

Any kind soulmate to help me?

Dear Friends, I have a problem that it drive me mad! Tested In several ESP8266 Based on ESP-12F modules all the same problem, I running my sketch that is Arduino ESP8266 Core 2.3.0 ( also tested with the git recent version, same problem... ) based mostly used Blynk 0.4.7 library. When I running the module(s) at my home using TpLink 4G router M7350 UN then keeping printing the ESP Free Heap this memory always auto reduced without a reason... WITH Exactly the same hardware/software , when I move the setup to my works WiFi THEN I HAVE NOT any ESP Free Heap memory "Auto" reduction... I can suppose that something is wrong in the TCP/IP stack but I am not software engineer. Please try to help me. The important point is that with all the same except the routers the behaviour changes dramatically from working OK ( when at work WiFi ) to very fast heap auto reduction ( when at home with 4G router ).

Bert Melis
@bertmelis
I need some help with debugging my library.
I always have an exception 28 when running my code
the stackdump doesn't give my any clues
I was thinking of using GDB, but my lib uses the Serial port so I don't think I can use this debugging tool
any suggestions?
Bert Melis
@bertmelis
Suppose I use a wifiserver to print debug messages, will the stackdump/GDB-messages also be sent via the wifiserver? Or will the esp be crashed before it is able to send the messages?
Bert Melis
@bertmelis
Meanwhile, I'll try to implement 8E2 on the softwareserial so I can free UART0
Bert Melis
@bertmelis
nevermid folks, I already found the error. I did a front() on a queue which was just emptied.
Meanwhile I did manage to get the softwareserial to speak 8E2 though (speaks != understand, no rx data is discarted on false parity check). (although I did just a bit more than merging from different forks)
Bert Melis
@bertmelis
for those who are interested in softwareserial with E/N/O parity and 1 or 2 stop bits: https://github.com/bertmelis/espsoftwareserial
Bert Melis
@bertmelis
Will make pull request soon, after testing.
brutzler
@brutzler
grafik.png

Hi, need some help/ideas...
Have a Wemos D1. Using Serial1(TX1) for debug messages. Code is reduced for testing to only these two lines in setup()

   Serial1.begin(115200);
   Serial1.println("---------------- PROGRAMMSTART ---------------------");

The ESP is powered by the USB-cable. When I power up the ESP (plug in the USB-cable in the USB-Port of my computer) the ESP is starting and I get the "PROGRAMMSTART-message". But after this there are some funny characters sent out to Serial1, and the ESP is freezing. A screenshot of the characters is in the top of this post.
After flashing, or after pressing the reset-button ESP is working fine.
Any ideas? thx in advance

an-erd
@an-erd
I experience some issues when moving from using wifi.begin() (with one single fixed SSID/pwd) to wifiMulti.run() with 3 configured WLANs. if I don't touch the rotary encoder (handled by interrupts) it is working, but when using the rotary encoder I get an exception. In the stack trace the top line shows an interrupt_handle in /core_esp8266_wiring_digital.c . I'm not that familiar in reading the stack traces an would like to ask for your support.
Do you have experiences with WiFiMulti and interrupts? Any other hints?
Bert Melis
@bertmelis
which exception you you have? how are you handling the interrupts? (long ISR or flag + handle in main loop?)
an-erd
@an-erd
@bertmelis The interrupt is essentially checking millis() against last call time stamp (for rebounce threshold) and then setting a flag to handle in loop(), so it's pretty short.
Bert Melis
@bertmelis
ok, and what's the exception code you're facing?
an-erd
@an-erd
I receive an exception (0). Although not measured it seems that WiFiMulti.run() takes to long. Also I found in the stack trace, that some functions like wifi_param_save_protect_with_check(), ESP8266WiFiSTAClass::begin(), ... appear twice, although called only once and are completed before the next call (checked with debug statements).
Please find the stack trace attached:
Decoding 49 results
0x40106402: interrupt_handler at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_wiring_digital.c line 128
0x401064fa: __digitalRead at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_wiring_digital.c line 95
0x401063c8: interrupt_handler at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_wiring_digital.c line 122
0x4024e130: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x401063c8: interrupt_handler at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_wiring_digital.c line 122
0x401063c8: interrupt_handler at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_wiring_digital.c line 122
0x402015a0: twi_delay at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_si2c.c line 81
0x402016ce: twi_write_bit at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_si2c.c line 81
0x401064fa: __digitalRead at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_wiring_digital.c line 95
0x401064fa: __digitalRead at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_wiring_digital.c line 95
0x401064fa: __digitalRead at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_wiring_digital.c line 95
0x40210466: ROTENC::isrInt0() at C:\Users\AKAEM\AppData\Local\Temp\VMBuilds\spBox\esp8266com_huzzah\Debug/rotenc.cpp line 67
0x40216e03: std::_Function_handler    (ROTENC*)> >::_M_invoke(std::_Any_data const&) at C:\Users\AKAEM\AppData\Local\Temp\VMBuilds\spBox\esp8266com_huzzah\Debug/rotenc.cpp line 67
0x401052a3: flash_gd25q32c_read_status at ?? line ?
0x4024e130: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x40105514: spi_flash_erase_sector at ?? line ?
0x40106788: pvPortZalloc at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/heap.c line 68
0x402411f8: wifi_param_save_protect_with_check at ?? line ?
0x402411e1: wifi_param_save_protect_with_check at ?? line ?
0x402412cb: system_param_save_with_protect at ?? line ?
0x402412ae: system_param_save_with_protect at ?? line ?
0x402415fd: wifi_station_ap_number_set at ?? line ?
0x402415b0: wifi_station_ap_number_set at ?? line ?
0x40207a68: ESP8266WiFiSTAClass::begin(char const*, char const*, int, unsigned char const*, bool) at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.cpp line 516
0x402079a3: ESP8266WiFiSTAClass::begin(char const*, char const*, int, unsigned char const*, bool) at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.cpp line 516
0x4020d7b4: EEPROMClass::commit() at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\libraries\EEPROM/EEPROM.cpp line 132
0x402172f0: Print::write(unsigned char const*, unsigned int) at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/Print.cpp line 38
0x40214bd9: Print::write(char const*) at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/Print.cpp line 211
0x40240f1a: wifi_get_opmode at ?? line ?
0x4024203b: wifi_station_get_connect_status at ?? line ?
0x40214d8c: Print::println() at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/Print.cpp line 211
0x40103aae: lmacProcessCollision at ?? line ?
0x4021438c: esp_yield at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_main.cpp line 57
0x40207b08: ESP8266WiFiSTAClass::begin(char*, char*, int, unsigned char const*, bool) at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.cpp line 516
0x4020738f: ESP8266WiFiMulti::run(WifiAPProfile_t) at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\libraries\ESP8266WiFi\src/ESP8266WiFiMulti.cpp line 124
0x40205e81: LCDMenuLib::doScroll() at C:\Users
an-erd
@an-erd
Sorry, the last lines were missing, please find the missing part...
0x40205e81: LCDMenuLib::doScroll() at C:\Users\AKAEM\Documents\Arduino\libraries\LCDMenuLib\src/LCDMenuLib.cpp line 479
0x402110d7: SPBOX_COM::enableWlan() at C:\Users\AKAEM\AppData\Local\Temp\VMBuilds\spBox\esp8266com_huzzah\Debug/spbox_com.cpp line 234
0x40211159: SPBOX_COM::checkWlan() at C:\Users\AKAEM\AppData\Local\Temp\VMBuilds\spBox\esp8266com_huzzah\Debug/spbox_com.cpp line 234
0x40205176: loop at C:\Users\AKAEM\AppData\Local\Temp\VMBuilds\spBox\esp8266com_huzzah\Debug/spBox.cpp line 1422
0x402143d8: loop_wrapper at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_main.cpp line 57
0x4010070c: cont_norm at C:\Users\AKAEM\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/cont.S line 109