We help IT Professionals succeed at work.

Sned/REceive SMS through GSM Modem via PCMCIA

brakes asked
Last Modified: 2013-12-09
i am using vb6 to create the interface that would send and receive sms.  i already have a gsm modem but not like the ones most members of experts-exchange talk about.  my modem is connected to my laptop via pcmcia slot (DZ-800).  i am using AT-Commands to communicate with my gsm modem.  here's how the code in vb goes:

Private Sub cmdSendMesg_Click()
With mscomm1
 .CommPort = 5
 .InputLen = 0
 .Settings = "115200,N,8,1"
If Not .PortOpen Then
  .PortOpen = True
End If
 .Output = "AT" & Chr$(13) & Chr(10)
 .Output = "AT+CMGF=1" & Chr$(13) & Chr(10)
 .Output = "AT+CSCA=" & Chr$(34) & "+639189035759" & Chr(34) & _
 Chr$(13) & Chr(10)
 .Output = "AT+CMGS=" & Chr$(34) & txtRecpMobileNo & Chr(34) & Chr(10)
 .Output = txtMesg & Chr$(13) & Chr(26) & Chr$(13) & Chr(10)
 Dim dtToday As Date
 dtToday = Now()
  buffer$ = buffer$ & .Input
 Loop Until InStr(buffer$, "OK") Or Now > DateAdd("s", 10, dtToday)
 If InStr(buffer$, "OK") Then
 MsgBox "Message Sent"
 MsgBox "Unable to send message"
 End If
 .PortOpen = False
 End With
 End Sub

if you would notice, my port number is set to 5.  this is because under control panel the port for my pcmcia card is set at 5.  

when i ran the program at port5, the invalid port number error appears.  when i tried to change to port 1, the msgbox would appear saying "unable to send message".  when i changed to port number 2, msgbox "message sent" would appear but actually there is no sms sent.  

i've been working on this code for 4 days now and to tell you guys honestly, i'm going cuckoo right now.  can anybody please help me.  pls tell what's wrong?? is the problem with the code or with the modem??  if so please specify solution. thanks you guys.
Watch Question

Hi brakes,

It will run perfectly ok if u run on comport 2, I have to read the code and find out whats the problem.

This one is on us!
(Get your first solution completely free - no credit card required)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.