These are chat archives for SmingHub/Sming

5th
Dec 2015
Dmitry Kireev
@kireevco
Dec 05 2015 01:34
@alonewolfx2 are you around?
This message was deleted
Dmitry Kireev
@kireevco
Dec 05 2015 01:44
nevermind, some stuff is missing
alonewolfx2
@alonewolfx2
Dec 05 2015 06:07
@kireevco yes
alonewolfx2
@alonewolfx2
Dec 05 2015 06:44
@kireevco i am trying your lastest esp-alt-sdk
Dan Loman
@dloman
Dec 05 2015 07:07
am on the 1.5 sdk and the develop branch of sming and getting SPIFFS_ERR_NOT_CONFIGURED any thoughts on what I am doing wrong
alonewolfx2
@alonewolfx2
Dec 05 2015 08:48
@kireevco
-allocator-inst.o .libs/libstdc++.lax/lt19-atomicity.o .libs/libstdc++.lax/lt20-basic_file.o .libs/libstdc++.lax/lt21-bitmap_allocator.o .libs/libstdc++.lax/lt22-c++locale.o .libs/libstdc++.lax/lt23-codecvt.o .libs/libstdc++.lax/lt24-codecvt_members.o .libs/libstdc++.lax/lt25-collate_members.o
d:\yedek\mb\esp-alt-sdk\xtensa-lx106-elf\xtensa-lx106-elf\bin\ar.exe: .: Permission denied
make[6]: *** [libstdc++.la] Error 1
make[6]: Leaving directory `/d/yedek/mb/esp-alt-sdk/src/gcc-xtensa/build-2/xtensa-lx106-elf/libstdc++-v3/src'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/d/yedek/mb/esp-alt-sdk/src/gcc-xtensa/build-2/xtensa-lx106-elf/libstdc++-v3/src'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/d/yedek/mb/esp-alt-sdk/src/gcc-xtensa/build-2/xtensa-lx106-elf/libstdc++-v3'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/d/yedek/mb/esp-alt-sdk/src/gcc-xtensa/build-2/xtensa-lx106-elf/libstdc++-v3'
make[2]: *** [all-target-libstdc++-v3] Error 2
make[2]: Leaving directory `/d/yedek/mb/esp-alt-sdk/src/gcc-xtensa/build-2'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/d/yedek/mb/esp-alt-sdk/src/gcc-xtensa/build-2'
make: *** [/d/yedek/mb/esp-alt-sdk/src/gcc-xtensa/build-2] Error 2
zhivko
@zhivko
Dec 05 2015 09:15
@dloman you need to have correct user-make.mk and initialization in application.cpp
Check basicRboot example. Spiff works there.
Dan Loman
@dloman
Dec 05 2015 09:17
Awesome thanks @zhivko
zhivko
@zhivko
Dec 05 2015 09:17
@dloman null problemo ;)
Reinis Veips
@festlv
Dec 05 2015 10:48
Hi guys, has anybody seen problems when receiving lots of UART data at high baud rates? Specifically, I'm referring to #467
Reinis Veips
@festlv
Dec 05 2015 11:22
I started debugging HardwareSerial.cpp and it does indeed look that I can somehow read past the RX_BUFF_SIZE although the checks are there and look correct
Reinis Veips
@festlv
Dec 05 2015 11:29
This is debug output of UartDev.rcv_buff
Before read pRcvMsgBuff: 0x3fffde60, pReadPos: 0x3fffdf60, pWritePos: 0x3fffde60
Code does readMemoryBlock(buffer, 1024);
After read pRcvMsgBuff: 0x3fffde60, pReadPos: 0x3fffe360, pWritePos: 0x3fffde60
RX_BUFF_SIZE should be 256 bytes, and rx position clearly goes past it (although, I repeat myself, there are checks in code for that)
Reinis Veips
@festlv
Dec 05 2015 11:42
Ah, maybe the RX interrupt sets pReadPos to start + RX_BUFF_SIZE, and then in readMemoryBlock pReadPos is first incremented and then compared to start + RX_BUFF_SIZE when it is already past the bounds
Reinis Veips
@festlv
Dec 05 2015 12:27
Yes, this was the problem indeed
Working on a PR
zhivko
@zhivko
Dec 05 2015 12:30
On Readme.rd we dont have a word on analog read
ups - cannot find example on analogRead - ? I have rusted memory - how do we do analogRead in sming ?
hreintke
@hreintke
Dec 05 2015 12:41
@festlv : Good catch, thanks for debugging and fixing.
zhivko
@zhivko
Dec 05 2015 12:48
@hreintke: it seems ubelievable why dont we have adc_read like:
http://41j.com/blog/2015/01/esp8266-analogue-input/
Am I missing something ?
Eh we have - system_adc_read() ....
Reinis Veips
@festlv
Dec 05 2015 13:15
btw, this might be a silly question- what ESP devboards do you guys use and are there devboards with fully automatic flashing cycle (that is- without pressing buttons or removing DTR/RTS lines and power-cycling the board)?
zhivko
@zhivko
Dec 05 2015 13:24
I now use nodemcu devkit 12e
it has both buttons there, but once I flash rBoot, i use ota firmware update
it seems more flexible than connecting wires
Reduces flashing time.
I also used just modules 12e, but never made serial connector with cts and dtr lines
There are some posts on web how to do that
alon24
@alon24
Dec 05 2015 14:38
@zhivko can u share the process of how u Ota? did u manage with websocket?
or do u compile and place in a server
is it automatic
try this
alon24
@alon24
Dec 05 2015 14:59
I will
Dmitry Kireev
@kireevco
Dec 05 2015 15:00
This is one of the first builds, so I have no idea how it works
@alon24 so your feedback is appreciated
zhivko
@zhivko
Dec 05 2015 15:34
@alon24 yes. I have enabled in project websocket and httpserver.
Also I have serial callback enabled - so basically I can do ota over websocket - or serial...
alon24
@alon24
Dec 05 2015 15:35
but so I send the rom in websocket to esp
do u
zhivko
@zhivko
Dec 05 2015 15:35
I copied code from samples mostly - but it is working beautifully
alon24
@alon24
Dec 05 2015 15:36
How do u do Ota from kta
ota
alon24
@alon24
Dec 05 2015 15:36
do u send the rom to esp via websocket data send
zhivko
@zhivko
Dec 05 2015 15:37
I plan to use esp8266 (nodemcu) for analog reading and 4 times stepper driver (DRV8825) controled over wifi with websockets.
I also use SPIFF, where I have Index.html with SVG and javascript integration...
I have this textboxt in html that receives command - and if I put "ota" and press enter, esp8266 rboot functionality downloads firmware from apache2 web server on my development machine... than it reboots and firmware is updated...
with last 1.5sdk and nodemcu devkit12e and sming develop branch I don't experince imeouts while rbooting anymore.
zhivko
@zhivko
Dec 05 2015 15:45
I just added analog read functionality to my project with system_adc_read and I see that measurements with internal adc of esp8266 are oscilating quite alot. I checked with osciloscope and analogue value is stable...
Can somebody recommend dedicated chip I could use for ADC ?
Richard Antony Burton
@raburton
Dec 05 2015 15:55
@zhivko nodemcu people seem to like the hx711
but i haven't used it myself so it's not a personal recommendation
zhivko
@zhivko
Dec 05 2015 16:09
@raburton Ah thanks! For the moment I was not sure about what you were talking - adc yes - I will check this - I was checking MAX1416
@raburton I'm looking for float support in sming
I cannot do:
sprintf(buf, "Analogue: %f", floatAnalog);
dtostrf(pf, 10, 8, buf);
ok here it is ;)
zhivko
@zhivko
Dec 05 2015 16:57
Nice article! Thanks!
hreintke
@hreintke
Dec 05 2015 17:10
@zhivko : system_adc_read fluctuating is a "known issue" on esp8266. Wifi interferes with readout.
zhivko
@zhivko
Dec 05 2015 18:39
Yes... I need external adc defintely. How can i supply clkout like on arduino? I'm reading https://forum.arduino.cc/?topic=57873.0
alon24
@alon24
Dec 05 2015 18:45
@hreintke for my infoscreens project (which is with ssd1306, and button, and interupts and menus) espreiff 1.4 works with latest sming dev (so thats one test)
Dmitry Kireev
@kireevco
Dec 05 2015 18:45
@alonewolfx2 it's a problem with multiple access to the same handle in windows. workaround - enable Application Experience service, and close all other terminals...
it comes up randomly in my automated environment. really pisses me off
alon24
@alon24
Dec 05 2015 18:48
@kireevco for the same infoscreens project, the 1.5 alt-esp works
there is no spiffy file there
Dmitry Kireev
@kireevco
Dec 05 2015 18:49
spiffy file?
ok, 1.5 works - that's good news.
you mean spiffy binary?
alon24
@alon24
Dec 05 2015 18:50
yes
Dmitry Kireev
@kireevco
Dec 05 2015 18:50
@alon24 thank you for testing!
by the way, we don't use spiffy with sming any more
alon24
@alon24
Dec 05 2015 18:50
well, I did not test spiffy code
?????
not using spiffy?\
Dmitry Kireev
@kireevco
Dec 05 2015 18:51
@hreintke @raburton
alon24
@alon24
Dec 05 2015 18:51
then what ? how do i get http files like index.html?
Dmitry Kireev
@kireevco
Dec 05 2015 18:51
I think now it's built when you build smingframework
alon24
@alon24
Dec 05 2015 18:51
so what changes for me as user?
do i need to build the spiff task after I build smingcor?
Dmitry Kireev
@kireevco
Dec 05 2015 18:52
I don't know, shouldn't change much, you need to build smingframework
spiffy was integraged as a part of rboot, I think
hreintke
@hreintke
Dec 05 2015 18:54
@kireevco :
What do you mean with : we don't use spiffy with sming any more ?
Dmitry Kireev
@kireevco
Dec 05 2015 18:54
binary version
@alon24 also, spiffy was never part of sdk
(although it could be:)
@hreintke where is spiffy is coming from now?
alon24
@alon24
Dec 05 2015 18:55
i just meant I ddi not test adding index.html and such
hreintke
@hreintke
Dec 05 2015 18:55
It is in the sming repo
Dmitry Kireev
@kireevco
Dec 05 2015 18:56
I'm confused.
@alon24 so, we don't use external spiffy any more. it's in sming.

