These are chat archives for SmingHub/Sming

7th
Sep 2016
zhivko
@zhivko
Sep 07 2016 09:52
I can you also confirm that with that version timer works but although ota transfers firmware correctly, esp with such firmware cannot reboot succesfully...
onReadyToSendData: 1
TCP received: (null)
TCP connection closing
-TCP connection
Firmware Loading

Firmware download finished!
 - item: 0, addr: 0x202000, len: 363792 bytes
 - item: 1, addr: 0x300000, len: 65536 bytes
Firmware updated.
In callback...
Firmware updated, rebooting to rom 1...
state: 5 -> 0 (0)
rm 0
pm close 7 0 0/174322688
del if0
usl

 ets Jan  8 2013,rst cause:2, boot mode:(1,6)


 ets Jan  8 2013,rst cause:4, boot mode:(1,6)

wdt reset
zhivko
@zhivko
Sep 07 2016 10:40

Can somebody check also that this is working?

    WifiStation.waitConnection(connectOk, 3, connectNotOk);

seems that my connectOk is not called - but connection is sucesfully established...

And for OTA - I want to correct my self - it seems it works with "QueuedTimer trial" version of smingRTOS. It was mistake in my apache2 configuration (picking wrong firmware).
Now only

  WifiStation.waitConnection(connectOk, 3, connectNotOk);

is not working. connectOk not called...

Alexander V. Ribchansky
@avr39-ripe
Sep 07 2016 10:58
@zhivko use WifiEvents to catch connection/disconnection etc.. https://github.com/SmingHub/SmingRTOS/blob/master/sming/sming/platform/WifiEvents.h
zhivko
@zhivko
Sep 07 2016 12:06
@avr39-ripe : thanks - this is working OK... now I have problem with: "caught InvalidStateError: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state."
Was there some change in websocket implementation also ?
Can somebody confirm websockets are working in "QueuedTimer trial" commit ?
Alexander V. Ribchansky
@avr39-ripe
Sep 07 2016 12:09
@zhivko still can't move to SmingRTOS... use NONOS.. actively use websockets.. almost no problem... need small fix in websocket sending code.. remove pcb.flush to fully feed tcp buffer before actually send data.. helps serve many almost simultaneous responses.. still one issue present - cant handle websocket frames in separate tcp packets afaik.. :(
zhivko
@zhivko
Sep 07 2016 12:10
IN My application with older smingRTOS websockets were working just fine...
Now they dont...
maybe @hreintke can give some hint...
zhivko
@zhivko
Sep 07 2016 12:30

So in my webpage I have this js code:

var wsUri = "ws://" + location.host + "/";
            //var wsUri = "ws://192.168.1.24/";
            websocket = new WebSocket(wsUri);
            websocket.onopen = function(evt) { onOpen(evt) };

but onOpen never happens... but on esp webssocket connection handler is triggered....

Also I found out that esp becomes unresponsive when ws client tries to connect...
Andriy Petrynchyn
@petrynchyn
Sep 07 2016 13:17
I am using the latest version SmingRTOS and SDK version: 1.4.2 (f57d61a) and websockets work well
zhivko
@zhivko
Sep 07 2016 17:01
@petrynchyn here did you get 1.4.2 version? latest is: https://github.com/espressif/ESP8266_RTOS_SDK/releases 1.4.0
zhivko
@zhivko
Sep 07 2016 17:14
I am testing HttpServer_WebSockets and - esp8266 just hangs when I open web page :(
zhivko
@zhivko
Sep 07 2016 17:25
no exception message - nothing - is there any way to find out at what code it is running at?
zhivko
@zhivko
Sep 07 2016 17:32
Is there a wa in frertos to print stack trace ?
hreintke
@hreintke
Sep 07 2016 18:46
@zhivko : No updates have been done to websockets.
@avr39-ripe :
Which/where did you remove the pcb flush ?
Agree on the multi tcp frame, maybe you can add and PR ?