These are chat archives for SmingHub/Sming

9th
Mar 2016
Harry Böttcher
@harry-boe
Mar 09 2016 00:38
New SPI implementaion is out #642 it includes a mod SW SPI impl. new HW impl and working SDCard for HW and SW
Please start testing and let me know if somthing breaks. I tested (HW and SW impl) what i had on SPI Hardware ST7735, OLED Display and SD Card
ArduCAM is on the way -> depends on the SPI impl.
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 05:24
@harry-boe great news, will test it bit later
Harry Böttcher
@harry-boe
Mar 09 2016 09:13
can someone point me to details on the documentation tags and syntax
And how to trigger the docgen process ?
Fangorn-SPB
@Fangorn-SPB
Mar 09 2016 09:29
Hi, All! Anybody try sound output from esp8266?
HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 09:34
@harry-boe great! :)
@Fangorn-SPB i've tried it on base of the mp3 implementation from sprite-tm
the PWM ouput works well, but the I2S output is great :)
I used a TDA1543 DAC
robotiko
@robotiko
Mar 09 2016 09:37
@HappyCodingRobot you used i2s?
bidirectional?
HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 09:38
@robotiko no, only as output
Fangorn-SPB
@Fangorn-SPB
Mar 09 2016 09:38
@HappyCodingRobot nice! But i'm intresting play midi files. Vlsi do some ic for this...
vs1053, for example
HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 09:40
sounds nice .. and much less power hungry than mp3 decoding on the ESP ;)
Fangorn-SPB
@Fangorn-SPB
Mar 09 2016 09:43
@HappyCodingRobot yes ) you found mp3 decoder examples for ESP?
HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 09:43
i made my changes based on the project from 'pvvx' witch is a resource optimised port from sprites-tm . Also based on FreeRTOS
robotiko
@robotiko
Mar 09 2016 09:45
@HappyCodingRobot i2s is a lib?
HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 09:48
not exactly a lib in the Sming way ;) it is included in a separate c file.
also the mp3 decoder. It uses a modified version of the MAD library
robotiko
@robotiko
Mar 09 2016 09:50
@HappyCodingRobot that web mp3 plaer works ok without external memory on ESP?
HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 09:51
I started/tried a Sming port, but had not the time to finish it. May the next weeks .. if not someone other does it ;)
mostly ..
in my local net it is ok
I used a simple python program to stream mp3 data via http and it works with only internal ram and higher bitrates
for internet streams i recommend the external SPI ram to avoid crackling/timeouts
robotiko
@robotiko
Mar 09 2016 09:54
@HappyCodingRobot very cool
alon24
@alon24
Mar 09 2016 10:04
could the new changes for bootloader have created an issue where if u press a button on gpio0 (on nodemcu devkit, press the button), and then reset, it goes into boot mode (1,7) - ets Jan 8 2013,rst cause:2, boot mode:(1,7)
robotiko
@robotiko
Mar 09 2016 10:04
1,7
never seen that
can be
alon24
@alon24
Mar 09 2016 10:05
I press the gpio button, (it does not detect the press I use timer 80ms) and after i click the reset button, it goes to theat state
robotiko
@robotiko
Mar 09 2016 10:05
no idea
what new rboot does
ddint test
Ibut I knwo that it has a method for rboot whan pressign a gpio
maybe is just that
alon24
@alon24
Mar 09 2016 10:06
my thinking - but how to make sure - understand it
@hereintke here?
HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 10:09
reset cause 2: reset pin , but mode (1,7) is something i've not seen yet ..
robotiko
@robotiko
Mar 09 2016 10:18
first I see that reset reason too
this is rtos, right?
alon24
@alon24
Mar 09 2016 10:24
Yes
alon24
@alon24
Mar 09 2016 10:29
So it's probably the new rboot
alon24
@alon24
Mar 09 2016 10:59
how can I make sure NOT to use gpio mode
alon24
@alon24
Mar 09 2016 11:09
can anyone cofirm that they are seeing this issue? of reset (1,7) after button (gpio0) press and reset buton clicked (nodemcu v.1)?
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 12:10
@patrickjahns I found trouble with you fix to rawBody.. I can get any request parameters while using your fix. Do not look deeper in source yet.. just FYI..
alon24
@alon24
Mar 09 2016 12:12
@here please disregard my posts here about reset issue, i found out theat my terminal (esplorer) was holding DTR, so after reset it went to download mode,. sorry
Patrick Jahns
@patrickjahns
Mar 09 2016 12:17
@avr39-ripe
Which parameters do you mean?
HTTPRequest or HTTPPost ?
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 12:18
request.getQueryParameter do not return any parameter...
HTTPRequest
Patrick Jahns
@patrickjahns
Mar 09 2016 13:07
will check later - this is then related to one PR before (changing to buffering the header)
It would be great if you can report it under #622
ideally with a log for the request so I can check where it might have happened
riban-bw
@riban-bw
Mar 09 2016 14:09
@harry-boe you can run doxygen from the docs directory to generate API documentation. This is currently incomplete. It is a work in progress. The API docs are also hosted at http://sminghub.github.io. Only the development branch Sming docs are currently published there. There are no RTOS API docs - that is on my list to do.
codenamerohan
@codenamerohan
Mar 09 2016 14:30
"choco install mingw " is failing because its unable to download the complete file from sourceforge
is there any other way to download
i am on windows
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 14:42
Hello, I encounter a problem with "reuse@ httpclient with DIFFERENT url.. if I use httpClient in loop (not real for or while, created on timers, what else in sming? :)) to get several urls first get successful, and for second I always gos TcpConnection error -15.. all urls is for the same server (only query parameter change) if I shrink urls array to just one url - all works perfectly in a "loop" no network errors.. so it seems to me that httpClient is not reusable with different url.. or i cook them bad.. can anybody shed the light on it??
Patrick Jahns
@patrickjahns
Mar 09 2016 14:56
did you use HTTPClient.reset() after successfull request?
@avr39-ripe
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 14:56
@patrickjahns yes, not helped :(
Patrick Jahns
@patrickjahns
Mar 09 2016 14:56
please provide code
alon24
@alon24
Mar 09 2016 14:59
@avr39-ripe how can i know when I have an IP for AccessPoint?
meaning AP is up and waiting for business?
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:00
@alon24 as soon as you enable it.. it ready, just catch connection events
alon24
@alon24
Mar 09 2016 15:01
it does not have connection events
i want to know when, to display a message sating to users. they can try to connect
or is this 1s after its been enabled?
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:01
@alon24 onAccessPointConnect in wifi events.. it will triger each time some client connects to you esp in softAP mode
as soon as you WifiAccessPoint(enable) you can :)
alon24
@alon24
Mar 09 2016 15:02
k, thank
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:14
alon24
@alon24
Mar 09 2016 15:14
Does anyone know why I am starting to get this: (almost emidietly) in my code (connect with firefox to esp)
TCP connection closing
TCP received new: 6 bytes
~TCP connection
"tiT"(stack_size = 0,task handle = 3fff30b0) overflow the heap_size.
"tiT"(stack_size = 0,task handle = 3fff30b0) overflow the heap_size.
"tiT"(stack_size = 0,task handle = 3fff30b0) overflow the heap_size.
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:14
@patrickjahns peek on it when you have a time..
@alon24 welcome to reality (of RTOS...)
alon24
@alon24
Mar 09 2016 15:15
yes i saw u had issues too
like this
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:15
@alon24 there is no simple way of porting app from non-os to rtos..
alon24
@alon24
Mar 09 2016 15:16
crapola!
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:16
you need to minimize stack usage.. try not to use (haha.. funny :( ) local variables in function.. o try to minimize their size...
codenamerohan
@codenamerohan
Mar 09 2016 15:22

any solution to my problem?

"choco install mingw " is failing because its unable to download the complete file from sourceforge

Harry Böttcher
@harry-boe
Mar 09 2016 15:23

@riban-bw > @harry-boe you can run doxygen from the docs directory to generate API documentation.

Thanks for the hint. Worked yust fine.
I realized that the comment tags schould go into the header files (i did the opposite). I’m also confused on the structuring tags i.e.
** @defgroup SPI hardware implementation
and how to use them properly

Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:28
@officialjimmy sorry, I'm not on windows.. :(
codenamerohan
@codenamerohan
Mar 09 2016 15:30
what dist are your using @avr39-ripe ?
Patrick Jahns
@patrickjahns
Mar 09 2016 15:30
@avr39-ripe - you are not resetting the client
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:30
@officialjimmy (frebsd | linux) + esp-alt-sdk
@patrickjahns when I try to reset BEFORE downloadString - no effect..
Patrick Jahns
@patrickjahns
Mar 09 2016 15:33
please post the code you used with resetting
and if it still does not work , provide more verbose logs
(with a github issue in best case ;-) )
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:43
@patrickjahns it looks like there is a need for some delay between httpClient requests.. if I delay for 500 ms between subsequent requests - all works properly..
Patrick Jahns
@patrickjahns
Mar 09 2016 15:44
document it with an issue so we can keep track of it
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:46
Also worth to mention that "server" is another esp with sming :)))
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:54
even with 250 ms delay it works..
Patrick Jahns
@patrickjahns
Mar 09 2016 15:56
I really encourage you to document the results in an issue - most of things from this chat will be lost and not useful for anyone else. And while you are testing , also test the szenario if it is only related to ESP<->ESP or if it also happens with "normal" webservers etc
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 15:58
@patrickjahns can't make good test case with real "big scary webserver" cause I get json, parse it etc..
even 100 ms it works good ;)
may be will test it with some "dumb" request to real web server.. I think I do not need answer at all.. it either work good or throw error -15
Patrick Jahns
@patrickjahns
Mar 09 2016 16:00
@avr39-ripe
that shouldn`t be a problem at all - just save a response as text file and server it from a server ...
Or build a small testcase app only using http client...
mind me asking why you hesitate to post an issue?
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 16:01
@patrickjahns cause I'm lazy monkey :) joking.. will post an issue... may be someone else cam continue to test improve my results :)
Patrick Jahns
@patrickjahns
Mar 09 2016 16:02
Or you can continue to investigate and follow up with your results in that issue
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 16:05
@patrickjahns me??? see above about monkey :)))
Patrick Jahns
@patrickjahns
Mar 09 2016 16:08
well then don`t be :P
:monkey_face:
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 16:15
@patrickjahns #643 I kill the monkey inside :)
Patrick Jahns
@patrickjahns
Mar 09 2016 16:41
@avr39-ripe
I am curious - is it a normal saying in your country? i.e lazy monkey?
Alexander V. Ribchansky
@avr39-ripe
Mar 09 2016 17:06
@patrickjahns yeh, rather normal among people WITH sense of humor: )
HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 18:23
@harry-boe i think i miss the set_cs() method in the new implementation ..
could you help me?
riban-bw
@riban-bw
Mar 09 2016 18:43
@harry-boe I have written a guide to documenting the API. I just knocked it together (on the train) so it is quite brief but hopefully forms a useful starting point. I will add it to the wiki.
Patrick Jahns
@patrickjahns
Mar 09 2016 18:54
Did someone already include a travis ci test using sming framework ?
riban-bw
@riban-bw
Mar 09 2016 19:07
alon24
@alon24
Mar 09 2016 19:18
which mem is overflowing here?
I am checking via 
debugf("updateTimeTimerAction - mem %d",system_get_free_heap_size());