I'm not sure what you meant

there is no spiffy file there

but it was never there.

Thank you very much for testing :)

alon24
@alon24
Dec 05 2015 18:57
all i meant was that i did NOT test index.html, so I could not comment if spiffy works with 1.5
Dmitry Kireev
@kireevco
Dec 05 2015 18:57
ah
:-D
got it:)
alon24
@alon24
Dec 05 2015 18:57
(know my limitations)
are we going to support ota, like arduino esp, ESP8266HTTPupdateServer? any progress on that (have the esp act as server, and send the rom to it (so oposite of having esp PULL the data from our server))
robotiko
@robotiko
Dec 05 2015 19:10
@alon24 bout OTA pull/ push
alon24
@alon24
Dec 05 2015 19:10
?
robotiko
@robotiko
Dec 05 2015 19:11
pull mode (unless supported byremote trigger mqtt etc ) is good option for OTA
thinking about severla devices needign to be updated, etc
alon24
@alon24
Dec 05 2015 19:12
well, the thing is that if we send the firmware I do not need a local server
robotiko
@robotiko
Dec 05 2015 19:12
push mode with tftp and stuff like that, is handy for development.. but a mess when you have to update many devices
alon24
@alon24
Dec 05 2015 19:12
and If i look at rBootHttpUpdate, it just goes to http download
robotiko
@robotiko
Dec 05 2015 19:12
yes
alon24
@alon24
Dec 05 2015 19:12
well websocket mode
robotiko
@robotiko
Dec 05 2015 19:13
you eman websocket server, right?
alon24
@alon24
Dec 05 2015 19:13
well, esp can already be a websocket server
u can send commands to it,
robotiko
@robotiko
Dec 05 2015 19:13
that could be another option.. and didnt look at it deeper.. but should not have many problems with rboot
yes
alon24
@alon24
Dec 05 2015 19:14
what is the status of binary
robotiko
@robotiko
Dec 05 2015 19:14
the only thing is to send the binary
not sure is that is wrokign corectly and has been tested correctly
there is no exampel for that
alon24
@alon24
Dec 05 2015 19:14
@here any one tested websocked binary send?
robotiko
@robotiko
Dec 05 2015 19:16
BTW about @zhivco code doing websocket OTA..
checked the code .. he means he is sending the command to do OTA
as cold be done over telnet or serial
alon24
@alon24
Dec 05 2015 19:16
yes i saw
robotiko
@robotiko
Dec 05 2015 19:17
but same stuff
picking file from external server
zhivko
@zhivko
Dec 05 2015 20:12
@alon24 Yes - you don't need HttpServer if you will use binary receive in sming websocket...
Websocket aproach is better because you can push update from outside Sming...
robotiko
@robotiko
Dec 05 2015 20:13
@zhivko have you tested ws binary?
zhivko
@zhivko
Dec 05 2015 20:13
@robotiko: No - is there a working Sming sample for this ?
robotiko
@robotiko
Dec 05 2015 20:13
no
I mean
there is the code..
zhivko
@zhivko
Dec 05 2015 20:14
I havent implemented: wsBinaryReceived
robotiko
@robotiko
Dec 05 2015 20:14
but not the html to send teh binary
zhivko
@zhivko
Dec 05 2015 20:15
you get this: uint8_t* data and I should probably used some of rBoot code to write it to flash and than do kind of magic like rBoot does...
But since I have working OTA in my project now - working with Apache2 I have my focus on new stepper driver with nodemcu and simultaneous GPIO writes for stepper step pins...
wsBinaryReceived would also require python websocket binary send implemetation on PC
there are samples for that around...