I have the same problem: https://forum.pycom.io/topic/1056/ssl-socket-communication-between-wipy-2-0
But if I try to connect with the wipy to a secure Server with ssl
#client side
import usocket as socket
import ssl
from network import WLAN
import machine
wlan = WLAN(mode=WLAN.STA)
wlan.connect('TP-LINK_2.4GHz_E113DF', auth=(WLAN.WPA2,"***********"))
while not wlan.isconnected():
machine.idle()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
# Require a certificate from the server. We used a self-signed certificate
# so here ca_certs must be the server certificate itself.
ssl_sock = ssl.wrap_socket(s,cert_reqs=ssl.CERT_REQUIRED,ca_certs='cert.pem')
ssl_sock.connect(('192.168.1.125', 10023))
ssl_sock.write(b"boo!")
data = ssl_sock.read()
print(data)
ssl_sock.close()
It works without problems. Try to use:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
instead of
s = socket.socket()
But if I try to set a WiPy as a Server, I receive a Guru Meditation Error. More datails are in the topic linked early.