0

mosquitto_sub: connect to io.adafruit.com using TLS
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

mosquitto_sub: connect to io.adafruit.com using TLS

by bitmandu on Tue Jul 24, 2018 10:19 pm

I'm trying to use the mosquitto_sub command to connect to Adafruit.io securely.

This works without TLS:

Code: Select all | TOGGLE FULL SIZE
mosquitto_sub -h io.adafruit.com -u USER -P PASSWORD -t TOPIC


But when I try to use TLS, I get the following error.

Code: Select all | TOGGLE FULL SIZE
mosquitto_sub -h io.adafruit.com -u USER -P PASSWORD --capath /etc/ssl/certs -t TOPIC
Error: A TLS error occurred.


Mosquito doesn't provide a very descriptive error message, but does anybody know how to get this to work?

bitmandu
 
Posts: 1
Joined: Tue Jul 24, 2018 9:19 pm

Re: mosquitto_sub: connect to io.adafruit.com using TLS

by jerry7580 on Sat Dec 22, 2018 2:20 pm

I am trying to do exactly the same thing. I have mosquitto_pub working without tls and am trying to get to the secure method. Have you reached a resolution on this?

In your example, do you need to specify port 8883 by adding '-p 8883'?

jerry7580
 
Posts: 34
Joined: Wed Aug 26, 2015 4:26 pm

Re: mosquitto_sub: connect to io.adafruit.com using TLS

by jerry7580 on Sun Dec 30, 2018 10:14 am

Is there anyone that can provide resolution on this? Using mosquitto (I am doing mosquitto on raspberry pi) to connect SECURELY to adafruit io?

jerry7580
 
Posts: 34
Joined: Wed Aug 26, 2015 4:26 pm

Re: mosquitto_sub: connect to io.adafruit.com using TLS

by brubell on Sun Dec 30, 2018 4:06 pm

jerry7580 wrote:Is there anyone that can provide resolution on this? Using mosquitto (I am doing mosquitto on raspberry pi) to connect SECURELY to adafruit io?


The Adafruit IO Python client uses mosquitto to connect securely using TLS https://github.com/adafruit/io-client-p ... ent.py#L47

brubell
 
Posts: 216
Joined: Fri Jul 17, 2015 10:33 pm

Re: mosquitto_sub: connect to io.adafruit.com using TLS

by jerry7580 on Thu Jan 10, 2019 3:27 pm

I am wanting to do secure communication with adafruit io from the command line on Raspberry Pi using mosquitto. Input would be greatly appreciated regarding doing this on the command line.

jerry7580
 
Posts: 34
Joined: Wed Aug 26, 2015 4:26 pm

Re: mosquitto_sub: connect to io.adafruit.com using TLS

by jerry7580 on Sat Jan 19, 2019 3:10 pm

YES, it DOES work without TRS. That is totally missing the point! Adafruit discourages non-secure communication with Adafruit IO and I am trying to determine how to do SECURE communication between mosquito running on a Raspberry Pi and Adafruit IO.

jerry7580
 
Posts: 34
Joined: Wed Aug 26, 2015 4:26 pm

Please be positive and constructive with your questions and comments.


cron