Link to home
Start Free TrialLog in
Avatar of Cybordax
Cybordax

asked on

Sending SMS from VB through Nokia 6310i with serial data cable

Ok, i have read a questions / answers about what to type for the at commands and using MSCOMM object to talk to the nokias modem..

I can manually send an sms using hyper terminal no probs.. and XP can query the Nokia Modem and give me good results...

BUT

I drop the MSCOMM object in a form and then do the simple code as follows:

MSComm1.CommPort = 1
'MSComm1.InputLen = 0
MSComm1.Settings = "9600,N,8,1"
MSComm1.PortOpen = True
MSComm1.Output = "AT" & vbCrLf

'------------- at this point i wait for the modem to report back "OK"
'-                BUT it never does..  nothing happens at this point.
Do
    DoEvents
    Debug.Print MSComm1.CommEvent & vbCrLf      '------- ALWAYS returns 0 (zero)
loop Until InStr(buffer$, "OK" & vbCrLf)

   
'----------- This part i typed in manually in hyperterminal and it works fine...  but my prog never gets this far as above is in a loop.
     
MSComm1.Output = "AT+CMGF=1" & Chr$(13)
'MSComm1.Output = "AT+CNMI=3,3,2" & Chr(13)
MSComm1.Output = "AT+CMGS=" & "+447834871851" & Chr$(13)
MSComm1.Output = "HeartBeat from WWW1: Server Ok" & Chr$(26)
'MSComm1.PortOpen = False
Label1.Caption = MSComm1.Input

Does anyone know off the top of their head if there is something i am doing wrong?

Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of SergeiKo
SergeiKo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cybordax
Cybordax

ASKER

I will give that a go and get back to you...

Got back LATE from work tonight, so i WILL let you know the following day...

Thanks for the response dude...

Ok, i tried what you had suggested, and still no joy, mate...

I nothing displayes in the debug window...

I can confirm the data cable is recognised by 6310i as it says data accessory connected.
i can confirm PC can see the phone and recognise it on COM1 as Hyper terminal lets me connect, send sms etc...

but VB does not like it....

I did exact coding you typed in...  and changed the send calls to send an sms etc....

i am confused!  lol

Any more help you could provide would be most greatly appreciated!

Thanks in advance
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok, my friend, i will give that a go and get back to you.....

I have to be doing something REALLY stupid....  i did not imagine it to be this....  annoying to set up simple connection to a nokia modem....

Thanks again for your help so far...

Take care dude
Hello, again.

I have some thoughts:
 - try to set RThreshold = 1 and SThreshold = 1 in the setup component properties;
 - be sure you use your port number CommPort = 1 in your case;
 - in Settings you should use the same data rate as modem: 9600 or 115200 or ... . You can get modem's data rate with
   command AT+IPR? and set with command AT+IPR=115200 (to 115200 for example),
   or better choose the same data rate you choose with hyperterminal;
 - try to debug to be sure, that AT command was sent to modem.

Hope this help.

And keep patience when you are trying. If at first you don't succeed, think and try again. :-)

Regards.
Sorry, I have been v busy for a few days at work....

I will try what you advised, but i know i have set the same baud rate etc as hyperterminal....

I will get back to you

Thanks again
I think the suggestions by SegeiKo and imarshad can solve this problem. But the asker never got back to the Question meaning either he got it working or wasnot hoping for an answer....... If you donot want to Split then still it should be Paq'ed rather then deleted.....

Imran
Hello to all..

Mucho apologies for not getting back, but since the post of the question, have been too busy to continue with my little project....

I still did not get it to work.... very confusing....

The responses by SegeiKo and imarshad  were much appreciated ....  did not get much of a chance to implement and expirement with the suggestions though....

I could split the answers, but I still do not know, and wont be able to find out if their suggestions had worked...  not for a while anyway....  what is  Paq'ed  all about?
PAQ --------> Previously Asked Questions

If a question is PAQ then all the comments that have been made by the Experts are retained. But if a question is deleted then all the comments are deleted and the Question is also deleted. Since there was some useful knowledge in the posts so I wont like to let the Question be deleted.

Imran
Leaving it open for a few more days.... but do not make them too much :)

Venabili