and I have mem:

Static OnReceive buf = 2920
WS: change-val-p:0
TCP received new: 20 bytes
onReadyToSendData: 1
Static OnReceive buf = 2920
WS: change-val-d:0
TCP recei"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
ved new: 20 bytes
onReadyToSendData: 1
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
Static OnSent buf = 2920
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
-TCP connection
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
updateTimeTimerAction - mem 22696
TCP connection send: 2 
TCP connection send: 19 
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,task handle = 3fff3258) overflow the heap_size.
"tiT"(stack_size = 1,
Harry Böttcher
@harry-boe
Mar 09 2016 19:44

@HappyCodingRobot > @harry-boe i think i miss the set_cs() method in the new implementation ..

The Arduino API does not know about the Client Selector (CS).
So you need to controll that port from the outside in your code.
More or less all the libs i have seen do that indie the Device Libs i.e. have a spi write function that handles the CS and calls the transaction in between.

HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 19:45
@harry-boe ok, i understand ..
Harry Böttcher
@harry-boe
Mar 09 2016 19:45
@riban-bw Thanks for the info. I did some revers engineering and documented the SPI code that way. Thans to your hints i could check what the output is ..
HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 19:45
what about the transfer32() or a block-transfer ?
Harry Böttcher
@harry-boe
Mar 09 2016 19:48
same here. Example for the arducam is that you need to read the whole image withing a single transactionn (CS,Low transaction() CS.High). So for images with more than 2000Bytes you will never ever habe a buffer big enough. So in this case you plit up into buffers and send them out. That’s only possible if you set the CS line outside
BTW: transfer32 is private so you should not use that one
HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 19:49
that's the reason of my question.. why? i think it would be helpful
and as far as i've seen, the softSPI still contains a buffer_transmit
in my opinion it schould be more general than only for the arducam case ..
Harry Böttcher
@harry-boe
Mar 09 2016 19:58
this is what buffer transfer(*byte, size_t len) is for
This function takes any size of buffers and handels them the right way. The esp can only send buffers up to 156 bits / 64 bytes at once. THats limited by the 9bit register for the bit lenght as well as the 64 bytes starting from memory SPI_W0.
The transfer methode will split the buffer up into max 63 byte blocks and put them together at the end
The arducam case is more for using the TCP buffer (1024 Bytes) in IDataSourceStream several times until the whole picture is sent out. This has to be in one “SPI” transaction. Otherwise the device will fall into another mode and send garbadge
alonewolfx2
@alonewolfx2
Mar 09 2016 20:03
@harry-boe i am testing hwspi on ili9341
HappyCodingRobot
@HappyCodingRobot
Mar 09 2016 20:18
thx ..
Harry Böttcher
@harry-boe
Mar 09 2016 20:35
@alonewolfx2 hope it works
alonewolfx2
@alonewolfx2
Mar 09 2016 20:36
not working yet
but i found this. is it real ?https://github.com/Links2004/arduinoVNC
Harry Böttcher
@harry-boe
Mar 09 2016 20:43
this is neet .. and it looks real. They are using a framebuffer to speed things up. Need to check if we have enough ram on the esp for this ..
Worth giving it a try ;)
Found my display. So i can crosscheck soon
alonewolfx2
@alonewolfx2
Mar 09 2016 20:44
:)
Harry Böttcher
@harry-boe
Mar 09 2016 20:58
@alonewolfx2
Maybe it’s easier to go for a actual ili9341 lib from adafruit on github. That one uses the arduino transaction style API i have implemented. Might not need any porting at all.
My dispay is a ili9340 the 2.2” version
alonewolfx2
@alonewolfx2
Mar 09 2016 20:59
i tried that library too
here is log
Display start
Fatal exception 0(IllegalInstructionCause):
epc1=0x4000dce5, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000

 ets Jan  8 2013,rst cause:2, boot mode:(3,0)

