Send and Receive from Serial Port

Blake81

Well-known member
Joined
Feb 23, 2006
Messages
304
Location
Georgia, USA
Programming Experience
1-3
I have a police scanner, and I just found the control codes which would allow me to make my own program to run the scanner from the computer. I haven't worked with serial ports before, and the one time I tried to read from a serial port and populate a textbox, it didn't work. Can someone show me a small example of sending a command through a serial port, and handling data being received? Thanks.
 
I got it figured out.

Using comPort As SerialPort = My.Computer.Ports.OpenSerialPort("COM7", 9600)
comPort.DtrEnable = True
comPort.Write("ATF" & vbCrLf)
' All data transfer code goes here.
End Using

ATF is the string I wanted to send to the scanner (just as a test) which would set the Attenuate feature on for the scanner. It works, so now I'm working on making an application to completely control the scanner from the computer, as well as save, read, and write to the memory banks in the scanner.
 
Serial port card reader eject signal..

Hi Blake81,

Do you have idea of how to send unlock signal to serial port card reader to release the locked card from card reader through VB dot net code.
I am using omron card reader and once the user inserts the card fully it locks the card, manufacture told me to send eject signal to the port to unlock the card...
I am totally new to this and unable to figure it out how to do this...
Pls anybody have experiance in this, pls share ur inputs to me... urgent...

Thanks in advance,
RK
 
Back
Top