Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Where do I get the files mentioned on this page?:
I am also wondering the same thing. The guide references "twc_agent" installer files.
Mike, did you get the entire device kit? If so, can you give me more information on what was included in the kit?
I reached out to a PTC ThingWorx Consultant and discovered where to get these files.
On the Raspberry Pi page you linked, there is a "Quickstart Console" blue box on the left-hand side. In the box, there is a "Launch" button that prompts you to log in and download the zip file containing the install files.
Hope this helps.
I got the files as described under the "Launch" button on the side (only appears to work in Chrome, not IE), thanks!
So, next step… I have the files on my pi, I’m running twc_agent as described (sudo ./twc_agent) but I get a ton of ws_on_header_value: Websocket connection failed, twWs_Connect: Error trying to connect ws_on_header_value: Invalid ‘connection’ header: Upgrade messages.
When I ping device.cloud.thingworx.com, I get an IP address from DNS (54.208.223.221), but no response to the ping.
What needs to be upgraded here?
Mike, is the server you are trying to connect behind any proxy by any chance?
It’s behind a corporate firewall, but we don’t use a proxy to get out on http. Said another way, web browsing on the Pi that has the twc_agent installed is working fine.
Mike
Here’s the debug output from an attempted connection, it looks like the server wants to upgrade the client and the client doesn’t know what that means:
2015-10-29 16:05:59,735: twTlsClient_Reconnect: Re-establishing SSL context
2015-10-29 16:05:59,737: twTlsClient_Connect: Connecting to server
2015-10-29 16:05:59,787: twTlsClient_Connect: TLS connection established
2015-10-29 16:05:59,788: twWs_Connect: Connected to device.cloud.thingworx.com:80
2015-10-29 16:05:59,788: twWs_Connect: Sent request:
GET /Thingworx/WS HTTP/1.1
User-Agent: ThingWorx C SDK
Upgrade: websocket
Connection: Upgrade
Host: device.cloud.thingworx.com
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: JZNA7gcNtfUhfDqn8pLwZQ==
Max-Frame-Size: 8192
applicationKey: 2fbdab1f-4cd6-43df-8d3f-6e3c18a2d5a2
2015-10-29 16:05:59,967: HTTP Response begun
2015-10-29 16:05:59,967: Header->server : Apache-Coyote/1.1
2015-10-29 16:05:59,967: Header->upgrade : websocket
2015-10-29 16:05:59,967: Header->sec-websocket-accept : cVyWkGmJ2JxlY9vpR2i9bxFoAtQ=
2015-10-29 16:05:59,967: Header->date : Thu, 29 Oct 2015 20:06:04 GMT
2015-10-29 16:05:59,967: Header->connection : Upgrade
2015-10-29 16:05:59,967: ws_on_header_value: Invalid 'connection' header: Upgrade
2015-10-29 16:05:59,967: ws_on_headers_complete: Websocket connection failed
2015-10-29 16:05:59,967: twWs_Connect: Parsed 193 bytes out of 193
2015-10-29 16:05:59,967: twWs_Connect: Error trying to connect
2015-10-29 16:05:59,967: twTlsClient_Reconnect: Re-establishing SSL context
2015-10-29 16:05:59,969: twTlsClient_Connect: Connecting to server
2015-10-29 16:06:00,22: twTlsClient_Connect: TLS connection established
The reason I asked about the proxy (especially reverse proxy) is because the connection headers are case-sensitive. The header sent there is 'Upgrade', while the agent/ sdk is likely expecting 'upgrade'.
Mike, I am behind a DSL modem at home trying to connect with Pi. I am also getting the same error. Were you able to make it work?.