Detect AT command port

Hi is there a way to tell whether the AT command port was open by customer.
I need to provide some debug information through AT command port, but only to certain users. I need know that port was open.


which module are you using? Also what exactly is your requirement?


I am using SL808XT (SL808xA).

I print out debug information to serial AT command port all the time.

Customer want to disable this ability if AT command port was not open. When user connects to AT command port, they need to provide password to enable it. When user disconnect from serial port, Open AT application need to know AT command port was disconnected, turn off this debug ability.

So the requirements are:
On power up, no debug print out;
When connect to AT command port, user need to provide password, to enable debug information;
When disconnect from AT command port, disable debug print out;

Why don’t you create a custom AT command(adl_atCmdSubscribe) in your Open AT application and the parameter to this command could be the password. If customer use this at command with correct password then you enable your debug messages.

You can’t block the user from using the AT commands available in the FW.

The problem is if user disconnect from AT command port, after one or 2 days, someone else happen to plug into serial connector. They will see debug data print out.

How to detect user has disconnected from AT command port, so that I can disable debug print out, next user plugs into port, they won’t be able to see the print out.


Maybe you can watch the serial control lines (RI, DTR, etc) to detect when there is a device connected to the uart? Only enable your password app when you get a proper 4 or 9 wire connection to the command port. Wipe the activation either when the serial control lines change, or set a timer to disable it after some period of time.

Ciao, Dave

Or have a timeout - if no commands are received for a certain period, assume that the user has “gone away”.

Or require them to re-enter the password periodically…