Flash MQTT Micro Gateway to become Azure Gateway


I bought a MQTT Micro gateway for some testing of a project my company is looking at implementing in our warehouses.
They have since decided they want to use Azure for everything and I see there is a similar gateway specifically for Azure that makes some of the setup easier.
Is it possible for me to flash my current gateway to turn it into the azure one as it seems to mostly be a software change?

If not what are the settings I would need to use for my messages to replicate the Azure version?


Hi Marc,

Yes this is possible. Please follow instructions here to flash your gateway with the Azure Gateway code:

You’ll need to pull the board out of the box so you can connect it to your computer using a USB Micro Cable.


Thank you for the quick reply.
I have followed the steps in the linked article but when running the script I am running into errors.
It seems to have to do with certificates, I am guessing to access your s3 bins.
I have copied the error text below.

Firmware Choices:
[1]: WiFi AWS Gateway
[2]: WiFi Azure Gateway
[3]: WiFi MQTT Gateway
[4]: WiFi Google IoT Gateway
[5]: Mega Modem
[6]: Cellular MQTT Gateway

Please enter the number of the desired firmware: 2
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1317, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1230, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1276, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1225, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1004, in _send_output
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 944, in send
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1399, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 1040, in _create
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 1309, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "ncd_flasher.py", line 179, in <module>
    firmware_file = urllib.request.urlretrieve(str(firmware.get('firmware')), './firmware.bin')
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 247, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1360, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1320, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)>

I take it back the error was on my side.
Thats what I get for jumping to conclusions.

I am working on a fresh mac install.
When I installed Python I did not install my certificates.
To do thatIf you’re using macOS go to Macintosh HD > Applications > Python3.6 folder (or whatever version of python you’re using) > double click on “Install Certificates.command” file.

Then it fixed.

Thanks for the help,

Great Marc. Thank you for sharing. I would not have known that. I work on a Mac but It’s been in use for quite a while so I must have already done this at some point.