Here’s the instruction how to check your iPhone’s lock state (baseband unlock status) using Minicom or other tool that can send AT+ commands to your iPhone's baseband. Use this method if you want to know if your iPhone is unlockable. To get the info about your SIM state and unlock state do as follows:

Check Your iPhone’s Lock State With AT+XSIMSTATE

If you don't have Minicom installed on your gadget then you can easily install it here and follow my steps below.

How to check iPhone’s lock state

Step One: If you use Minicom, you need to disable the CommCenter first. To do that enter in Minicom:
launchctl unload -w /System/Library/LaunchDaemons/com.apple.CommCenter.plist
If you are using sendmodem or igsm tools just skip this step. Launch minicom by typing:
minicom -w
Please use this articles to check all available iPhone dev nodes to connect through. Step Two: Enter the command:
AT+XSIMSTATE=1
Step  Three: You’ll see the following characters:
+XSIM: SS
+XLOCK: "PN",X1,X2,"PU",X1,X2,"PP",X1,X2,"PC",X1,X2,"PS",X 1,X2
Note: The only lock present on iPhone is the PN lock Step Four: Use the following list to decrypt the iDevice’s response: SS: 0=No SIM Inserted 2=SIM Ready 6=SIM Busy X1: 0=Unlockable(probably without attempt counter) 1=Unlockable 2=Signature check failed 3=Attempt Limit Reached 4=Unlocked and Lockable 5=Unlocked X2: 0=SIM Valid 1=Unknown(this gets set for PN when unlock is attempted) 4=SIM Not Valid Note: You can view these logs later in /Library/Logs/Baseband. Use any text editor to open them. Step Five: Don't forget to enable CommCenter by typing in:
launchctl load -w /System/Library/LaunchDaemons/com.apple.CommCenter.plist
This is basically how you can check your device's lock state and unlocking possibility by using AT+ commands. For the full list of other AT+ commands use this link and find the command you need.