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
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
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
Next step is to start adding new devices to the map – so on to the hardware with MQTT on an ESP32.