Week 18

1 minute read

WEEK 17

  1. On the one hand this week I have tried to solve the problem I was giving when trying to test the development the integration of webserial with kibotics-webserver from another machine.
    • Try running the browser as administrator, for both the macOs machine and the Windows machine. But it kept giving the same problem.
    • To rule out that it was a problem of the library that I use to load the program to the board. I used the first approach of webserialApi that I developed, the simple example of lighting a led on Arduino.

      • Perform the same test, raising the web on a server on my linux machine, and testing from my other machines. The result was still the same failure.
      • Also in the development code itself a condition is added that shows an error message, in case the browser does not allow webserial. And when accessing from the other machines this error was jumping, so it was not recognizing the serial api.
          if ('serial' in navigator) {   
          const notSupported = document.getElementById('notSupported');
          notSupported.classList.add('hidden');
          }
        

    Execute-fail-MacOs

    Execute-fail-MacOs

    • After these results, I was not quite sure how to proceed, because it was not a problem to run the web as administrator or when opening the port but the serial api was not being recognized. I thought it could be because it has to be accessed by HTTPS so I decided to open an issue on github in the repository where the web serial development is located asking about the problem I had.
      • The answer they have given me is:
        The Serial API is only exposed in “secure contexts” which means localhost or HTTPS. The navigator.serial property will be undefined if the page is loaded over HTTP.
    • I put as a task for the next week: First raise the simple web that lights a led, on an apache server, adding SSL / TLS certificates, to allow it to go through HTTPS, to see if the problem is solved and I can scale the test to the main development.

Updated: