Click here to Skip to main content
15,887,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i am trying to read the data from serial port which is connected to a gsm modem (nokia cell phone). i want to read the incoming call or recent call log that bring the top most incoming call
but code is not working as i wish
i snd the command AT and it reply OK
but when i send any other command it gives error
i need a code sample that is reading from the serial port and display the incoming call or recent calls history on a label
my code is

If SerialPort1.IsOpen Then
Try

SerialPort1.Write("AT " & vbCrLf) ' check the AT modem replying ok
SerialPort1.Write("AT + clip = 1\r\n" & vbCrLf) ' read the incomming call from the cell device
SerialPort1.WriteLine("AT + CPBR = 1" & vbCrLf) 'read the phone book of the cell device


Catch ex As Exception
MsgBox("read" & ex.Message)
End Try

End If
Posted

1 solution

Hi
Dear Kamran you can find a really good sample about GSM modem programming follow of links please review this samples before than start anything ;)

Send and Read SMS through a GSM Modem using AT Commands[^]
http://www.sourcecodester.com/visual-basic/sending-sms-using-commands-gsm-modemgsm-phone-receiving-sms-updated.html[^]


Best Regards.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900