These are chat archives for SmingHub/Sming

22nd
Feb 2016
Alexander V. Ribchansky
@avr39-ripe
Feb 22 2016 10:04
Hello! please wellcome #611 comments, suggestions etc are wellcome :)
Patrick Jahns
@patrickjahns
Feb 22 2016 10:11
oh great addition!
alon24
@alon24
Feb 22 2016 10:37
@avr39-ripe rtos too?
Alexander V. Ribchansky
@avr39-ripe
Feb 22 2016 10:39
@alon24 NONOS, wil try to port it to RTOS if my general point of view will find support :)
I also want to modify Wifi*.configure methods and add ability to GET saved wifi STA and AP config
so comment this feature, give suggestion if any and I will continue to fix wifi in sming :)
alon24
@alon24
Feb 22 2016 10:41
I deleted my nonos env, but i will try to look at logic
Alexander V. Ribchansky
@avr39-ripe
Feb 22 2016 11:03
@alon24 I find rtos env bit complicated and less mature to nonrtos, but it is INDEED promising!! so will try to port my notos work to os too ;)
alon24
@alon24
Feb 22 2016 11:05
@avr39-ripe also bear in mind, that nonos will not be supported soon ....
Patrick Jahns
@patrickjahns
Feb 22 2016 11:21
can you define soon?
alon24
@alon24
Feb 22 2016 11:23
@hreintke can...
Patrick Jahns
@patrickjahns
Feb 22 2016 11:39
alright
Maybe you can help me with something related to rboot, spiffs and ota #612
alon24
@alon24
Feb 22 2016 11:46
I too got help about these things ! (so I do not know it well at all)
crosofg
@crosofg
Feb 22 2016 15:07
guys Can routing feature be added in Sming RTOS?
@/all
This message was deleted
I tried using it. Was able to stream youtube videos through ESP netwerok
alon24
@alon24
Feb 22 2016 15:19
FAST
crosofg
@crosofg
Feb 22 2016 15:21
yeah
robotiko
@robotiko
Feb 22 2016 15:51
@crosofg nice catch
hreintke
@hreintke
Feb 22 2016 15:57

@patrickjahns
I will take the action for adding the functionality to the filestream class.
For your implementation just do :

FileStream uploadFile;
bool uploadFile.attach(String file) -> false if fails.
int uploadFile.write(char*,size) -> will always append to the end of the file, returns number of written chars.

Will be available in SmingRTOS shortly.
Passwords -> http basic auth is the way to go.
On addPath : You are right about URI.
On callbacks, indeed it is up to the server to see whether a POST is valid for a URI.
But if the situation is that we by saying with addpath -> uploads OK. Then anyone can just post to that URL and upload a file.
That is what I tried to say in the "prevent abuse" But the Httprequest is not yet complete, so the callback(httprequest,httpresponse) cannot be handled at that moment.

For more files : my impression is that the format of http is :

Headers
-- Multipart boundary
file1
-- Mulipart boundary
file2
-- Multipart boundary

Is that correct ?

