These are chat archives for SmingHub/Sming

28th
Jul 2016
gikvin
@gikvin
Jul 28 2016 05:12
@hreintke Thank you. This means if i have 4m, i will take first 1m for program and then for example 2m of spiffs and last 1m will be untouchable. Can you tell me how to configure spiffs filesystem start and end points?
Harry Böttcher
@harry-boe
Jul 28 2016 09:15
@hreintke
I was not aware of the Flashstream. If i get that right it can actualy be used to temper the code - right?
How is the adress calculaed. Absolut from the 4MB memory or raltiv to the Prgramm segment ?
robotiko
@robotiko
Jul 28 2016 09:17
@harry-boe side thinking about the security layer contribution.
Like signig OTA firmware with hw keys.
this soemhow can also be used for code protection?
I recall some guidelines using a bootloader in with signed firmware in the atmel documentation
that cna be a radical usage that is not present in any other framework and would attrack people not worried about security that much but about the code IP
Harry Böttcher
@harry-boe
Jul 28 2016 09:25
@robotiko
Yep code signing and verification maybe one issue.
But as we have no real OS to verify the signature before it loads the firmware, verification might only happen on first firmware load OTA.
Another case i have is more tricky. The Atmel chips do not have enought room to hold the whole X509 certs on he cyprtochip. So they use a Cert template to reconstruct the X509 ceet with key on the device and the template from memory.
So i need a way to store the template during provisioning. The current sample app uses a Template from a include file.
alonewolfx2
@alonewolfx2
Jul 28 2016 10:15
@HappyCodingRobot yes you are right but the point is total cost for me . of course it depend on usage but for example if you need ethernet you will give raspberrypi price
hreintke
@hreintke
Jul 28 2016 10:20

@harry-boe :
I don't know what you mean with "temper the code".
The address is absolute but if you need relative it is probably possible to add that to flashstream constructor or attach function. Or add a generic sming function to return the first available address but I think that will then be within the current program 1m segment and not the absolute sector address.

The flashstream is currently used within smingRTOS to facilitate OTA over FTP

Harry Böttcher
@harry-boe
Jul 28 2016 12:29
@harry-boe :
I don't know what you mean with "temper the code".
Code tempering is basicaly modifying the executable on the flash. Can be within the code or from “external” code
Code tempering is basicaly modifying the executable on the flash. Can be within the code or from “external” code
hreintke
@hreintke
Jul 28 2016 12:35
@harry-boe :
Then, yes flashstream can be used for tempering the code.
But : Sming/Flashstream is a layer above espressif sdk -> that can be done also by using the native sdk functions.
hreintke
@hreintke
Jul 28 2016 14:48

@HappyCodingRobot :
Took some time, but I finished the QueuedTimer.
The updated version is still in the QueuedTimer branch.
Updates in the application to use either

  • Timer t = new Timer(true);
  • t.InitalizeMs(10,MyDelegate,true)
  • t.setCallback(MyDelegate,true)
  • t.setQueued(true)

Can you do a final test ? If it works I will merge.

HappyCodingRobot
@HappyCodingRobot
Jul 28 2016 18:54
@hreintke Thank you very much! I will test as soon as possible.. at least at the weekend :)