Been using Cores for a year - love 'em in my projects. Waiting for my Photons to ship (hope that’s soon!). In the Core, you couldn’t do outbound HTTPS calls because of RAM limitations (HTTPS is only available to/from the Spark Cloud). Given the larger RAM in the Photon (128KB), does this mean the Firmware will now support outbound HTTPS to other sites?
I am aware of the recent (awesome) new feature around Webhooks. Even so… I do not think this replaces the desire to just directly make HTTPS calls from the device. Any input/info on this? Or maybe you think Webhooks are the one true way to handle this, even on the Photon? Didn’t see this Q asked elsewhere on the Community, so apologies if it was buried somewhere else.
Related, I am pushing data from my Core/Photon to a local Raspberry Pi node.js server on my LAN, but I want to secure that communication. I am aware of this proposed solution (http://community.spark.io/t/aes-encryption-demo-and-secure-tcpclient-usage/6092/7), but I’d rather just make an HTTPS call to my Raspberry Pi server and save myself the hackery on encrypting the TCP socket.
Any update here? I should be receiving my pre-ordered Photons in the next few weeks and I’m trying to plan out a whole chunk of additional work around my IoT projects. It’s basically a choice between waiting for a Photon that can just do real HTTPS calls to a server on my LAN (handling all the TLS/cert stuff in RAM), or, if that’s not gonna be possible, I need to write my own TCP client/server that does a light version of key exchange/signing.
I assume when customers have Photons, Spark will need to “fork” or label its documentation so that it’s clear what firmware capabilities apply to original Cores (I have 2 of these) and what new functionality is available only on Photons (I am receiving 2 of these soon). Updating your TCP Client documentation would be included in this, I’d assume.
I am trying HTTPS on the Photon I snagged at the MF but it does not work. It could be that I am doing something wrong in building the request.
So, for the request to http://www.google.com, I use the TCPClient object and
client.connect(server, 80) and everything works fine.
But when I replace port 80 with 443 it does not work.
Curl to https://www.google.com works fine from a shell on my Mac.
Just in case you’re not aware, HTTPS is a lot more than just a change of port - it must run over secure sockets (SSL/TLS) at the transport layer. At present secure sockets is not available on the photon although we would very much like it to be supported in a future release.
When support is available, it’s not something that will happen automatically, but must be specifically requested by your code, such as by changing TCPClient to SSLClient or similar.
Thanks Mat. I figured I was doing something wrong.
Native HTTPS support would be great. I am using tempoiq and it does not allow HTTP posts, so I need to insert an intermediary (am using a Raspberry Pi), but it would be great if I can eliminate the extra device. I guess I should look into Webhook in the interim but it looks like there are posting limitations.
If not, I understand that there is a secure socket connection made from the Photon to the Particle Cloud. Any way to modify that to connect to another server?
I’m in a similar boat to AJ. I can send HTTP posts all day long, but my servers require HTTPS. And being able to send directly to them without the intermediary would be bloody spectacular. Especially since it rather sounds like something the hardware can handle?
I don’t see SSL support happening anytime soon. It’s very complicated, very CPU/memory intensive, and needed by very few people. The photon is a new device and still has a lot of bugs to fix and basic features to implement.
If you need it desperately maybe you should try to make it yourself? I can’t find anything for the Arduino (bad sign). This topic describes some of the issues…
+1 for HTTPS support… Parse.com requires HTTPS connection and they have an Arduino SDK (which unfortunatly I cant get working on the Photon because the IDE doesnt jump or show which file contains the errors)
I have and am using webhooks… Problem with that is the data goes from Photon -> Server -> Parse -> Server -> Photon. Rather long winded and the data is very time sensitive. Also, webhooks return a Bool (I think?) when I need full on data…
Understand this is on the roadmap - that’s great! Just want to share my use-case: authenticating to a guest wi-fi portal. I plan to use SYSTEM_MODE(SEMI_AUTOMATIC); and a quick POST to an HTTPS gateway url prior to Spark.connect(); If it works this gives me more places for my internet gadgets to live. Performance here isn’t critical; even if it took a handful of seconds for the TLS handshake, it will only happen at startup. This simply isn’t something that can be achieved with a webhook!
+1 for HTTPS support. It’s value is getting more and more important in the IoT world and very soon it would become a differentiation tool. Many purchase decisions will be heavily influenced by the availability of this feature. No joking.