These are chat archives for SmingHub/Sming

6th
Mar 2016
Patrick Jahns
@patrickjahns
Mar 06 2016 00:02
@avr39-ripe
With size do you mean the size the framework allocates or the actual content ? Any recommendation for a "good size"
It seems a bit odd - but removing the webserver code made it work again/ adding the code it fails. seems like there is not enough size for the instruction rom
Patrick Jahns
@patrickjahns
Mar 06 2016 01:05
2:03:51.003> load 0x40100000, len 25256, room 16 
2:03:51.069> tail 8
2:03:51.069> chksum 0x0a
2:03:51.069> load 0x3ffe8000, len 900, room 0 
2:03:51.069> tail 4
2:03:51.069> chksum 0x64
2:03:51.069> load 0x3ffe8388, len 10692, room 4 
2:03:51.069> tail 0
2:03:51.069> chksum 0x34
2:03:51.069> csum 0x34
2:03:51.069> csum err
ets_main.c
So this is the "garbage" I received - after finding the right baudrate for the bootloader. It seems that if the rom size gets to large, i receive this? Any recommendation on a memory layout for larger roms and SPI? (Spi size has to be around 200KB for web files"
Fangorn-SPB
@Fangorn-SPB
Mar 06 2016 07:29
@patrickjahns it's at esp-03?
hreintke
@hreintke
Mar 06 2016 08:57

@patrickjahns :
You need to fix the issue in the linker (LD) file. If you don't use rboot : eagle.app.v6.cpp.ld
Now :

  iram1_0_seg :                         org = 0x40100000, len = 0x8000
  irom0_0_seg :                         org = 0x40209000, len = 0x78000

New :

  iram1_0_seg :                         org = 0x40100000, len = 0x9000
  irom0_0_seg :                         org = 0x4020A000, len = 0x78000

In SmingRTOS that is the default setting.

That is independent from SPI size.
alonewolfx2
@alonewolfx2
Mar 06 2016 09:00
@avr39-ripe are you arround? i have a question about rtc lib
or @hreintke can we use i2c when we change cpu freuwnce to 160mhz
ystrem
@ystrem
Mar 06 2016 09:11
@alonewolfx2 I think so
alonewolfx2
@alonewolfx2
Mar 06 2016 09:14
@ystrem it didnt work. at least for ds3231
hreintke
@hreintke
Mar 06 2016 09:16
@alonewolfx2 :
I don't know about the i2c & cpu frequency dependency.
Be careful however, changing freq in SmingRTOS also changes behavior of vTaskDelay timing.
alonewolfx2
@alonewolfx2
Mar 06 2016 09:17
hmm i didnt know
hreintke
@hreintke
Mar 06 2016 09:20
freertos timing is dependent on a "cpu freq -> time" conversion. That is defined fixed at compile time.
So is is not Sming/Espressif related but purely freertos
alonewolfx2
@alonewolfx2
Mar 06 2016 09:21
ok
one more thing
alonewolfx2
@alonewolfx2
Mar 06 2016 09:27
SystemClock.setTimeZone(-2); gives right time for me but i am on gmt +2
hreintke
@hreintke
Mar 06 2016 09:30
Can you check the SystemClock class if there is a bug and PR if that is the case
alonewolfx2
@alonewolfx2
Mar 06 2016 09:30
ok
hreintke
@hreintke
Mar 06 2016 09:31
thx
Alexander V. Ribchansky
@avr39-ripe
Mar 06 2016 09:57
@alonewolfx2 @hreintke SystemClock internally use LOCAL time not UTC (GMT) as it should. Current implementation is fully working, you just need to specify proper tz type SystemClock.setTime(timestamp, eTZ_UTC); with this command it uses timestamp in UTC to set SystemClock.. further is you use SystemClock.getTime() you will get LOCAL TZ time according to SystemClock.setTimeZone if yo set SystemClockTimeZone(2) you will get LOCAL time as GMT+2 (PLUS not MINUS!)
@alonewolfx2 160Mhz works fine with DS3232RTC lib on NONOS.. do not test it on RTOS yet..
alonewolfx2
@alonewolfx2
Mar 06 2016 10:01
not working on rtos
Alexander V. Ribchansky
@avr39-ripe
Mar 06 2016 10:02
@alonewolfx2 I think it rtos+i2c related problem.. but cant give you good advice how to solve this :(
Patrick Jahns
@patrickjahns
Mar 06 2016 10:03
@hreintke
thanks for the tipp with changing size in LD - since I needed to move to rboot anyway I discovered it also with the linker files from rboot. Can we change it by default?

@hreintke
if you don't mind - about the question regarding returning a String object instead of a String - wouldn't the case of String mean that the function receiving the object copies everything from String and creates it's own local version? In regards to the internal char of String - wouldn't that be also copied?

Might be that I misunderstood something with the workings of return by value/pointer

alonewolfx2
@alonewolfx2
Mar 06 2016 10:22
@hreintke i have another issue on rtos :)
Fatal exception 28(LoadProhibitedCause):
epc1=0x4023e507, epc2=0x00000000, epc3=0x00000000, excvaddr=0x0000002c, depc=0x00000000

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

load 0x40100000, len 23928, room 16 
tail 8
chksum 0xc1
load 0x3ffe8000, len 884, room 0 
tail 4
chksum 0x9c
load 0x3ffe8378, len 9080, room 4 
tail 4
chksum 0xda
csum 0xda
don't use rtc mem data
this happens when i try to connect module over ftp
Patrick Jahns
@patrickjahns
Mar 06 2016 10:24
@alonewolfx2
can you export the lines where it happens from the debug msg?
(use addr2line from the xtensa tools for it)
alonewolfx2
@alonewolfx2
Mar 06 2016 10:26
gdbstub not working on rtos
Patrick Jahns
@patrickjahns
Mar 06 2016 10:26
you don`t need gdbstub
just use addr2line
hreintke
@hreintke
Mar 06 2016 11:05
@alonewolfx2 :
Not all issues you see on RTOS are caused by RTOS. Quick google search :smile: reveals s possible reason :
raburton/rboot#3
and that is 1/2 the price
hreintke
@hreintke
Mar 06 2016 11:16
@patrickjahns :
Missed your reply on the issue. Will check on the String/String* question
Patrick Jahns
@patrickjahns
Mar 06 2016 11:18
no worries - I am just unsure on the workings in general. Don`t want to unnecessarily increase ram usage when easily avoided. Just been working too much with python and never had to worry about restrictions/issues with to few ram
alonewolfx2
@alonewolfx2
Mar 06 2016 11:25
@hreintke am i using rboot? no :)
hreintke
@hreintke
Mar 06 2016 11:27
see the latest remark on the issue -> unrelated to rboot but That's common on boot if rtc hasn't been initialised (e.g. after hard reset, power on, etc) Sometimes you have to read between the lines to find the answer :smile:
alonewolfx2
@alonewolfx2
Mar 06 2016 11:27
i saw that line
this problem isnt about rtc
can you try ftpserver on your module? seems nonos version has same problem too
here is filezilla log
Durum:    192.168.88.19:21 bağlantısı kuruluyor...
Durum:    Bağlanıldı, hoş geldin iletisi bekleniyor...
Yanıt:    220 Welcome to Sming FTP
Komut:    USER me
Yanıt:    331 OK
Komut:    PASS ***
Yanıt:    230 OK
Durum:    Sunucu ASCII dışındaki karakterleri desteklemiyor.
Durum:    Bağlandı
Durum:    Klasör listesi alınıyor...
Komut:    PWD
Yanıt:    257 "/"
Komut:    TYPE I
Yanıt:    250 OK
Komut:    PASV
Yanıt:    500 Passive mode not supported
Komut:    PORT 192,168,88,230,12,249
Yanıt:    200 OK
Komut:    LIST
response:    150 Connecting
error:    Connection time out
error:    cant get file list
hreintke
@hreintke
Mar 06 2016 11:30
This message was deleted
Hata:    Bağlantı zaman aşımına uğradı
Hata:    Klasör listesi alınamadı
???
alonewolfx2
@alonewolfx2
Mar 06 2016 11:32
edited
response:    150 Connecting
error:    Connection time out
error:    cant get file list
hreintke
@hreintke
Mar 06 2016 11:37
C:\temp>ftp
ftp> open 10.0.0.211
Connected to 10.0.0.211.
220 Welcome to Sming FTP
Name (10.0.0.211:Herman): me
331 OK
Password:
230 OK
Remote system type is Windows_NT:.
ftp> ls
200 OK
150 Connecting
01-01-15  01:00AM               2981 index.html
226 Transfer Complete.
ftp> quit
221 OK
Patrick Jahns
@patrickjahns
Mar 06 2016 11:40
@alonewolfx2 - use the add2line utility from xtensa tools (http://linux.die.net/man/1/xtensa-linux-gnu-addr2line) to find out what is causing the reset
Add2line maps the codes against the compiled code and source code
no need for gdbstub or anything - it just decodes the objects on your pc
alonewolfx2
@alonewolfx2
Mar 06 2016 11:41
@hreintke so its working on you? did you try to get file list?
@patrickjahns i am on windows
hreintke
@hreintke
Mar 06 2016 11:44
What do you mean with get file list ?
alonewolfx2
@alonewolfx2
Mar 06 2016 11:45
@connect ftp and list files
hreintke
@hreintke
Mar 06 2016 11:46
That is what I did. The ls command shows the files
alonewolfx2
@alonewolfx2
Mar 06 2016 11:46
did you show any files?
hreintke
@hreintke
Mar 06 2016 11:46
See above
ftp> ls
200 OK
150 Connecting
01-01-15  01:0AM               2981 index.html
226 Transfer Complete.
Patrick Jahns
@patrickjahns
Mar 06 2016 12:07
@alonewolfx2
it doesn`t matter if windows or *nix - the esp toolkit has a compiled version of it under Espressif\xtensa-lx106-elf\bin
for me it is called xtensa-lx106-elf-addr2line.exe
(on windows too)
Harry Böttcher
@harry-boe
Mar 06 2016 12:08
As I posted on issue #618 it might not work.I don’t see any SPI pns on the board and most notaby there is no Flash on that board to buffer the image data. You can get it to work but not with the ArduCAM libs
Harry Böttcher
@harry-boe
Mar 06 2016 12:19
@alon24 As for the ArduCAM implementation.
It is still not fully sorted. It works fin for smaler images but when i capture bigger images it drops a few bytes. It happens each time when the IDataSourceStream is sent out over the TCP Stack and therefore SPI Reading is interrupted. Looks like that the SPIBurst mode can not handle the situation. I noticed the same Behaviour with the Arduino/ESP implementations as well. So might be a Camera issue.
Ther might be a solution with resetting the ArduCAm FIFO buffer to the right position before again entering FIFO Burst mode. Ther is a Commadn call for that but i have not yet played with it. Still bussi with real word and the new SPI imlementation
alon24
@alon24
Mar 06 2016 13:30
@harry-boe thanks for the info, I will not buy the cheap one, and also for my education, does the arducam work for static pics and not for video transfer? do you think that you will be able to publish that code, and maybe get video working later? the prospect of a cam on anything is very nice to have
Patrick Jahns
@patrickjahns
Mar 06 2016 13:32
@hreintke
is it only possible to enable/disable/change ip settings in init?
So when changing these settings I need to perform a reset/reboot?
hreintke
@hreintke
Mar 06 2016 13:34
@patrickjahns :
Just submitted PR #635 for your use on file saving
@patrickjahns :
I am not sure on that. Maybe @avr39-ripe has a better view/knowledge
Patrick Jahns
@patrickjahns
Mar 06 2016 13:39
@hreintke
thanks for the filestream part - will continue work on the http post part - was giving me headache so I turned to other parts ;-)
hreintke
@hreintke
Mar 06 2016 13:46
No problem, I know how it works. Good that you are working on nice extensions.
Patrick Jahns
@patrickjahns
Mar 06 2016 13:48
Well it`s stuff I need (more want) anyway ;-)
Once the http changes are all done I`ll apply them against RTOS as well
hreintke
@hreintke
Mar 06 2016 13:55
That is how I started with Sming and for new functionality still the base for starting/finishing.
Always have some "ideas in progress"
Patrick Jahns
@patrickjahns
Mar 06 2016 14:05
I like it - it`s just sad that the community is very tiny - while other frameworks receive a lot of attention even though their implementation is not really compatible to the espressif sdk
alonewolfx2
@alonewolfx2
Mar 06 2016 14:30
@patrickjahns yes you are right. but how can we improve our comunity
Harry Böttcher
@harry-boe
Mar 06 2016 14:37

@harry-boe thanks for the info, I will not buy the cheap one, and also for my education, does the arducam work for static <

It basicaly creates multipart streams with full jpg images in each part. Not shure what kind of frame rate you get this way ..

Patrick Jahns
@patrickjahns
Mar 06 2016 14:46
@alonewolfx2
that is a difficult question to answer - the people who are already part are helpful, so I don`t see them needing to change them.
If you/we/the project wants more user - it needs people writing and talking about in the communities. But this comes with two things: more publicity means more interested users. Part of them will be capable of helping to develop, most part will be needing support though
Meaning what every project needs improvement in, is documentation and lowering the barrier of adaption to a minimum (good documentation, easy setup etc..)
With the scarce resources right now, it is hard to develop features and write documentation at the same time
Patrick Jahns
@patrickjahns
Mar 06 2016 15:01
I hope people didn`t misunderstand the part about them not needing to change ;-). I wanted to express with it that the small community is already great! ;-)
alon24
@alon24
Mar 06 2016 15:13
@harry-boe is it usable at all? Is there a way to use it now?
HappyCodingRobot
@HappyCodingRobot
Mar 06 2016 16:34
@harry-boe what's the status of your new SPI implementation? Is it ready to make changes based on that for non-os?
HappyCodingRobot
@HappyCodingRobot
Mar 06 2016 16:46
@hreintke hi, would it be a good idea at this point to change my APA lib to the new implementation from harry-boe? I think it's a much cleaner implementation and it has some nice advantages for me .. :)
Harry Böttcher
@harry-boe
Mar 06 2016 16:53

