These are chat archives for esp8266/Arduino

30th
Aug 2018
den har
@denman0000_gitlab
Aug 30 2018 02:35
@diraniyoussef wow hello .. thank you so much for the reply
@diraniyoussef I really appreciate the reply and the info ... My problem/solution is probably so simple it's probably laughable for a good coder .. I just cant see the wood from the trees at the moment
den har
@denman0000_gitlab
Aug 30 2018 02:41
@diraniyoussef .. perhaps you could take a look at the question i posed on the ESP8266 community forum .. I'm maybe going about things all wrong :-( ...my problem seems to be on the server side.
@diraniyoussef I would love to have a chat with you sometime if you have the time ... and if you need a tester or helo with your stuff I will happily help anytime
@diraniyoussef here is the post .. please forgive the awkward and newbie long post .. I just didn't know what audience I was addressing and now I'm feeling like I shouldn't have posted the question but I'm desperate to get this working so I can complete other parts of the project. https://www.esp8266.com/viewtopic.php?f=6&t=18437
den har
@denman0000_gitlab
Aug 30 2018 02:53
@diraniyoussef my weakness has always been taking the captured data buffer and putting into different formats for example from int to char etc ... and hence the reason for the post ... I have also since noted that maybe port 80 is not the one to use BUT i only want to send and/or receive a very small amount of data so i thought why not use for 80 like the client and server examples use for http
@diraniyoussef as I mentioned .. if you have some time to chat sometime that would be most appreciated indeed
diraniyoussef
@diraniyoussef
Aug 30 2018 08:13
@denman0000_gitlab I made a private chatting room for us
frippe75
@frippe75
Aug 30 2018 10:48

Trying to use the RTC memory to store some data across reboots via deepsleep.
I have tried a few example sketches without luck. I check the reset reason and if it'a a powerup I initialize a few integers to zero which are part of a "rtc struct" typedef.
Write them via system_rtc_mem_write and go to deepsleep.
Next boot (reason=rtc-reset) I read it back via system_rtc_mem_read and increment one of the integer being a counter.
Printing the counter to serial I see it's not my expected 1 but rather 841492654 and next boot it's incremented to 841492655, 841492656 and so on.
Feels like im writing across bucket-boundaries or similar. Tried starting at bucket 64 but moved to 65....

Any ideas??

frippe75
@frippe75
Aug 30 2018 11:46
Tested the RTCUserMemory.ino part of the core repo.. it seems to work... Switching to rtcUserMemoryRead/rtcUserMemoryWrite as a start....
frippe75
@frippe75
Aug 30 2018 11:56
And so it works..... Sorry, misdirected question....
Bert Melis
@bertmelis
Aug 30 2018 19:33
I'm struggling to get wifi events going. My onStationModeConnected-handler just won't fire while I do see the device showing up on the router
what are my options to debug?
I registered as follows: WiFi.onStationModeConnected(std::bind(&ConnectionClass::_onWiFiConnected, this, std::placeholders::_1));
but also onStationModeGotIP doesn't fire
Develo
@devyte
Aug 30 2018 19:38
  StaConnectedEventHandler = WiFi.onStationModeConnected(
      [](const WiFiEventStationModeConnected & event)
      {
        Serial.println(F("Wifi STA: Connected"));
      });
Bert Melis
@bertmelis
Aug 30 2018 19:41
is there any functional difference with what I do?
Develo
@devyte
Aug 30 2018 19:42
yes
yours doesn't work
XD
Bert Melis
@bertmelis
Aug 30 2018 19:42
:smile:
aha. I discarded the return value (handler)
ok, so I have to put the returned value into a variable and now it works
didn't know that. thanks for help
Develo
@devyte
Aug 30 2018 19:47
:thumbsup:
den har
@denman0000_gitlab
Aug 30 2018 22:00
@bertmelis @devyte Hello guys .. hope alls well with you
den har
@denman0000_gitlab
Aug 30 2018 22:20
Hi all ... I'm using telnetToSerial example and modified it as a TCP server but how do I get this received data into a char array ? for(i = 0; i < MAX_SRV_CLIENTS; i++){ if (serverClients[i] && serverClients[i].connected()){ if(serverClients[i].available()){ //get data from the telnet client and push it to the UART while(serverClients[i].available()) Serial.write(serverClients[i].read());
i was thinking soemthing like this : char tmpArray[21]; // This generally should be the same size as the sending array radio.read(&tmpArray,sizeof(tmpArray)); // Reading 19 bytes of payload (18 characters + NULL character) <<<< client.readBytesUntil('\0', received_buff, MAX_READING_BUFFER); Serial.println(tmpArray); // Prints only the received characters because the array is NULL terminated sscanf(tmpArray, "%d,%d,%d,%d,%d",&gway,&hcode,&pcode,&oocode,&devcode); // Converts a string to an array
den har
@denman0000_gitlab
Aug 30 2018 22:28
so i tried this char tmpArray[21]; while(serverClients[i].available()) Serial.write(serverClients[i].readBytesUntil('\0', &tmpArray, sizeof(tmpArray)));
where am i going wrong ? :-(