load 0x40100000, len 23880, room 16 
tail 8
chksum 0x9f
load 0x3ffe8000, len 908, room 0 
tail 12
chksum 0xbd
ho 0 tail 12 room 4
load 0x3ffe8390, len 3384, room 12 
tail 12
chksum 0x56
csum 0x56
rl
Harry Böttcher
@harry-boe
Mar 09 2016 21:03
try uncomenting //#define SPI_DEBUG 1 in SPI.h
Will produce lots of output but might point you to the problem ..
try slowing down the SPI bus speed (line 39) on Adafruit_ILI9341.cpp
SPI.beginTransaction(SPISettings(24000000, MSBFIRST, SPI_MODE0));
to more friendly 10 or even 8 Mhz
The set frquency is not bullet proof yet but should work for common values
Harry Böttcher
@harry-boe
Mar 09 2016 22:03
@alonewolfx2 yep confirmed its the frequency finder algorithm for the 24Mhz clock speed that creates the exception.
change line 39 to 20 MHz and it will work
SPI.beginTransaction(SPISettings(20000000, MSBFIRST, SPI_MODE0));
I did a quick and dirty port of the ILI9241 lib and got that exact same error. It works with 20Mhz but i have no display connected
hreintke
@hreintke
Mar 09 2016 22:19
This message was deleted
Harry Böttcher
@harry-boe
Mar 09 2016 22:20
@alonewolfx2
the port i did is here
https://github.com/harry-boe/Sming/tree/device/ILI9340
if you want to give that a try. I runs into a watchdog but i can’t see whre as i have no display. I’m also aware that the samlpe app still has long delays
I put the frequency finder bug on my todo list ;)
hreintke
@hreintke
Mar 09 2016 22:21
@alon24 :
The stack is overflowing. Mostly caused by local char buffers
alon24
@alon24
Mar 09 2016 22:25
How do I check stack free size, like free_heep_size cimmand
hreintke
@hreintke
Mar 09 2016 22:34
You can't. That requires a compile time freertos option which is not set by espressif.
alon24
@alon24
Mar 09 2016 22:35
K, thanks for the info