6 Replies Latest reply on Mar 23, 2015 12:42 PM by ForumMigrationAdmin

    Intel Galileo Dev Kit, a few questions RE encryption and using arduino sketches

    ForumMigrationAdmin

      Hi guys just got the IoT Dev  Kit set up and working well. I have a few questions for a project that I am going to continue from when I was using the extended linux version. I have written a sketch that sends a get request from the board to my API on my website and updates the database with the temperature and also receives information from the database about whether to turn the led on or off on the board. I want to extend this with the new tools from the kit but have a few questions.

      1.  Is it possible to import the Arduino sketch into the Eclipse IDE and continue work from where I left off or will it require re writing in Eclipse.

      2. How can I send secure requests I have not been successful in sending a https request only http. I have read around that maybe this is not possible if not the minimum I need to do is some form of encryption that can be accessed via the php side on my webserver and vice versa I searched for days and found one library that was included on the previous version of linux for the Intel Galileo that would be compatible with php but could not get it working.

      Thanks to anyone that can offer assistance.

       

      www.plus.google.com/+AdamMiltonBarker

        • 1. Re: Intel Galileo Dev Kit, a few questions RE encryption and using arduino sketches
          ForumMigrationAdmin

          Was this a bad question ?

           

          www.plus.google.com/+AdamMiltonBarker

          • 2. Re: Intel Galileo Dev Kit, a few questions RE encryption and using arduino sketches
            ForumMigrationAdmin

            ForumMigrationAdmin wrote:

             

            Was this a bad question ?

             

            www.plus.google.com/+AdamMiltonBarker


            Looks like :-)

            Hi guys just got the IoT Dev  Kit set up and working well. I have a few questions for a project that I am going to continue from when I was using the extended linux version.

            What is "the extended linux version"?

            I have written a sketch that sends a get request from the board to my API on my website and updates the database with the temperature and also receives information from the database about whether to turn the led on or off on the board.

            programming natively you could easily use HTML5 websockets for that purpose which might work even better than HTTP GET requests. You may e.g. use mod_pywebsocket for that on the target if you speak Python or something similar for C/C++ which you can work on within the Eclipse IDE.


            I want to extend this with the new tools from the kit but have a few questions.

            1.  Is it possible to import the Arduino sketch into the Eclipse IDE and continue work from where I left off or will it require re writing in Eclipse.

            high-level speaking Arduino sketches are just C++ code. Hence in principle can be compiled natively as well (at the end it's exactly what the Arduino IDE does - it takes the sketch code and cross compiles it to a native executable). However, if it comes to Arduino specifics, there are a lot of wrappers required which you wouldn't require and find in the Intel IoT devkit Eclipse (well, you could in principle take the wrappers from Arduino IDE and put them to Eclipse IDE - at the end copy&paste from one sysroot to the other - but you would be on your own on that journey). That said, it depends on what you need to port. If it's just pure C++ functions which don't use Arduino specifics you should be able to 1:1 copy&paste them over. But just continuing projects wouldn't work by default.


            2. How can I send secure requests I have not been successful in sending a https request only http.

            That's just a question of what your http server supports. For https you would require certificates (either self signed or from an authority). Implementation vice you shouldn't see a difference between HTTP and HTTPS


            I have read around that maybe this is not possible if not the minimum I need to do is some form of encryption that can be accessed via the php side on my webserver and vice versa I searched for days and found one library that was included on the previous version of linux for the Intel Galileo that would be compatible with php but could not get it working.

            Not sure which server you use on Galileo. If you use lighttpd see e.g. http://redmine.lighttpd.net/projects/1/wiki/HowToSimpleSSL

            Using websockets it should also be relatively easy to use either ws: or wss: for a non-secure or secured (over TLS) websocket (see e.g. https://code.google.com/p/pywebsocket/source/browse/trunk/src/mod_pywebsocket/standalone.py section "Using TLS")

            • 3. Re: Intel Galileo Dev Kit, a few questions RE encryption and using arduino sketches
              ForumMigrationAdmin

              Looks like :-)

               

              Thank you lol

              What is "the extended linux version"?

              The large linux SD image as opposed to the one that came with the board.

              programming natively you could easily use HTML5 websockets for that purpose which might work even better than HTTP GET requests. You may e.g. use mod_pywebsocket for that on the target if you speak Python or something similar for C/C++ which you can work on within the Eclipse IDE.

              Ok thanks

              high-level speaking Arduino sketches are just C++ code. Hence in principle can be compiled natively as well (at the end it's exactly what the Arduino IDE does - it takes the sketch code and cross compiles it to a native executable). However, if it comes to Arduino specifics, there are a lot of wrappers required which you wouldn't require and find in the Intel IoT devkit Eclipse (well, you could in principle take the wrappers from Arduino IDE and put them to Eclipse IDE - at the end copy&paste from one sysroot to the other - but you would be on your own on that journey). That said, it depends on what you need to port. If it's just pure C++ functions which don't use Arduino specifics you should be able to 1:1 copy&paste them over. But just continuing projects wouldn't work by default.

              Ok cool thank you for the explanation, I have created a AI bot with voice synthesis and my aim with getting to grips with Eclipse is to integrate the idea of what I created in Arduino IDE with the AI program, I am guessing that I will be able to do this using a speaker attached to the board and hoping to integrate voice recognition.

              That's just a question of what your http server supports. For https you would require certificates (either self signed or from an authority). Implementation vice you shouldn't see a difference between HTTP and HTTPS

              When I was trying to send https request to my secure web server it was failing using port 443 which is why I asked, I would also like to integrate similar to my web api int the requests which basically uses signed requests and csrf protection.

              Not sure which server you use on Galileo. If you use lighttpd see e.g. http://redmine.lighttpd.net/projects/1/wiki/HowToSimpleSSL

              Using websockets it should also be relatively easy to use either ws: or wss: for a non-secure or secured (over TLS) websocket (see e.g. https://code.google.com/p/pywebsocket/source/browse/trunk/src/mod_pywebs... section "Using TLS")

              Cool thank you for taking your time to explain the above I am starting to rebuild my galileo system now with the systems then will tackle the request to the api and then the AI integration.

              www.plus.google.com/+AdamMiltonBarker

              • 4. Re: Intel Galileo Dev Kit, a few questions RE encryption and using arduino sketches
                ForumMigrationAdmin

                When I was trying to send https request to my secure web server it was failing using port 443 which is why I asked, I would also like to integrate similar to my web api int the requests which basically uses signed requests and csrf protection.

                Is your server listening at all on 443? Have you looked with netstat? Which server do you use? Have you enabled https?

                • 5. Re: Intel Galileo Dev Kit, a few questions RE encryption and using arduino sketches
                  ForumMigrationAdmin

                  I was talking about connecting to my linux VPS yes SSL is enabled, I havent been successful with creating a web server on the Intel Galileo I get the results as mentioned in the post I wrote yesterday about IPs being messed up, just in case you are not following what I meant I have a web api on my VPS which I have a web based admin system I built for people to control their CMS systems, I created a system that can be accessed via the admin system where it receives the information sent from the Galileo using a sketch based on the WebClient every 60 seconds. As the VPS receives the statuses sent from the board it updates the database and also returns back a Json array of settings that are configured by the admin system such as sound alerts on, LED alerts on, sensor detection on etc which in return the board then uses in the sketch I wrote to control the parts on the board.

                   

                  www.plus.google.com/+AdamMiltonBarker

                  • 6. Re: Intel Galileo Dev Kit, a few questions RE encryption and using arduino sketches
                    ForumMigrationAdmin

                    This is the project I have created in the Arduino IDE

                    https://www.techbubble.info/LinGalileoSecurity

                     

                    1422429394_LinGalileo_Security_System_Security_Location.jpg

                    1422429608_LinGalileo_Security_System_Security_Locations_Detections.jpg

                    1422048068_LinGalileo_Security_System_Office_Open.jpg

                    www.plus.google.com/+AdamMiltonBarker