@harry-boe is it usable at all? Is there a way to use it now?

I’m not yet there. Still need more work and the SPI API changes is a lot of work.
The problem is reading the ArduCAM FIFO buffer in burst mode. I have not tried the FIFO single mode but this should work but slow.

@harry-boe what's the status of your new SPI implementation? Is it ready to make changes based on that for non-os?

The AP is defined with a base class. I have ported the Software SPI to the new Base class and made the SD Card working with it (was a bit tricky). I also have a workin HW SPI implementation but need to port it to the new API. And last but not least a lot of testing as it impacts many Libs and Samples

HappyCodingRobot
@HappyCodingRobot
Mar 06 2016 18:00
@harry-boe thanks for your answer ..
jmccoy555
@jmccoy555
Mar 06 2016 18:22
Howde, is anyone using the MPR121 and could share an example?
alon24
@alon24
Mar 06 2016 20:52
@avr39-ripe your example does not work, u did not add the jquery and bootstrap files to the spiff
I mean Basic_WebSkeletonApp
alon24
@alon24
Mar 06 2016 21:02
I cannot get it to run, nothing shows (I added bootstrap css and jquery), can you please check it?
I am using rtos
Alexander V. Ribchansky
@avr39-ripe
Mar 06 2016 21:04
@alon24 yes, my fault.. you can get them from nonos example..
bit later wil make pr for rtos..
@alon24 get missing files from the same example from nonos sming
alon24
@alon24
Mar 06 2016 21:09
trying that
that works
@avr39-ripe back to my original question, can esp PUSH data to web? not after being queried by ajax (from web js file, worker thread)
alon24
@alon24
Mar 06 2016 21:14
that is what i do with websockets, i have a timer in sming, esp which PUSHES data to all clients
(because I want it every 1s, and worker thread 1000 is not reliable - as I see it )
this is for when i want to display clock with seconds, wotker thread 1000 will not always give the correct seconds
Alexander V. Ribchansky
@avr39-ripe
Mar 06 2016 21:19
no, it cannot push..
alonewolfx2
@alonewolfx2
Mar 06 2016 21:21

