I have created a SMS application in VB 6.0 to send bulk SMS from my PC using Bluetooth to connect my Nokia 6230i handphone.
I can send SMS correctly using AT commands.
But I cannot read incomming SMS properly. Everytime when I read SMS from my phone, it doesnt read all the SMS properly. Sometimes, it read 10 SMS else it read 15, else it reads all of them. It depends on the time. I think there should be a timer, and i put a waiting code by using a timer, so that the program will get enough time to poll all the SMS from phone. But only rarely it reads all the SMS. Why is it so??. anyone can help me. Below is my code:
MSComm1.Output = "AT+CNMI = 1, 1, 0, 1, 1"
MSComm1.Output = "AT+CMGF = 1"
MSComm1.Output = "+CMTI: SM, 1"
Call Wait ' function for delay
Buffer = ""
MSComm1.Output = "AT+CMGL=" + Chr(34) + "ALL" + Chr(34) + vbCrLf
Buffer = Buffer + MSComm1.Input
Loop Until InStr(Buffer, "OK" + vbCrLf)
ReadMessage 'function for reading/parsing the recieved message.
Does anybody there have a sample code for reading SMS from handphone?. Please lend me your code if you dont mind.
And is there any way to get a notification, instantly when the phone recieves a new SMS from someone. Then that SMS must be loaded to the inbox in the PC. Should I use a timer to check for any new SMS??
Please help me.
Thanks in advance.