cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ssl handshake status -40

Highlighted
Level 5

ssl handshake status -40

I apologize - that first message/topic was lousy.

 

I have a ESP8266 Python script (below) that uses the urequests module to successfully put to a property on the academic ThingWorx.

 

This same ESP8266 Python script, with appropriate changes in URL and appKey, generates an ssl handshake status of -40 when trying to put to a property on an evaluation server.

 

Anyone have any ideas as to why?

 

---script follows--

import micropython
import network

import urequests
import ujson

 

yourWifiSSID = "SSID"
yourWifiPassword = "password"

 

sta_if = network.WLAN(network.STA_IF)
sta_if.active(True)
sta_if.connect(yourWifiSSID, yourWifiPassword)

 

while not sta_if.isconnected():
    print(".", end="")
    pass

 

print()
print("connected to network")

 

url = 'https://academic.cloud.thingworx.com/Thingworx/Things/OfficeWX_userName/Properties/LightLevel'

headers = {'Content-Type': 'application/json', 'appKey': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'}

payload = {'LightLevel': '500'}

 

putreq = urequests.put(url, data=ujson.dumps(payload), headers=headers)

 

print("Mission Accomplished")