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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How to send data from raspberry pi to iot application deployed on tomcat.

sn-4
1-Visitor

How to send data from raspberry pi to iot application deployed on tomcat.

Hi all,

I have setup Thingworx platform/Tomcat on my laptop. Raspberry pi 3 is also set up [on SD] and i have some sample programs running which reads Sensor data.

I want to run 'temperature-thing' example on raspberry pi, which would send the actual data read from Sensor.

From raspberry browser, when i test http://<Laptop_IP>:81/Thingworx/   or http://<Laptop_HOST_NAME>:81/Thingworx/ the application is not reachable.


Can some one tell me what should be the url to send data from raspberry to Tomcat.

Am i missing any configuration?

Raspberry pi is connected/configgured to Wi-Fi and can connect to Internet.

Any help would be highly appreciated.

Thanks in advance.

7 REPLIES 7
supandey
19-Tanzanite
(To:sn-4)

Shridhar, is Tomcat configured to listen on port 81? Can you check if you have configured thingworx for port 8080 or 80? Are you able to ping your laptop from the Raspi?

sn-4
1-Visitor
(To:sn-4)

Sushant,

Yes, Tomcat is running on port 81.

Not on 80 or 8080.

Thanks,

P.S.: Not able to reply to your post. get 'Sorry, but you are not authorized to reply to this discussion.' message

supandey
19-Tanzanite
(To:sn-4)

Thanks for the info, it could be due to the moderation in discussion.

Also to confirm could you share the exact error code and could you also confirm if you are able to ping that machine from raspi?

sn-4
1-Visitor
(To:supandey)

Hi,

From Raspberry pi, I can ping tomcat hosted on my laptop.

http call from pi to tomcat tries for ever.

Tomcat_Ping_From_Rasp.JPG

Tomcat call from laptop.

Tomcat_Service_From_Laptop.JPG

Could it port issue from raspberry pi? How to open 81 port from rasp?

Thanks,

ankigupta
12-Amethyst
(To:sn-4)

Hi Shridhar N​,

Can you please try to access the ThingWorx Tomcat from some other Laptop on same network.

If you face same issue; the Port 81 is blocked on your Laptop and you need to add Rule to allow connection on Port 81.

If it works fine; then the issue is on Raspberry Pi.

sn-4
1-Visitor
(To:ankigupta)

Hi Ankit,

Yes, port 81 was not open. I added the rule and it works.

Thanks again.

Br,

Shridhar..

supandey
19-Tanzanite
(To:sn-4)

Shridhar will it be possible for you to test the connection using Ethernet cable? it's rather strange. What version of Raspi are you on?

Announcements


Top Tags