hreintke
@hreintke
Feb 22 2016 17:34
@avr39-ripe : on : "I find rtos env bit complicated and less mature to nonrtos"
Can you tell what is the complicated. Then I can the action to improve.
hreintke
@hreintke
Feb 22 2016 17:45
@patrickjahns :
I intend to do one more SmingNONOS release and after that only accepting functionality improvements for SmingRTOS.
Bugfixing will then still be done in SmingRTOS and SmingNONOS.
Patrick Jahns
@patrickjahns
Feb 22 2016 18:54
@hreintke
Thanks for the info - I will try to make the multipart implementation available for both RTOS and NONOS.
About security: I'd guess it is for the user of SMING framework to decide how he wants to secure the upload. My take on it would be to use HTTP AUTH for security purpose.
Anything else is difficult with multipart - there is no defined order for the parts the browser submits. So we would need to temporarily save the files and check if the upload was okay afterward - if not delete it. (That`s how most webservers handle it)
The format is
HTTP Headers including the boundary
-- Multipart boundary
Content-Diposition 
file1
-- Mulipart boundary
Content-Diposition 
file2
-- Multipart boundary --
Patrick Jahns
@patrickjahns
Feb 22 2016 18:59
But multipart is not only file, it can be anything - after parsing the Content-Disposition we know if is a file (if "filename" exists) - otherwise it would be a normal variable
Is there a way to check for the maximum free space with the Filestream (Filesystem) API?
Alexander V. Ribchansky
@avr39-ripe
Feb 22 2016 19:04
@hreintke First of all I do not whant to offence you personally or say something bad about you GREAT WORK for poring Sming to RTOSDSK. You contribution to both projects is more than great!
@hreintke I while porting MCP23S17 lib I found that just simply #include <SPI.h> isn't enough while in NONOS it was sufficient. I think it needs to rearange some includes.. May be it is nothing wrong with SmingRTOS but with my way I try to use (or misuse :) it :)
zhivko
@zhivko
Feb 22 2016 19:10
Hi guys!
Do we have SSL support already in SmingRTOS ?
Alexander V. Ribchansky
@avr39-ripe
Feb 22 2016 19:10
@zhivko Hello!
zhivko
@zhivko
Feb 22 2016 19:11
Hi!
Do you know maybe is ssl support already in rtos ?
Alexander V. Ribchansky
@avr39-ripe
Feb 22 2016 19:12
@all any feedback on WifiEvents? :)
hreintke
@hreintke
Feb 22 2016 19:56
@avr39-ripe :
Don't worry, it did not feel like an offense. One of the subgoals of the SmingRTOS was that it should be easier to use, and if that needs some additional changes, that should be done.
For the includes. the idea was that the only include in applications/libraries is #include "SmingCore.h". Then all of sming should be available. That excludes when an application needs to use libraries, it should use also "include libraries/libname".
If I missed something, just let me know.
Alexander V. Ribchansky
@avr39-ripe
Feb 22 2016 19:59
@hreintke ok, glad that there is no offence.. do SmingRTOS need something like WifiEvents as nice wrapper around SDK API? have you time to peek on nonos variant?
hreintke
@hreintke
Feb 22 2016 20:02
@zhivko :
Did not yet went thru the whole PR. First remark is that I am not sure whether we would need a separate callback for each function. f.e. combining the the connect and disconnect events.
Alexander V. Ribchansky
@avr39-ripe
Feb 22 2016 20:03
@hreintke I will review what I do not like in current smingRTOS and summarize it in some way..
One more question - do you know about any plans of newer esp8266 RTOSSDK ?? one we have is bit old....
hreintke
@hreintke
Feb 22 2016 20:03
@avr39-ripe :
Yes, in the WifiEvents should be added to RTOS. It's a needed functionality
Alexander V. Ribchansky
@avr39-ripe
Feb 22 2016 20:05
@hreintke ok, so after some comments of my implementation for nonos variant I will port it to os... it looks not hard task..
hreintke
@hreintke
Feb 22 2016 20:07
should be rather straightforward. There is some difference between RTOS and NONOS at startup (f.e. no SystemReady event) but that should not be a problem.
Alexander V. Ribchansky
@avr39-ripe
Feb 22 2016 20:08
@hreintke AFAIK there is no need to wait for SystemReady for set up wifi events.. in nonos it either not after SystemReady...
hreintke
@hreintke
Feb 22 2016 20:11
On newer SDK. I don't know the timing but i do know espressif is working on it.
On a question on availability of LWIP sources the answer was : Not in the current release but will be in the next.
From needing a new release it would be : what is missing from the current what you need for your app.
I wouldn't care to use a 4 month old SDK if I have all I need.
Alexander V. Ribchansky
@avr39-ripe
Feb 22 2016 20:13
@hreintke you are right about not to become version "hungry" but my thought was if espressif refresh their nonos sdk such often with such meny bugfixes may be ossdk either needs some care from espressif...
my rather complicated app (not very complicated to be honest:) works on rtos sming after bit porting..
slaff
@slaff
Feb 22 2016 21:21

Do we have SSL support already in SmingRTOS ?

@zhivko Well, if someone wants it I can provide a SSL version that has most of the stuff, apart from certification expiration verification, because there are no SNTP functions in RTOS.

robotiko
@robotiko
Feb 22 2016 21:21
@slaff you got the port ready?
great
slaff
@slaff
Feb 22 2016 21:32
Just vprintf and the sntp and time functions are missing. I am not exactly happy about the time functions but... yeah..
robotiko
@robotiko
Feb 22 2016 21:33
you mean missing SNTP?
Patrick Jahns
@patrickjahns
Feb 22 2016 21:33
is ssl for the client or a server?
robotiko
@robotiko
Feb 22 2016 21:33
client
alon24
@alon24
Feb 22 2016 21:57
Is websocket client in rtos?
robotiko
@robotiko
Feb 22 2016 21:58
@alon24 is it not in nonos either
alon24
@alon24
Feb 22 2016 21:58
K
robotiko
@robotiko
Feb 22 2016 21:58
there is a PR
that was never reviewed after the comments