HTTPS client is here for the Photon! - by the glowfi.sh Team

Hey Community,

We have been working hard at glowfi.sh to deliver an HTTPS client for the Particle community and I am happy to say we are ready to release it thanks to all the work by glowfi.sh engineer @jersey99. Our client is built from matrixSSL, and you can check out our documentation, specs, and examples in our glowfishAPI repo for Particle here.

Again, we are super excited to release this and welcome any comments, feedback, pull requests, etc.!

Thanks
Mike and the glowfi.sh Team

Sign up for free access to the glowfi.sh machine learning API

18 Likes

This is awesome, thanks @michaelT for sharing this and thanks @jersey99 for the development work!

One thing to point out; this uses matrixSSL, which is GPL licensed. This means that any project using this library MUST be open sourced under the GPL license as well. For those of you who may not spend too much time reading licenses, please keep that in mind if you use this library.

@michaelT and @jersey99, our team is using an embedded SSL library called TropicSSL that is derived from the last BSD-forked version of PolarSSL (previously called xySSL). If you’re interested in exploring a more liberally licensed version of this HTTPS client, perhaps that’s something to consider for v2?

7 Likes

OOH OOH OOH

even better, I just discovered that ARM purchased PolarSSL and re-released it as mbed TLS, under an Apache license!

https://tls.mbed.org/

4 Likes

Hi @zach,

Awesome to hear from you. And thanks for your support. We totally share your sentiment! We would love to at least get a version of our httpsclient working on the webIDE for now.

We did spend some time with the licenses as well. Embed TLS is at a point of rewriting large parts of their library :slight_smile: … At least from their news.

We think GPL isn’t too bad, atleast for some of the users here. Considering some of the spark firmware is LGPL’d.

However, that being said, we love MIT license (or equivalent) and are ourselves activley looking at PolarSSL, I at least have my eye out for it. As a matter of fact I played around with it a little. I think it would make a great lib to build a tiny footprint https out of.

For now, it would be awesome if we could get some support to at least get it up and running on the webIDE.

@michaelT

Thanks and cheers!!

Re: GPL vs. LGPL, they are very different licenses, despite the fact that there’s only one letter different :slight_smile: The biggest difference in my opinion is that LGPL licensed software can be used in proprietary applications, whereas GPL software cannot. Many of our customers are fans of open source software, but many of them are building proprietary products and applications on our open source stack. I don’t mean to insult GPL, I think it’s a fine license, but I do think it’s important that people be aware of the license’s limitations, because accidentally using a bit of GPL code can come back to bite you later if you don’t realize the implications.

In any case, we’d be happy to help you get it up into the web IDE! @corey do you think you could lend a hand?

3 Likes

@zach, yes I agree with LGPL. :smile:
And thanks again!

1 Like

I’d be most delighted to help @michaelT and @jersey99 get this rolled into the IDE!

@michaelT i’ll pm you and we can go from there !

-Corey :sunglasses:

Just a minor nit-pick -- this is only true if you distribute your project. If you are making something for your self/organization, you aren't forced to release your code to just anybody who asks for it.

1 Like

@corey

Sure. Feel free to pm @jersey66, since he is the dev on this one.

@corey

I ment to say, Please PM jersey99 for help with our webIDE linking issue.

Oops…mike

1 Like

Hi everyone.

I’m trying to use this httpsclient in order to reach parse.com cloud, but since I haven’t the IP address, I can’t reach it.
How can I do please ? :smile:

@Maxime,

You can open up a terminal (OS X / Linux), and go

$ nslookup parse.com

Or if you aren’t comfortable, try getip.com

Let me know if it doesn’t work out.

EDIT: I have removed the dependency on the IP Address for httpsclient-particle library. You should be able to post by just using the hostname. Have a look at the examples here now:

@Maxime @michaelT

3 Likes

@Maxime

Just so you are tagged…see Jersey99 response above, although I’m not sure that Parse supports static IPs for their cloud service.

Hi @jersey99,
I tried to use the example you gave me, but there is something wrong inside the web IDE with httpsclient, httpsClientSetup needs 3 parameters :

error: too few arguments to function 'int httpsclientSetup(const char*, const char*, const char*)'

I also tried to use it with particle firmware, but I have some problems with multiples definitions of setup and loop, but I didn’t find those functions in any file.

And with nslookup parse.com, I have

$ nslookup parse.com
Server:        127.0.1.1
Address:    127.0.1.1#53

Non-authoritative answer:
Name:    parse.com
Address: 54.164.220.140

And thanks for your answers :smile:

Hi @Maxime,

Did yoy try re-importing the library? The examples I sent you go with the newer version. Re-import and see if the error goes away.

Also, regarding the local build, it’s probably because you have both the examples lying inside the path of ‘user/src’. From what I remember you can only have a single definition of setup and loop in the tree of user/src/

Hope this helps.

@jersey99

Hi @jersey99

I created a new app and included the library and still the same error.

And for the local build, I’ve done a cat * | grep "void loop" && cat * | grep "void setup" and I have only one occurence for each of them.

Hi @Maxime,

You have to re-import the library, and from the looks of it I am not sure you did that. Because the function httpsclientSetup has changed in 0.0.7 (it only takes 2 arguments now). It really doesn’t matter if you created a new application. Also, clearing the cache (inside the settings tab of the WebIDE) helped me a few times with the re-import.

Just to clear things up, I recommend: Delete current library httpsclient-particle; search and import it again; Verify version 0.0.7 (if not, clear cache and reimport), Look for the example file in the library, And use that in a new app.

cat * doesn’t go below the current directory. You should try
grep -r "void loop" .

Also, feel free to PM me if the discussion is getting lengthy, and then we can post the summary here.

@jersey99

1 Like

Just a brief note to thank the authors of this! This is an amazing milestone!

2 Likes

@frlobo

Thanks for the shout out. @jersey99 was our developer on this lib, and deserves the credit. We hope the community will find it useful.

Mike

3 Likes