Issues connecting to point perfect mqtt server #186
-
Using the information we have in our subscrtion u-center-xxx.json config file, we are trying to make a connection to the point perfect mqtt server (ssl://pp.services.u-blox.com:8883). When we use the key, cert and rootCA data in this file to create files for ssl all we get are ssl errors when we load these files as the CRT and PEM file. No combination seems to work even after we try to make a signed key use openssl with the data. Has anyone used pygpsclient to connect the point perfect server? Is so how is it done and what are we missing? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Hi @brianmcrae
So, yes, many people have used PyGPSClient to connect to a PointPerfect MQTT SPARTN service. The README provides an illustrated example of just such a connection. There are, however, a number of prerequisites (largely dictated by ThingStream rather than PyGPSClient), all clearly articulated in the README. You mention "SSL errors" - which specific error(s) are you seeing and which platform (operating system version and Python version) are you running on? If you're referring to a
This is because PyGPSClient's underlying MQTT client (
python3 -m pip install --upgrade certifi
/Applications/Python\ 3.12/Install\ Certificates.command See also pygnssutils Troubleshooting and (for example) python-macos-and-certificate-verify-errors. For further diagnostic information, try running PyGPSClient with maximum verbosity and review the debug output: pygpsclient --verbosity 3 |
Beta Was this translation helpful? Give feedback.
-
We get the following error: Exception in thread Thread-2 (_run): Steps to create this error.
We have also tried many different files names in case that we required, including the ones filled in when we load the config json. Are we supposed to do something with the data in the json config file? Do we need to convert it in some way? here are the files involved: device-68168c2c-de75-4d4b-863c-7b2ecd18aab3-ucenter-config.json |
Beta Was this translation helpful? Give feedback.
-
Ok it sounds like your PEM files is corrupted (it doesn't recognise the -----BEGIN ENCRYPTED PRIVATE KEY----- header). I take it you're using Windows, but I'm not entirely clear why you've adopted the procedure you describe to produce these files, or why you reference the L-BAND CORRECTION CONFIGURATION dialog above if you're using an MQTT service - the two are completely different? Assuming you are indeed using an MQTT service rather than an L-BAND service, and you have an active subscription, the way this is intended to work is quite straightforward:
Have you tried using this procedure exactly as described? |
Beta Was this translation helpful? Give feedback.
-
Let's mark this answered. The key I was missing you are correct. My program was reading the json file string and creating the files automatically, but the headers / footers were incorrect. Might want to update the instructions with that small detail, the key needs the type and private key header like your file shows. Sometimes its the simple things. I now have program that creates these correctly and it works. The cert and key files were the issue. |
Beta Was this translation helpful? Give feedback.
Let's mark this answered. The key I was missing you are correct. My program was reading the json file string and creating the files automatically, but the headers / footers were incorrect. Might want to update the instructions with that small detail, the key needs the type and private key header like your file shows. Sometimes its the simple things. I now have program that creates these correctly and it works. The cert and key files were the issue.