CTRL-Z = ASCII Code 26
Communicate GSM Modem with VB6, stuck to enter AT command
Communicate GSM Modem with VB6, stuck to enter AT command
|
|
Jan 7 2009, 05:49 PM
Return to original view | Post
#1
|
![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
1,180 posts Joined: Jan 2007 From: *awaiting GPS accuracy* |
CTRL-Z = ASCII Code 26
|
|
|
Jan 8 2009, 09:29 AM
Return to original view | Post
#2
|
![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
1,180 posts Joined: Jan 2007 From: *awaiting GPS accuracy* |
QUOTE(mszazu @ Jan 7 2009, 11:09 PM) thx! it works.. Hi,// MSComm1.Output = "at+cmgf=1" + Chr$(13) MSComm1.Output = "at+cmgs=0191234567,145" + Chr$(13) // For this part, I actually wants to write like a normal equation. How do I write it without using MsComm1.Output? Rite now, when I send Sms, only half of the message received. I'm not sure why. Could be because of this part? Option Explicit Private Sub Form_Load() MSComm1.Settings = "9600,N,8,1" MSComm1.DTREnable = False MSComm1.CommPort = 1 MSComm1.PortOpen = True End Sub Private Sub cmdExit_Click() MSComm1.PortOpen = False End End Sub Private Sub cmdSend_Click() MSComm1.Output = "at+cmgf=1" + Chr$(13) MSComm1.Output = "at+cmgs=0191234567,145" + Chr$(13) MSComm1.Output = "ABC DEF GHI KLM NOP" + Chr$(26) End Sub For your information, for the best compatibility, you would need to include the init string (it's an AT command), and it is different for each model of the GSM modem, so you will need to search in Google or from your modem vendor. Besides that, try to experiment with the hardware settings, particularly the Baud Rate. This might also be a reason why you only receive half of the message. Is the message appeared half way in your phone? Thanks |
| Change to: | 0.0151sec
0.23
6 queries
GZIP Disabled
Time is now: 15th December 2025 - 03:02 AM |