10 Replies Latest reply on Nov 22, 2015 9:28 AM by mr RSS
    minman Newbie

    Raspberry Pi Kit

    Where do I get the files mentioned on this page?:



      • Re: Raspberry Pi Kit
        alawhorn Newbie

        I am also wondering the same thing. The guide references "twc_agent" installer files.

        • Re: Raspberry Pi Kit
          aanjan Heavyweight Champ

          Mike, did you get the entire device kit? If so, can you give me more information on what was included in the kit?

          • Re: Raspberry Pi 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.

              • Re: Raspberry Pi Kit

                I got the files as described under the "Launch" button on the side (only appears to work in Chrome, not IE), thanks!

                  • Re: Raspberry Pi Kit
                    minman Newbie

                    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 (, but no response to the ping.


                    What needs to be upgraded here?

                      • Re: Raspberry Pi Kit
                        aanjan Heavyweight Champ

                        Mike, is the server you are trying to connect behind any proxy by any chance?

                          • Re: Raspberry Pi Kit
                            minman Newbie

                            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.



                            • Re: Raspberry Pi Kit
                              minman Newbie

                              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