Will the Yun be able to handle it by default? Or will it depend on the Linux distro..
The linux distro loaded on the Yun has all the packages to handle SSL connections. You can both access SSL enabled web sites (client) and host your files with SSL (server)
so is it possible, from 32u4 micro and bridge library, have access to "https" website ?
yes
Hi,
If you need to download something via https use curl with -k option, as wget is compiled without ssl support. Same applies to python, i.e. distribute module easy_install won't work with https urls.
This can be a nice feature request. Do you mind posting it on github?
Ok. I just posted it in the linino project on github.
wget seems to support ssl connections if you upgrade it via opkg.
However, I'm really looking forward to a python installation with ssl. I'd like to twitter some sensor values, and I don't want to go through temboo. If I'd wanted that, I could have just used a standard wifi shield and http://arduino-tweet.appspot.com/. I want to send tweets directly, but the python twitter library build fails because ssl doesn't work in python. Took me a while to figure that out and I was actually a bit disappointed to be foiled by something like that.
i also believe that direct https support, whitout Temboo service, is an important feature.
@Kryptman I think installing python-openssl should suffice. Can you give it a try?
Jup, that did the trick. Open mouth, insert foot.
Thanks for the assist...
This is great
After installing python-openssl I am able to use my gmail account to send mails from Yun.
Just wanted to share:
#!/usr/bin/env python
import smtplib
from email.mime.text import MIMEText
USERNAME = "xxxxxx@gmail.com"
PASSWORD = "xxxxxx"
MAILTO = "you@yourmail.com"
msg = MIMEText('Hello,\nMy name is Yun, \nhow are you')
msg['Subject'] = 'Mail from Yun'
msg['From'] = USERNAME
msg['To'] = MAILTO
server = smtplib.SMTP('smtp.gmail.com:587')
server.ehlo_or_helo_if_needed()
server.starttls()
server.ehlo_or_helo_if_needed()
server.login(USERNAME,PASSWORD)
server.sendmail(USERNAME, MAILTO, msg.as_string())
server.quit()
\m/ rock on!
Found my solution in this thread, I can now run Temboo choreos from Linux on the Yun!
How do I install this? I installed the module from pyOpenSSL · PyPI. But I don't think this is the right one, because when I try to install it on the Yun I get the following error:
root@Arduino:/mnt/sda1/arduino/pyOpenSSL-0.13.1# python setup.py install
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
running install
running build
running build_py
running build_ext
building 'OpenSSL.crypto' extension
mips-openwrt-linux-uclibc-gcc -fno-strict-aliasing -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -DNDEBUG -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/crypto.c -o build/temp.linux-mips-2.7/OpenSSL/crypto/crypto.o
unable to execute mips-openwrt-linux-uclibc-gcc: No such file or directory
error: command 'mips-openwrt-linux-uclibc-gcc' failed with exit status 1
I'm trying to tweet a picture from my Yún with a Python script, so I don't have to use Temboo. I'm using Twython and also installed a bunch of its dependencies. Now I think I'm just this one little step away from making this work...
opkg update
opkg find python-openssl
opkg install python-openssl
So dumb of me! Just after posting my question, I discovered how to install software the right and easy way:
http://playground.arduino.cc/Hardware/Yun#installing_python_module
Problem solved!
...and Python on a Yún now became even more cool!
For the record, there is this tutorial available as well http://arduino.cc/en/Tutorial/YunPackageManager
FWIW, to get openssl/python to work I installed the following packages (in order).
I'm positive you don't need all these packages but I'm prettyer sure you need pyopenssl before openssl will install.
opkg install bzip2
opkg install unzip
opkg install tar
opkg install wget
opkg install fdisk
opkg install e2fsprogs
opkg install openssh-sftp-server
opkg install distribute
opkg install pyopenssl
opkg install python-openssl