Hot answers tagged

13

MCUs mounted on Arduinos don't have the horse power to handle https connections. Yún does handle https on the linux side, with software like curl, wget or python. Your sketch can just delegate the task to the linux side. While curl works fine, despite having python preinstalled, you need to manually install python-openssl, since it's not available out of ...


9

(Disclaimer: I'm actually the author of the evothings.com article) The Arduino UNO is more than capable at doing TLS. I've just finished up a blog post series on the topic. I have a working example of an Arduino UNO doing elliptic curve cryptography (sect163r2) to exchange an AES-128 key for continued communication. http://ardiri.com/blog/...


6

I don't think it is possible due to the size and complexity of the SSL Library, because the Arduino would most likely be under powered. That being said you could make the requests to a regular server and use some sort of PHP script to proxy the request to the HTTPS server. Not sure how well it would work though. You may be interested into looking at this.


6

I list this as an answer for the sake of having it linked here. It is not full https yet but he is working on it and it may be doable in the future http://evothings.com/is-it-possible-to-secure-micro-controllers-used-within-iot/ here is a benchmark he did encrypting a message using a 1024 bit public key Arduino UNO 16Mhz AVR ==> ...


3

This line: if (client.connect(server,80 && LED == HIGH)) { is definitely not going to do anything useful. Nor is this line: else if(client.connect(server,80 && LED == LOW)) { In both lines you're take the logical AND of the number 80 and the result of testing the LED. Put the closing parenthesis in correct place: if (client.connect(...


2

As Federico Fissore says above, the Yún can only handle HTTPS (or SSL, whatever you want to call it) on the Linux side of the Yún. The first way to do it is using Python with Python OpenSSL. The way you do this is by issuing the following commands via SSH or YunSerialTerminal: opkg update opkg install python-openssl opkg update will make sure the package ...


2

If I were you, I would separate the "hardware" from the "software". This is quite an interesting "pattern". It's used by almost every Operating System, to assure compatibility with devices all around the world. But how? Layers The "OSI-model" typically describes a few layers. But to me, the most interesting part is the difference between "Host layer" and "...


2

Your problem is the content you are sending. While this format works well e. g. in Python libraries, this library seems to have a problem with it. I solved it this way, when I happened to face this problem: //all your other code, including the remaining HTTP-Request String content = "{\"temperature\":\""+String(value)+"\"}"; client.println("Content-Length:...


2

From your comment of Jul 1st, I understand that you can program your server in PHP. Then, and to expand on my own comments, I am only recommending that, whatever Web API you design, you keep it as simple as possible. For example, for telling the Arduino whether it should keep the shutter open or closed, you could write something like this in PHP: header('...


2

This could be an SD card SPI bus issue. Note that because the W5100 and SD card share the SPI bus, only one can be active at a time. If you are using both peripherals in your program, this should be taken care of by the corresponding libraries. If you're not using one of the peripherals in your program, however, you'll need to explicitly deselect it. To do ...


2

replace rtm.start with rtm.connect as per April 2017 Recent Updates log


2

You have: server.on("/", handleRoot); server.on("/test.svg", drawGraph); server.on("/",HTTP_POST,response); The first call using handleRoot species no particular method, and in this case it seems any method is acceptable. You later specify server.on("/",HTTP_POST,response); specifically for POST requests. These are ...


2

The ESP8266httpUpdate library wants to know in advance how large the file is before it starts downloading it. It wants to know this so it can tell, before trying to download (and program), whether or not there's enough space for it. If the size of the file isn't provided by the server it will report the error that you are seeing. The size of the file is ...


1

I would highly recommend splitting it into two parts: back end (C++) and front end (JS). You'll probably want to connect to a router, so your clients, like a phone and laptop need not be on that AP hotspot w/o internet. You first build an API with arduino using GET params to control, example pin values int level = server.arg("level").toInt(); analogWrite(2,...


1

No. There is no such facility in Bluetooth to provide such a feature. That's not to say that technically it can't be done, there just isn't any software (a web browser) that would support it. Instead you would need to use a Bluetooth-enabled app on the smartphone to communicate with the ESP32 over Bluetooth and display the data / provide control natively. ...


1

The Arduino cannot run Javascript, no. It could serve Javascript from an SD card to a web browser running on a PC / Pi / Phone, etc, but there is no way it can run it itself.


1

Write handlers for different URLs server.on("/5/on", led5On); server.on("/5/off", led5off); do you get the concept? or you could write one handler server.on("/setLED", setLED);, if you would send "/setLED?num=5&state=on". and then in setLED function get the parameters values as String num = sever.arg("num"); String state = sever.arg("state"); ...


1

With the help of the library developer, I found out that it was a problem on the handshake version. So, I just downgraded my socket.io app from 1.0 to v 0.9.11 and it worked.


1

this is exaclty waht get are supposed to do. Use a POST or use a redirect; a POST is way better as the "back" button of the browser will take care of it


1

Another option is Blynk who offer a server, a smartphone app, and a set of libraries and example sketches for Arduino. Also an active and helpful online user community, where the developers participate. The server does not make view-able web pages; its job is to enable the Arduino and the app to communicate with each other. The app lets the user quickly ...


1

I believe the term you want to search on is "web scraping". Assuming you are fine with people knowing the state of "things" in your home, you can simply leave the states up on your public web page. That is, you click on a button on your web page and change the text from "shutter up" to "shutter down". Mean while, your Arduino is "web scraping" the same ...


1

Judging from your reaction, you don't want to use a WiFi/Bluetooth/Ethernet shield Arduino has no built-in Bluetooth or Ethernet. The question is shifting a little towards software, but okay. 1. Using your PC as Ethernet/Bluetooth receiver You can (and I believe you want to) use your PC as the receiver. Talking in network terms, your phone has to become ...


1

It becomes lots easier if you see the yun as a linux computer with a arduino connected over serial. Then the question becomes: what is the best way to send commands over the internet to a (linux) computer. Answer: there are so many ways because there is no best way. What are the main key drivers: Your linux computer needs to be reachable from the internet. ...


1

So I figured out the answer to my own question. It turns out there must be a mistake in the example sketches that come with the ESP8266 shield I bought, as the function to begin Arduino/ESP8266 communications didn't have any arguments when the function expected parameters. So it appeared to be trying to set their baud rate to 0!! I edited the library to ...


1

The nRF24L01+ modules aren't WiFi. They cannot talk to a WiFi router or the internet. They can only talk to other nRF24L01+ modules. They are good for connecting two or more UNOs together. The Yún has a full WiFi connection and is also able to operate as a router itself. It is best suited when you need to run complex networking on an Arduino. To access the ...


1

Take a look at Bridge example or TemperatureWebPanel example: you see you can receive kind of "commands" and react "doing things". Then take a look at HTTP Client example, where you delegate an HTTP call to the linux side. Now mix the two: you can make HTTP calls after receiving a command from outside your Yun. A short test can be done by cutting and ...


1

Using of WiFi shield can be a solution - it supports HTTPS. https://www.arduino.cc/en/Reference/WiFi101


Only top voted, non community-wiki answers of a minimum length are eligible