Avatar for pablorodiz

pablorodiz

Member since Feb 2016 • Last active Mar 2016
  • 0 conversations
  • 6 comments

Most recent activity

  • in JavaScript
    Avatar for pablorodiz

    Just in case anyone is interested on secure webSockets I have a rough implementation on GitHub (wss.js) based on the examples in this thread and the current ws module. It works with my server, but I would like to make some more testing and try to do the server part before asking for a pull request.

    By the way, I used a new module, wss.js, instead of modifying the current ws.js file since SSL/TLS is not available on all Espruino boards. But I can accept sugestions.

  • in News
    Avatar for pablorodiz

    Just in case anyone is interested on secure webSockets I have a rough implementation on GitHub (wss.js) based on the examples in this thread and the current ws module. It works with my server, but I would like to make some more tests and do the server part before asking for a pull request.

    By the way, I used a new module, wss.js, instead of modifying the current ws.js file since TLS is not available on all Espruino boards. But I can accept sugestions.

  • in News
    Avatar for pablorodiz

    @Gordon waiting for the postman is not my favorite sport, but source code browsing and Makefile tunning is ;-)

    And by the way, the most I try it the most I like the Espruino (software) platform, so I will try to be of some help in the code if I can get my project to go ahead.

  • in News
    Avatar for pablorodiz

    First of all thanks Gordon for the point on the two banks of memory on the F4 discovery. I will take a look on that and see if I can make it work. Additionally I would like to share that I've get to run HTTPS against my own server, so everything seems to work. But still no luck with Google Sheets. I will keep trying.
    About the second part of your answer I will be very pleased to support Espruino by purchasing a Pico board, even if I do not use it, but could you please tell me where to find also the ESP8266 adapter? None of the european distributors seems to have it.
    It is not a matter of saving 20$ but saving my time (I have to eat too). I live in Spain and there are no local distributors of Espruino here, so I really doubt I can get the board in my hands in less than a week. Any way, I will buy it, do not worry.

  • in News
    Avatar for pablorodiz

    Ok, I've managed to solve the problem by myself, but thanks anyway. It seems that those 128k additional flash memory in the Pico do not exist in the STM32F4Discovery, but I found some usable flash in the last two sectors, by changing the the first line in your example to:

    var addr = (process.memory().flash_start + process.memory().flash_length-(2*2047))&­~2047;
    

    Now mbedtls understands the certificates, but still fails with Not enough memory during handshake phase:

    >reset();
    =undefined
        _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v84.238 Copyright 2016 G.Williams
    >echo(0);
    =undefined
    Connecting to WiFi
    192.168.0.29
    Connecting to Google
    Connecting with TLS...
    Loading the CA root certificate...
    Loading the Client certificate...
    Loading the Client Key...
    Performing the SSL/TLS handshake...
    ERROR: Failed! mbedtls_ssl_handshake returned Not enough memory
    ERROR: Failed! mbedtls_ssl_handshake returned -0x6d00
    Connecting to Google
    Connecting with TLS...
    Loading the CA root certificate...
    Loading the Client certificate...
    Loading the Client Key...
    Performing the SSL/TLS handshake...
    ERROR: Failed! mbedtls_ssl_handshake returned -0x3b10
    ERROR: Failed! mbedtls_ssl_handshake returned -0x4290
    Connecting to Google
    Connecting with TLS...
    Loading the CA root certificate...
    Loading the Client certificate...
    Loading the Client Key...
    Performing the SSL/TLS handshake...
    ERROR: Failed! mbedtls_ssl_handshake returned -0x3b10
    ERROR: Failed! mbedtls_ssl_handshake returned -0x4290
    Connecting to Google
    Connecting with TLS...
    Loading the CA root certificate...
    Loading the Client certificate...
    Loading the Client Key...
    Performing the SSL/TLS handshake...
    ERROR: Failed! mbedtls_ssl_handshake returned -0x3b10
    ERROR: Failed! mbedtls_ssl_handshake returned -0x4290
    Connecting to Google
    Connecting with TLS...
    Loading the CA root certificate...
    Loading the Client certificate...
    Loading the Client Key...
    Performing the SSL/TLS handshake...
    ERROR: Failed! mbedtls_ssl_handshake returned -0x3b10
    ERROR: Failed! mbedtls_ssl_handshake returned -0x4290
    

    I also tried to generate my own client certificates, as sugested to profra, but still the same out of memory error.
    By the way, I'm using ESP8266 as my network interface. Any idea on how to get it to work?

  • in News
    Avatar for pablorodiz

    Hi, I am new to this forum, so first of all congratulations for a great work with Espruino. I am evaluating the use of STM32 processors and Espruino for a project and one of the main requirements of the project is TLS support.
    I do not have an Espruino Pico board at hand, so I am trying everything on STM32F4Discovery board. I managed to compile Espruino for this board with TLS support and the image seems to be working (I get mbedTLS errors) but I am stuck on the Flash part to store certificates. I was playing arround with the Flash address where the certificates are stored, but the result is always the same, the system stops on flash.write... I also try to keep the certificates in RAM, because this board has more memory than the Pico, but sadly it is not enough... Any suggestion? By the way, for my tests I am using your code from the Google Sheets tutorial.

Actions