These are chat archives for SmingHub/Sming

13th
Mar 2016
Dmitry Kireev
@kireevco
Mar 13 2016 02:47

Updated to gcc 5.3, gdb 7.10.1 and bunch of other improvements.

We need to test toolchain before merging to master.

I mainly interested in the following:
• Does gcc work as expected? (it's built with unix threads)
• Does gdb work as expected? (I applied upstream patches from crosstool-ng)
Alexander V. Ribchansky
@avr39-ripe
Mar 13 2016 10:39
@kireevco built from you repo both on debian and freebsd works fine while compile code, but in both cases failed while linking with error: compiled for a little endian system and target is big endian
alonewolfx2
@alonewolfx2
Mar 13 2016 10:40
@hreintke i have an error when fresh sming rtos compile
alonewolfx2
@alonewolfx2
Mar 13 2016 10:47
can anyone try on windows_
?
hreintke
@hreintke
Mar 13 2016 10:53
@alonewolfx2 :
Which version (sdk) and what is the error ?
alonewolfx2
@alonewolfx2
Mar 13 2016 10:54
ok i found issue
my system (or windows ) cant see sming home variable in makefile
if i set in system variables its compiling
can anyone confirm this ?
Alexander V. Ribchansky
@avr39-ripe
Mar 13 2016 10:57
@patrickjahns with cherry-picking two last commits from you branch on top of current sming/develop it.. WORKS :) at least queryParameters works, rawBody works.. do not test formUrlencoded (do not use it) will test mre my app on top of your changes, hope that no issue arise. Thanks!
hreintke
@hreintke
Mar 13 2016 10:58
I have all my environment vars defined in eclipse -> one location, different workspaces can have different values
alonewolfx2
@alonewolfx2
Mar 13 2016 11:00
weird. i will try on windows wm
one more thing
did you compile feature dns server? its not compiling on my pc
                 from libraries/Adafruit_GFX/Adafruit_GFX.cpp:34:
