libmDot v4.0.1 did not allow the port to be set using setAppPort.
The AT firmware v4.0.5 release uses a v4.0.5 libmDot, it looks like this version did not make it to the release repo.
Here is the commit on the dev repo.
https://github.com/MultiTechSystems/libmDot-dev/commit/f150bb9d4eafe3e0be73c8348a34aeaf4379a9d3