Troubleshooting
General
The first thing to try is adding the -v flag to enable verbose logs. This probably won't fix the issue, but will let you see more of what's going on under the hood.
Cutting
TODO!
Flashing
The device connects to the AP but never fetches the firmware
If the device successfully connects to the cloudcutterflash network but doesn't fetch the firmware to flash, several things could be going wrong.
It needs to go through a series of steps before it tries. After DHCP, it does a DNS lookup (iot-dns), then it should go through active then uuid.pskkey, then it will try upgrading firmware, but never before that. This is driven by the device, the cloudcutter script has no control.
If there are DNS requests in the log, this shows that UDP traffic can flow from the device to the server, but doesn't indicate that packets can successfully go the reverse direction.
If bidirectional packet flow isn't working, TCP connections needed for HTTP requests won't work because they can't handshake.
Verify that your firewall isn't blocking the packets to 10.42.42.0/24.
Verify that nothing else on your system is using the 10.42.42.0/24 network address space. Check the output from nmcli and ip route. If your VPN happens to use the same address space, disconnect from your VPN before attempting to run the script.