Answer the question
In order to leave comments, you need to log in
Error connecting ESP8266 to ThingWorx Server (Fatal exception 28)?
I'm having trouble connecting a NodeMCU board to a ThingWorx Foundation server.
Used this manual
The server is needed to create IoT devices and smart home as well.
A piece of code from the manual. The main thing here is WiFi Definitions and ThingWorx server definitions. These are the parts that I edited for myself, replacing the Wi-Fi SSID with the name of the network to which I am connected and the password for this network.
I replaced the TWPlatformBaseURL with a link that was generated when I started the trial version of the remote ThingWorx server.
The AppKey is the application key I created on this server (it determines which IP addresses can connect to my server).
/**
*
* ESP8266_ThingWorx_REST_Demo.ino
*
*
* (c) PTC, Inc. 2016-2020
*
*/
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClientSecureBearSSL.h>
//////////////////////
// WiFi Definitions //
//////////////////////
const char WiFiSSID[] = "Liberty454"; // WiFi access point SSID
const char WiFiPSK[] = "Flutie22"; // WiFi password - empty string for open access points
//////////////////////////////////////////////
// ThingWorx server definitions //
// modify for a specific platform instance //
//////////////////////////////////////////////
const char TWPlatformBaseURL[] = "https://pp-2007011431nt.devportal.ptc.io";
const char appKey[] = "2d4e9440-3e51-452f-a057-b55d45289264";
WiFi connected
IP address:
*мойIPАдресс*
DeviceID>ESP8266Board-FXX
[httpsGetPropertry] begin...GET URL>https://pp-2103XXXXXXXX.devportal.ptc.io/Thingworx/Things/ESP8266Board-FXX/Properties/SomeNumber?appKey=МойAppKey<
Fatal exception 28(LoadProhibitedCause):
epc1=0x4020a2c0, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00300030, depc=0x00000000
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question