How to obtain userpassword from the application dashboard for mosquito tool

Hi,

I would to use mosquito tool on my device.
I found this tutorial : Mosquito how to
I don’t understand how to obtain userpassword from the application dashboard on staging.thehtingsnetwork.org

Thanks for your help.

did you read this

Thank to answer BoRRoZ,

Here a mosquito command which doesn’t work

:~$ mosquitto_sub -h ttn-handler-eu.thethingsnetwork.org -t /home/# -u xxxxxxxxxxxxx -P xxxxxxxxxxxxxxxxxxxx -v
Unable to connect (Lookup error.).

I put AppEui value ( Click to see image ) as Value after the “-u” option
I put App Session Key value ( Click to see image ) as value after “-P” option
What did I wrong ?

You should use the application id, not EUI. The password should be the access key, it starts with ttn-account-…

1 Like

That’s the point where is it on my console page ? should I be a brain dead I cannot find it

Are you using console.thethingsnetwork.org? If not you are not at the right site. In the console go to applications, choose the appropriate application and everything is on that page. Application ID near the top, access key near the bottom (you will need to click on the eye symbol to show the contents of that field)

Thanks Kersing,

I think I found the access key in this part ( click to see picture ) of https://console.thethingsnetwork.org/applications/xxxxxx page. This value was not on the device console page. I was confused.
I took the device ID as value of “-u” option which is equal of Device EUI value on the devices console page

mosquitto_sub -h ttn-handler-eu.thethingsnetwork.org -t “+/devices/+/events/activations” -u xxx35f00xxxx -P ttn-account-v2.8V4Cnxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxx -v
Unable to connect (Lookup error.).

I’m stilling with no issue
I’m a brain dead definitely.

No, that’s not okay. Authentication for MQTT is based on applications, not devices. (And you’re getting data for all devices, as you’re using a + wildcard in -t "+/devices/+/....").

So, Instead:

See also https://www.thethingsnetwork.org/forum/t/some-problems-with-the-mqtt-publish-subscribe/4840/6.

2 Likes

Hi,

Thinking the lookup error message could mean that’s not the good address. If I change the domain name I’ve an other error message :

mosquitto_sub -h router.eu.thethings.network -t 71000008/# -u 206xxxxxx -P ttn-account-v2.8V4Cxxxxxxxx-xxxxxxxxxxxxx -d
Client mosqsub/27660-X555UF sending CONNECT
Client mosqsub/27660-X555UF received CONNACK
Connection Refused: not authorised.
Client mosqsub/27660-X555UF sending CONNECT
Client mosqsub/27660-X555UF received CONNACK
Connection Refused: not authorised.

I checked

:~$ ping ttn-handler-eu.thethingsnetwork.org
ping: unknown host ttn-handler-eu.thethingsnetwork.org
:~$ ping router.eu.thethings.network
PING bridge.eu.thethings.network (52.169.76.203) 56(84) bytes of data.
^C
— bridge.eu.thethings.network ping statistics —
9 packets transmitted, 0 received, 100% packet loss, time 8064ms
:~$ ping eu.thethings.network
PING eu.thethings.network (52.169.76.255) 56(84) bytes of data.
^C
— eu.thethings.network ping statistics —
2 packets transmitted, 0 received, 100% packet loss, time 1007ms

So the command should be :
mosquitto_sub -h eu.thethings.network -t 71000008/# -u 206xxxxxx -P ttn-account-v2.8V4Cxxxxxxxxxx-xxxxxxxx -d
Client mosqsub/14034-X555UF sending CONNECT
Client mosqsub/14034-X555UF received CONNACK
Client mosqsub/14034-X555UF sending SUBSCRIBE (Mid: 1, Topic: 71000008/#, QoS: 0)
Client mosqsub/14034-X555UF received SUBACK
Subscribed (mid: 1): 128

Client mosqsub/28575-X555UF sending PINGREQ
Client mosqsub/28575-X555UF received PINGRESP
Client mosqsub/28575-X555UF sending PINGREQ
Client mosqsub/28575-X555UF received PINGRESP
Client mosqsub/28575-X555UF sending PINGREQ
Client mosqsub/28575-X555UF received PINGRESP

I still working for get the topic value as

Fields
{
“analog_in_3”: 3.35,
“relative_humidity_2”: 24.5,
“temperature_1”: 22.9
}

Anyway the log gives confident
Thanks for your help and link that helped me

1 Like