Skip to main content
1-Visitor
November 29, 2015
Solved

Error with Raspberry Pi

  • November 29, 2015
  • 3 replies
  • 4340 views

I am getting the upgrade error with the twc_agent executable when I try to run in Raspberry Pi. Has some one fixed it and be able to run it, any suggestions/help?

    Best answer by Aanjan

    The appKey comes from the server/ platform you are trying to connect to. Unless this is a prepackaged installation with the server information pre-configured, you would need to create a new appKey on the platform and then copy it over.

    3 replies

    10-Marble
    November 29, 2015

    Hi Maniappan,

    It is good if you can show us the error messages in your Rasp Pi.

    mr11-VisitorAuthor
    1-Visitor
    November 29, 2015

    Here is the log I get on running twc_agent :

    [ERROR] 2015-11-29 17:48:09,813: ws_on_header_value: Invalid 'connection' header: Upgrade

    [ERROR] 2015-11-29 17:48:09,814: ws_on_headers_complete: Websocket connection failed

    [ERROR] 2015-11-29 17:48:09,815: twWs_Connect: Error trying to connect

    This is coming periodically when it tries to connect.

    10-Marble
    November 29, 2015

    It seems like the Thingworx server is not connected. Have you modified the main.c file to change the Host name and Appkey? The file is located at home/pi/tw-c-sdk/examples/SteamSensor/src.

    mr11-VisitorAuthor
    1-Visitor
    November 29, 2015

    Hi Peng,

    Thanks for the reply. The documentation here at Raspberry Pi with ThingWorx C SDK | ThingWorx didn't ask me to change anything, so ran as is. If these steps are not proper do let me know proper one.

    mr11-VisitorAuthor
    1-Visitor
    December 7, 2015

    I switched internet provider and now the connection is getting made(may be reverse proxy, will debug after I get connected properly to site), however I get auth error, where do I find the right AppKey?

    5-Regular Member
    December 14, 2015

    Maniappan, Alternatively, if you are not trying to connect over SSL you are going to want to include the following function call before the connection is made in the main function in main.c: twApi_DisableEncryption();

    mr11-VisitorAuthor
    1-Visitor
    December 14, 2015

    Thanks to all who replied, I got it up and running yesterday. There were couple of issues, my provider is having reverse proxy, had to try with someone else. While playing around with configuration I had modified the original key and resetting back it worked.

    Now to get to do some actual data generation..