Solved

What is AT commands.How can we use it in VB.

Posted on 2004-08-18
6
413 Views
Last Modified: 2013-12-27
What is AT commands.How can we use it in VB.Can anybody send list of it and a brief coding in VB to know its implementation.
0
Comment
Question by:jijojac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
msjammu earned 60 total points
ID: 11952878
The AT prefix (also known as the Attention Code), signals the modem that one or more commands are to follow. These commands are industry standard language used to communicate with the modem. Your modem is always either in the command mode, or the on-line mode. The modem starts up in command mode when it is first switched on. Commands are only accepted by the modem when it is in command mode. Commands input when the modem is on-line, are treated as data, not as commands. Commands may be entered from the terminal mode of most communications software packages.

Settings made via AT commands are automatically reused by the modem until another command is received to change them, or the modem is turned off.

http://www.modem.com/general/extendat.html
More Information on this page
------------------------------------------------------------------------------------------------------
VB Example
this may help
http://www.activexperts.com/activsms/

See this in VC
http://www.experts-exchange.com/Programming/Wireless_Programming/GSM/Q_20921720.html
---------------------------------------
See one program's Code

Public Function sendText(message As String, dest As String, SMSC As String) As Boolean

'Reset modema
MSComm1.CommPort = 1
MSComm1.PortOpen = True

MSComm1.Output = "ATZ" & vbCr
MsgBox ""
StatusBar1.SimpleText = "GSM modem reset successful"

'SMSC number
MSComm1.Output = "AT+CSCA=" & Chr(34) & "+" & SMSC & Chr(34) & vbCr


MsgBox ""
StatusBar1.SimpleText = "SMSC number entered"

' Send the message format (text or PDU) command to the modem.
MSComm1.Output = "AT+CMGF=1" & vbCr
MsgBox ""
StatusBar1.SimpleText = "Text mode selected"
' Send the unknown command to the modem.
'MSComm1.Output = "AT+CSCS=" & Chr$(34) & "PCCP1252" & Chr$(34) & vbCr
MsgBox ""


' Send the text mode parameters command to the modem.
MSComm1.Output = "AT+CSMP=17,167,0,0" & Chr$(13)
MsgBox ""
'StatusBar1.SimpleText = "Parameters entered"
' Send the message reference command to the modem.
MSComm1.Output = "AT+CMGS=" & Chr(34) & "+" & dest & Chr(34) & Chr$(13) ' Ensure that
'WaitPrompt
StatusBar1.SimpleText = "Destination number entered"
'Send message
MSComm1.Output = message & Chr(26)
MsgBox ""
StatusBar1.SimpleText = "Message body entered"
sendText = True
StatusBar1.SimpleText = "Text message sent to number : " & "Manpreet"
End Function

Private Sub Command1_Click()
sendText "Hello", "919872442300", ""
MSComm1.PortOpen = False

End Sub

Private Sub Form_Load()

End Sub


Regards,
msjammu
0
 

Author Comment

by:jijojac
ID: 11962731
Thanks msjammu

I tried the code. Can we use this commands with internal PC modems. When i tried it was not working or i didn't get any response from the modem
0
 
LVL 6

Expert Comment

by:msjammu
ID: 11962763
I haven't got a chance to test it with Internal PC Modem but It should work with any GSM modem

Regards,
0
 

Author Comment

by:jijojac
ID: 11963907
I got some other codes which can dial to a mobile from Internal Modem. U are correct i think we can use AT commands for sending messages only in GSM modems. But if u know anything about if it is possible from PC modem please tell me. Thanks    

If MSComm1.PortOpen = True Then
      MSComm1.PortOpen = False
   End If
   MSComm1.CommPort = 3
   MSComm1.InputLen = 0
   MSComm1.Settings = "9600,N,8,1"
   MSComm1.PortOpen = True
   
   MSComm1.Output = "ATV1Q0" & vbCr
   MSComm1.InBufferCount = 0
   ' Mobile No.
   MSComm1.Output = "ATDT 91941234567;" & vbCr
   
   MsgBox "Dialing.."
   
   MSComm1.Output = "ATH" + vbCr
   MSComm1.PortOpen = False
0
 
LVL 6

Expert Comment

by:msjammu
ID: 11970323
jijojac :

>>>I think we can use AT commands for sending messages only in GSM modems.

At Command can be used with any modem; PC Modem Also

Regards,
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
No internet 10 60
How do I get a Toshiba FlashAir to work with a PC that is not Wi-Fi enabled? 3 45
Radius Debug Error 16 112
URL to download Engenius BH-ENS202 firmware update 4 40
Using in-flight Wi-Fi when you travel? Business travelers beware! In-flight Wi-Fi networks could rip the door right off your digital privacy portal. That’s no joke either, as it might also provide a convenient entrance for bad threat actors.
DECT technology has become a popular standard for wireless voice communication. DECT devices are not likely to be affected by other electronic devices and signals because they operate in a separate frequency-band.
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question