@alon24

can esp PUSH data to web?

what does it mean
for example esp can send temperature data to thingspeak
alon24
@alon24
Mar 06 2016 21:22
well, i have this implemented using websockets, there is a webpage served via esp, and on it i have a clock, and temp readings,
the esp server code, has a timer, which updates the web page using websocket, so as to have all the clients connected show the correct time, and temp
Alexander V. Ribchansky
@avr39-ripe
Mar 06 2016 21:23
websokets are better suited for push.. if you really need push
alon24
@alon24
Mar 06 2016 21:23
yes, I just wanted to see if there was something better :)
@alonewolfx2 am I making sense to u?
Alexander V. Ribchansky
@avr39-ripe
Mar 06 2016 21:24
and do you really need second precise clock??
may be just synchronie time on client from esp??
alon24
@alon24
Mar 06 2016 21:25
no, i do not , but i want the temp to be there
i want the esp server to send the data as it reads it
as I said, this is all implemented
just checking the new stuff :)
Alexander V. Ribchansky
@avr39-ripe
Mar 06 2016 21:26
temp can be there... requesr it each 4..5 seconds... and in real apps temperature changes Much slower..
alon24
@alon24
Mar 06 2016 21:26
i agree
it can
:)
Alexander V. Ribchansky
@avr39-ripe
Mar 06 2016 21:28
I understand that you have working solution.. ;) just ask do you really need fresh temp measure every sec??
alon24
@alon24
Mar 06 2016 21:29
as of a lot of stuff I do not NEED, but I WANT (2 separate issues), and as I said, it was a pain to get it in, but I am not going to change it right now
it basically comes to a question of who DRIVES the code, web client, or esp server
Alexander V. Ribchansky
@avr39-ripe
Mar 06 2016 21:30
@alon24 I get your opinion; )
alon24
@alon24
Mar 06 2016 21:30
I prefer server because then all clients (and realy I know I will have only one) are synched
its nicer
Alexander V. Ribchansky
@avr39-ripe
Mar 06 2016 21:33
I try to separate business logic from user interface.. logig independently from ui does its job on esp(server ) and ui is as much as it can works on browser ..
alon24
@alon24
Mar 06 2016 21:34
how would u sync the clock?
Alexander V. Ribchansky
@avr39-ripe
Mar 06 2016 21:48
@alon24 from js when page loads or gets focus it reqests time from server and calculates difference between server time and client time.. then when js code needs server synced time it in fact gets its local time and correct it with above calculated difference; )
you can even calculate round trip of request to even more precise difference calculation
alon24
@alon24
Mar 06 2016 21:54
thanks for this, i will need to sleep on it