Select Page

Tech Log #022: Lots – Mosquitto config, fifo bug, sha256, certbot, and browsers

It’s been a jam-packed set of work sessions today to try to track down and figure out how to make this work. Following yesterday’s trial and errors, the first thing to fix was making a new config for mosquitto. Then, regenerating the certificates, but this time with the proper information. The firewalls were updated to allow the communication through the ports. Still receive errors, check the firewalls, check the version of ssl. The cause was a FIFO DLT bug with mosquitto. Getting the very latest version of mosquitto via the ppa feed solved that.
Now that mosquitto could run for longer, the next error was it was unable to open one of the ports. Added two useful parameters to the config to enable better logging. The error now shows the cause – the certificate was too weak. Needed to use sha256 instead of md5. Alright, so redo the certificates with that, and all ports are now working.
Through a browser, it still can’t establish a connection to the server. Likely because the certificate is self-signed. Figured out how to add the certificates and approve them, but it didn’t end up working anyway. No problem, can try certbot with let’s encrypt to get a validated certificate. However, they do not issue certificates for the way our setup currently is.
Hit a dead-end for this for now, so the next thing to do was to re-plan how this can work. Drew another system architecture and have an idea on how to make it happen. Next steps will be to start coding it.

Tech Log #021: Running in a circle about ssl

A bit of running in a circle to get tls/ssl to work. It didn’t work at first. Some of the issue was around the common name, and the lack of clarity about what that actually needs to be. Ran in to issues with the mosquitto config file not being updated, and trying to start / stop mosquitto. This resulted in needing to reboot the ec2 instance often during the trial and error. Eventually was able to get back to a working state. The next steps will be to regenerate the certificates in the proper format, make sure the ports are open, and whatever else will be needed to get this working.

Tech Log #020: Secure websockets necessary

Since the AR view uses the camera, this means the connection has to be secure using ssl. MQTT was added to the AR code, but it can’t communicate over websockets – it has to be secure websockets. The next step will be to generate certificates for the ssl connection.

Tech Log #019: AR marker tracking

Tech Log #019: AR marker tracking

Set up AR framework, the AR detection method that will be used is with custom markers. Ran in to a lot of debugging. Transparent background and cache on the marker pattern were the culprits. Figured it out, and everything works! Marker can be detected, tracks nicely, and calls some javascript. Testing at various distances will be needed to understand how close you can be to the marker. Works at 60fps on modern mobile device. Onto the next, which is integrating MQTT into this.

Tech Log #018: Device connected to map

Tech Log #018: Device connected to map

Sending updates from an ESP32 device to the MQTT server is working! Right now, it’s just barebones running with default values for GPS latitude, longitude, and a random number for air temperature. Ran in to a few issues with library selection, but that was easily remedied. It took some time to test the types that are sent and the precision. Once it started to work, was simple. The library being used will retry connection to the MQTT server in 15 seconds if it loses connection. The next steps are either AR view, score counter, or making the sensor device. Tune in for the next log to see which one of those is chosen.

Tech Log #017: Map GPS coordinate payload update

Tech Log #017: Map GPS coordinate payload update

Changes were made to the GPS coordinate payload, as well as the map. Devices now dynamically load / unload based on if the location is in view on the map. Everything works! Check out the video snippet:

Next step is to start adding new devices to the map – so on to the hardware with MQTT on an ESP32.