c:\tools\smingrtos\sming\sming\include\smingincludes.h:35:37: fatal error: sming/network/DNSServer.h: No such file or directory
compilation terminated.
make: *** [build/libraries/Adafruit_GFX//Adafruit_GFX.o] Error 1
Alexander V. Ribchansky
@avr39-ripe
Mar 13 2016 11:02
@hreintke you are absolutely right that prettyPrint is BAD idea (I complain about outdated samples, and cach it by myself, I copy-paste this part of code from old MeteoControl) yes, I should use my own head but somtimes I fail to do so :) to second question.. does using String instead of char* efficent? I already saw that @anakod also use String to print json to, but is this good idea? if so, I will update WebSkeletonApp both for nonos and rtos to reflect your advices.
hreintke
@hreintke
Mar 13 2016 11:05
@avr39-ripe : Take also a look at SmingHub/SmingRTOS#90
Alexander V. Ribchansky
@avr39-ripe
Mar 13 2016 11:05
@hreintke ok, will handle it
hreintke
@hreintke
Mar 13 2016 11:06
Maybe looks a lot but if we want to make it a "first class" example for starters we need to be precise :smile:
Alexander V. Ribchansky
@avr39-ripe
Mar 13 2016 11:10
@hreintke wow :) just see you post for SmingHub/SmingRTOS#90.. will need some time, but I think I can do it :) yes, you'r right, it should be consistent and clear app, as to be solid base for beginners..
hreintke
@hreintke
Mar 13 2016 11:14
@alonewolfx2 :
I use the very latest, including the DNS Server. I am on windows so will not notice capital sensitivity
alonewolfx2
@alonewolfx2
Mar 13 2016 11:17
i am on windows too. it doesnt compiled
@hreintke how can i fix
Alexander V. Ribchansky
@avr39-ripe
Mar 13 2016 11:19
@hreintke some remarks to
"Make real use of the new WifiEvents and wait for network before starting servers etc"
if esp in softAP mode we need web server to configure module, so web server must be up and running
if in STA and connected to router - we also need webserver
so in this particular app no metter WHEN start webserver... just in init or in WifiEvents delegates.. but I think start it in delegates is more complicated IN THIS particular app, cause we need to check either for STAGotIP and if there is no connection to router in sta mode? how wil we change settings??
about right url for getting password - another part for enhancement.. will not show password in web.. will re-do it as one side.. password can be set from web ui to esp and wil make impossible to get passwd from esp via web ui..
hreintke
@hreintke
Mar 13 2016 11:30
@alonewolfx2 :
Are you sure you don't point your sming_home to an old sming dir ?
@avr39-ripe :
You know what is the way to start after loadConfig ?
hreintke
@hreintke
Mar 13 2016 11:35
@avr39-ripe :
What happens if the password given thru UI is wrong ?
@alon24 : I remember you asked something on infoscreens but can't find within the git
Alexander V. Ribchansky
@avr39-ripe
Mar 13 2016 12:06
@hreintke if password from web ui is wrong it leaves softAP up and running and you can change passwd again :)
@hreintke not fully understand about "You know what is the way to start after loadConfig ?" can you please rephrase it?..
robotiko
@robotiko
Mar 13 2016 12:13
@alonewolfx2 I'm on windows too .. latest clean repo.. no issues compiling
however I'm suign same approach as @hreintke .. environment vars
alon24
@alon24
Mar 13 2016 12:16
i want to add some fixes to infoscreens , i asked how to do it
robotiko
@robotiko
Mar 13 2016 12:17
@alonewolfx2 I'm testing DNSCaptive in RTOS
and so far doesn't seem to work
how did you validate and tested it?
alon24
@alon24
Mar 13 2016 12:22
@avr39-ripe from your code I asked if you can comment out the debugf("event %x\n", evt->event_id); line
i do not think it needs to be enabled for all, just for your tests
Alexander V. Ribchansky
@avr39-ripe
Mar 13 2016 12:46
@alon24 ok.. get it.. wil make pr for that
alonewolfx2
@alonewolfx2
Mar 13 2016 14:10
@hreintke its about eclipse. i didnt solved but its compiling on commandline
about captive portal its not working anymore. i am testing again
seems it cacthing requests but not sending any response
alonewolfx2
@alonewolfx2
Mar 13 2016 15:13
ok i found issue. its coming from rtos udp class and seems this fix solve rtos's udp problem
alonewolfx2
@alonewolfx2
Mar 13 2016 15:26
@patrickjahns how can we improve captive portal? for example dnsserver catching requests like "abc.com" but not "abc" or "abc.com.tr"
alon24
@alon24
Mar 13 2016 16:13
Hi, I have narrowed my code issues in rtos heap exception to me trying to create a new string with sprint, for which I use a buffer size 1000
Is there any non sprint and char array to create a new string with %s in it
HappyCodingRobot
@HappyCodingRobot
Mar 13 2016 17:15
hi .. is there a simple way to get the size i would need for a json buffer? In his special case i read a json string and want to know, what size a static JsonBuffer is needed
Patrick Jahns
@patrickjahns
Mar 13 2016 17:23
@alonewolfx2 @robotiko
Can you Elaborate what is not working? For me nonos works without problems
PS: will Need some time for me to tackle this issue - my private working Laptop went RIP last night
robotiko
@robotiko
Mar 13 2016 17:24
@patrickjahns now seems to work
@alonewolfx2 the fix is working
Patrick Jahns
@patrickjahns
Mar 13 2016 17:24
Somehow something around the DC plug on the Mainboard fried :(
what fix?
So it was nothing wrong with the DNSServer ?
robotiko
@robotiko
Mar 13 2016 17:25
a fix about udp he pushed to sming rtos 2 hours ago
@patrickjahns let me chek tthe fix.. but I think it was just in the udp code
Patrick Jahns
@patrickjahns
Mar 13 2016 17:26
it seems that the udp answer port was hard coded
robotiko
@robotiko
Mar 13 2016 17:26
yes
to port 1000
Patrick Jahns
@patrickjahns
Mar 13 2016 17:27
Didn´t catch that in your log - but wouldn´t expect to do so
robotiko
@robotiko
Mar 13 2016 17:27
log is quite noisy
but i dotn think it is logged anyway
so
good catch .. real UDP bug
Patrick Jahns
@patrickjahns
Mar 13 2016 17:28
It is logged ... Shows the ip and port answering to. But never looked at it since usually this is handled by UDP Layer and I assume it works
@alonewolfx2
for improvement - best is to use a packet inspection tool and see if request to "abc.com.tr" are replied with a valid Response or not. Answer just "abc" is not a valid dns request
abc might be a hostname, but that is not what dns resolves
current dns implementation should answer all requests with the base Domain - i.e Sub.domain.tld would answer for Domain.tld - for abc.com.tr it should answer for com.tr as Domain.tld
I am out again - might be till end of the week until I have a new Laptop
alonewolfx2
@alonewolfx2
Mar 13 2016 17:56
you are right about "abc" but it didnt cacth "abc.com.tr" why?
udp bug fixed ad dnsserver code working well on rtos branch too. so bug isnt about dnsserver just udp class
hreintke
@hreintke
Mar 13 2016 19:49
@patrickjahns : @robotiko : @alonewolf2
Think I am the source of the udp bug. In early days of smingRTOS conversion I had severe problems getting IP running and only way getting something replying was fixing the port. Must have missed it cleaning up.
robotiko
@robotiko
Mar 13 2016 19:56
@hreintke a bug is a bug .. even "worse" than that is being resposible of having RTOS version ;)
:D
alon24
@alon24
Mar 13 2016 20:02
@hreintke is there any other way other than sprintf for creating a string with format?
is char buf[1000] too much for rtos?
robotiko
@robotiko
Mar 13 2016 20:41
@/all anyone having this error after flashing anything
 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 23620, room 16
tail 4
chksum 0xef
load 0x33333333, len 858993459, room 4
nodemcu devkit1
nonos develop
alon24
@alon24
Mar 13 2016 21:35
@hreintke I think I am going back to nonos
It's much more stable
I have no idea why, but My code, looses html connect to on somwtimes
It's very disturbing. I am tired of this
I may feel differently on the morning but its driving me nuts
hreintke
@hreintke
Mar 13 2016 22:45
@alon24 :
If you use char buf[1000] it will be on stack -> stack issue.
if you use char * buf = new buf[1000]; it will be in heap -> no stack issues.
sprintf will be the same in both options.
Only extra is delete buf when finished.
On stability. Of course up to you which sming you use. Making sming rtos stable is a job to be done by the community.