These are chat archives for SmingHub/Sming

19th
Feb 2016
zhivko
@zhivko
Feb 19 2016 00:24
@hreintke: thanks
alonewolfx2
@alonewolfx2
Feb 19 2016 06:07
@hreintke yes. I will check tonight
Alexander V. Ribchansky
@avr39-ripe
Feb 19 2016 11:40
@hreintke Hello! Try to run some of my sming-based apps on SmingRTOS - all compiles good after some patches, but either mount_spiff() and mount_spiff_manual with proper address return -1 so no FS in rtos-based sming ;( try some examples from SmingRTOS where fs used - no luck - no fs inside ;( can you point me what I do wrong? OS FreeBSD esp-alt-sdk
hreintke
@hreintke
Feb 19 2016 11:43
@avr39-ripe Double posting ? :smile:
Spiffs is implemented and working in RTOS. Let's start with the examples.
Which one did you test with no luck ?
Alexander V. Ribchansky
@avr39-ripe
Feb 19 2016 11:44
@hreintke websockets.. smingrtos was make rebuild spiffy and then in example dir make rebuild.. flashed to esp-12 and no fs inside.
@hreintke app itself works.. there is console output.. it connects to wifi.. but no fs
hreintke
@hreintke
Feb 19 2016 12:10
@avr39-ripe :
Just to be sure the http_websockets example ?
Alexander V. Ribchansky
@avr39-ripe
Feb 19 2016 12:10
@hreintke yes, this was the test case
hreintke
@hreintke
Feb 19 2016 12:15
I am at my esp now. Compiled and run the example and behaves OK.
How did you check that fs was not available ?
Alexander V. Ribchansky
@avr39-ripe
Feb 19 2016 12:16
@hreintke enter IP of esp12 from console to browser -> 404 NOT FOUND page from sming
enable debbuging in app mount_spiff = -1
hreintke
@hreintke
Feb 19 2016 12:19
Can you run the serial on 74880 ?
Alexander V. Ribchansky
@avr39-ripe
Feb 19 2016 12:22
@hreintke yes.. but just grabbage on screen.. app iteslf is tuned to 115200
hreintke
@hreintke
Feb 19 2016 12:22

Do you have build output like this ?

# Generating spiffs_bin
Checking for spiffs files
files directory exists. Creating out/firmware/spiff_rom.bin
Creating rom 'out/firmware/spiff_rom.bin' of size 0x80000 (524288) bytes.
Adding files in directory 'files'.
Added 'index.html' to spiffs (1781 bytes).
out/firmware/spiff_rom.bin---------->0x52000

If so what is the value of the "0x52000" at your build ?

Alexander V. Ribchansky
@avr39-ripe
Feb 19 2016 12:22
yes.. indeed
hreintke
@hreintke
Feb 19 2016 12:24
please update the app to use 74880.
Then can see earlier debug messages
Alexander V. Ribchansky
@avr39-ripe
Feb 19 2016 12:25

Generating image...

Generate firmware images successully in folder out/firmware.
Done

Generating spiffs_bin

Checking for spiffs files
files directory exists. Creating out/firmware/spiff_rom.bin
Creating rom 'out/firmware/spiff_rom.bin' of size 0x30000 (196608) bytes.
Adding files in directory 'files'.
Added 'index.html' to spiffs (1705 bytes).
out/firmware/spiff_rom.bin---------->0x52000

same output.. same values..
hreintke
@hreintke
Feb 19 2016 12:28

If you have your app serial on 74880 you see something like this in the output.

HardwareSerial uart 0, serialQueue creation ok
HardwareSerial uart 0, serialTask creation ok
idle_task_hdl : 3fff3c80,prio:0, stack:176
tim_task_hdl : 3fff4078, prio:2,stack:256
xPortStartScheduler
frc2_timer_task_hdl:3fff4588, prio:12, stack:512

OS SDK ver: 1.3.0(68c9e7b) compiled @ Nov  2 mount res: 0

fs.start: address 0x52000, size: 512 Kb, result : 0

The mount result = 0
Station configuration was updated to: FRITZ!Box Fon WLAN 7360
mode : sta(5c:cf:7f:01:69:1e)
add if0

The fs.start line, does that also contain the 0x52000 ?

This The mount result = 0 will not be in. It is my local update to the application
Alexander V. Ribchansky
@avr39-ripe
Feb 19 2016 12:30
mount result was -1 when I try even on 115200
hreintke
@hreintke
Feb 19 2016 12:31
What is the SPI_SIZE you have set ?
Alexander V. Ribchansky
@avr39-ripe
Feb 19 2016 12:31
cannot get resonable output on 74880.. may be my pl2301 is bad on such speeds..
no modification of SPIF_SIZE in example app.. in my own app 192K
hreintke
@hreintke
Feb 19 2016 12:32
forget the 74880 for now. I remembered something on SPI_SIZE
not SPIFF_SIZE -> SPI_SIZE
Alexander V. Ribchansky
@avr39-ripe
Feb 19 2016 12:33
no modification in example app... what spi_size should I set for esp12E with 4Mbytes flash
?
hreintke
@hreintke
Feb 19 2016 12:34
SPI_SIZE=4M
In RTOS, the sdk checks on reading flash behind this size.
If it set to low, you get read errors, although the flash exists and is loaded with data
RTOS SDK from espressif, not Sming :smile:
hreintke
@hreintke
Feb 19 2016 12:42
I will be out for the next 1 - 2 hours. Will be back then. Just leave a message here.
Alexander V. Ribchansky
@avr39-ripe
Feb 19 2016 12:43
@hreintke SPI_SIZE=4M is what I need to add.. THANKS a lot!!
hreintke
@hreintke
Feb 19 2016 13:43
OK, Will put a note in the readme so that you are the last to hit this issue :smile:
slaff
@slaff
Feb 19 2016 17:20
@hreintke Do you have any idea where are these functions in RTOS and how are they named there:
sntp_get_current_timestamp
sntp_localtime
sntp_asctime
sntp_get_current_timestamp
ets_memset 
ets_vprintf
system_mktime
alon24
@alon24
Feb 19 2016 17:34
@hreintke did u implement a replacement for serverready?
slaff
@slaff
Feb 19 2016 17:56
And another function that was in the NONSDK that I cannot find: ets_strncpy
Patrick Jahns
@patrickjahns
Feb 19 2016 18:51
hey there - I am switching from the esp/arduino framework over to sming - just wondering if I should stay with the nonos version or already use the rtos version? Will the nonos version be supported in the future (after the transition is complete), or will it be deprecated?
alon24
@alon24
Feb 19 2016 19:01
Rtos
Emogg
@emogg
Feb 19 2016 20:15
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       z
hreintke
@hreintke
Feb 19 2016 20:39
@slaff
The rtos documentation here shows the available functions http://bbs.espressif.com/viewtopic.php?f=50&t=822
For the ets_.. functions we should use the freertos equivalents. That will keep sming ready for other boards like esp32.
Part of them are available as f.e. vprintf /strncpy
BTW Is the axtls implementation dependent on (s)ntp ?.
That would impose a requirement of internet connection ?
slaff
@slaff
Feb 19 2016 21:05
@hreintke if I understood you correcly strncpy and vprintf are in Rtos,
Can you tell me which lib and which header?
SNTP is needed if the validity of the SSL cert has to be checked
For a start there can be dummy date function. But at some point it will be more secure to have the correct time on the device and compare cert expiration date.
hreintke
@hreintke
Feb 19 2016 21:12
@slaff :
For strncpy & vprintf : I don't know. What I do know is that when I use it in an application it is found.
I am not very experienced in this area so if you can help is this much appreciated.
SNTPclear. If it not available, we do have the ntpClient class in sming which provides also date/time functionality.