Serial Port - Receive Incoming Data From Radio Equipment?
Apr 8, 2009
I have an application that receives incoming data from a Radio Equipment through a hardware modem. How can I replace the hardware modem? Could I use the PC Sound Card in place of the modem?
I am having problem receiving data from serial port. Btw, I am new to Visual studio 2010 too.
I do a test program on my PIC so that when button1 press, it will send character "Y" to visual studio; when button2 press, it will send character "N" to visual studio. I know for VS 2010, sending data out is by the command
I am working on a project to receive and send data to a micro controller using a Visual Basic application. I am using Visual Studio 2008. I have done coding to send data on button click event.
But I am stuck at how to receive incoming data to serial port continually from MCU and store it to an integer or string type data in VB.
I am trying to recieve HEX data from a seriall device. Code is as below . but the required output is not correct. Some chracter code are not correct even in decimal . like for 80 i recieved 3F and for c0 also.for example i recived a string .
10 02 3F 00 10 03 3F 61 but in actual data should be 10 02 80 00 10 03 c0 61
I use ReceiveSerialData() function to get a string (20 byte of 8 bit data) from serial portBut I faild and got the error "operation has timeout". I am new in VB 2010
I am trying to recieve HEX data from a seriall device. Code is as below . but the required output is not correct. Some chracter code are not correct even in decimal. like for 80 i recieved 3F and for c0 also. for example i recived a string .
10 02 3F 00 10 03 3F 61
but in actual data should be
10 02 80 00 10 03 c0 61
Public Sub DataSeriallReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort.DataReceived Dim buff As String
I am working on my project "PREPAID RESTAURANT CARD USING RFID TECHNOLOGY" in which i sent 12 digit number (rfid tag id) to serial port through my hardware and receive at my vb.net 2008 page.but i don't know how to receive data in vb page in the textbox using which cammand.
I am doing a project on sending and receiving sms from a serial port. But I have a problem on receiving sms. About the receiving sms, how can i show the received sms in the textbox using the serial port. Do I have to use the DataReceived Events. Here is the code i am using:
Public Class Form1 Private WithEvents serialPort As New SerialPort Private ReadThread As Thread[code]....
I have created a program to send and receive data from a serial port, some of the data needs to be stored in certain strings for a export to excel. However the data takes while to to send be sent back. So in order to get the right information in the right strings I have to put pauses in my code. I have added a timer to my form:
On my timer's tick event I have the following code:
Public Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick iTick = iTick + 1 End Sub
I am writing a VB based program which will receive data from a Micrcontroller (programmed in C) via UART. The data that is transmitted from the Microntroller can be displayed on Hyperterminal when I set it up with the correct settings (Baud, Parity etc), so I know that Microcontroller end is working fine. The VB-based program however (written in Visual Studio 2010 Express), does not however receive any data and I always get the TimeOut exception (despite the fact that Microcontroller is sending data via UART, I have an onboard LED to indicate this). Here is the VB code, it is an adapted version from the MSDN library:
I have spend about a week trying to get data from this radio set through a modem and a serial port. The data is transmitted by the transmitter in 5-databits at baud rate of 50. An existing vb 6.0 program in windows 98 receives the data correctly with port settings of Speed = 50, Databit = 5, Parity = none and Stop bit = one. The data is received at every 9 sec, presumably with the help of a timer. I have to write a program in .net frame work 2.0 to get the same data. My problems are:
1. The program hangs when I execute SerialPort1. ReadLine().Trim or SerialPort1.ReadExisting
2. When I collect SerialPort buffer after every 9Sec, and try to get the strings out of each byte using following code, I get only repeated squares instead of characters.
I have a USB modem that can detect caller ID and can detect dialled digits when special AT commands activated, How to send and receive data. The sent data will be the AT command such as AT+VCID-1 to activate the caller ID, the received data will be caller ID information and the digits dialed. I'm new to prgramming and using Visual Basic 2008 Express.
I am wondering is there any code to get the text reply from the modem? I am using the itegno W3800 modem. I have used the below method so far but apparently VB.NET windows form doesnt see the incoming data. The message box comes out empty. But when i try the same method with the TMAS Siemens GSM modem, VB.NET can see the incoming data and display out the data string.
here is the code that i have written:
serialPort.Write("AT" & vbCrLf) 'set command message format to text mode(1) receiveddata = serialPort.ReadExisting() it works for the TMAS gsm modem.
The baud rate for the TMAS GSM modem is 9600 and the baud rate for the itegno modem is 115200.
For the itegno modem, the data is sort of like stuck at the serial port as after every time i pressed on the button for example "AT"
this "AT" command gets "stuck" at the serialport and run only when i have connected through the serial port in hyper terminal.
I am thinking is it the baud rate for 115200 is too fast for VB to handle? And also is there any way to solve this problem?
i have to revert back to the itegno modem for use for my project at the end of the day.
I'm trying to receive data from the serial port and display onto a text box in my gui in vb. I'm using xp pro sp2 and vb 2008 exp.What i've done so far:
- I'm able to send data successfully (tested) to the serial port - I can dispaly what data is being sent (tested)
Steps taken:
- I have looked around on this forum for something similar to what I have but no similar posts are here - Will look into MSDN help shortly - Will also try some vb books I have lying around. But the problem is most of the vb books deal with sql server and database stuff and not really interfacing to hardware.
I need to communicate with a PLC in serial port. PLC sends 4 possible data: 0, 1, 2 or 3 (which are status).My vb.net program uses IO.Ports.SerialPort class. When I read the data, the "1" and "2" are good, but the "0" and "3" are received as "?". I tried all the Read method (ReadByte, ReadExisting, Read, etc), it always give the same result. In HyperTerminal, it's fine.I made a test program in another computer (Win 7). Test was perfect, I received all 4 status correctly. I ran the same test program on the original computer (Win XP) and once again, I got the "1" et the "2" but the "0" and the "3" was "?" (ascii 63).
I have a controller board that is built by us that sends strings to the serial port based on inputs that it receives. The app we are working on seems to be receiving the data fine but it is displaying it in an odd way and I'm sure it is a simple problem I am overlooking. Here is the incoming code so far:
Private Sub SecuritySerialPort_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SecuritySerialPort.DataReceived ReceivedText(SecuritySerialPort.ReadExisting()) 'Automatically called every time a data
i am a absolute beginner and i want to use vb to receive data from micro controller through serial port using rs232 standards, i found this code to receive the data serially, can any one tell me where should i paste this code, so that the data received will be displayed in message box.Private Sub DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) HandlesSerialPort1.DataReceived
I want to create an application in VB.net that will read data outputted by a RFID reader on serial port.I want to know how will my application be able to identify the interrupt generated by Serial port and will read data from there?
I got an app, which receives data via a R232 port, convert it to a string and on the other side I got a database, where the strings are saved. How can I find a way to compare the string with all strings in one database column and get back the another stringform the same row in this database. I never programmed a database
I am working on an assignment whereby i am requested to receive incoming messages via a gsm modem, i have tried to do so by writing at commands to the serial port where the gsm modem is connected to but there's one specific line which gives me error when i tried writing it to the serial port, (AT+CMGL= "ALL") which returns me an error: CMS ERROR: 305 which means Invalid Text mode parameter The following is the codes i have done up to so far, can anyone tell me what is the correct way to write this specific line to the serial port or is there any other methods that is able to do the same thing?[code]...
I need to send data via serial and wait for and answer (VB.NET).Right now i'm doing it this way:SerialPort1.Write(sel & Chr(13))Thread.Sleep(50)aaa = SerialPort1.ReadExisting()If i do not thread.sleep, i get nothing, i supose it's because the machine is too fast.
I want to control the D0-D7 pins of the parallel port(LPT) with VB2010. I do not need to transfer or receive data via this port, all I want is to set high or low (5V or 0V).Is it even possible?
The link below has code to connect to a modem thru the serial port but it is for an earlier version of VB. when I convert the code, it does not fully convert and has 4 errors that prevent building the project. can someone tell me what needs to be changed or added?
May i know how to insert a AT command method inside my program to receive incoming sms?
My program is in visual basic windows form 2005.
Here is how my program goes.
After i click connect button in my application, the gsm modem will automatically read the incoming sms and display in the textbox on the program.
I already have the list of AT commands to be used, they are :
1. AT 2.AT+CMGF=1 3.AT+CMGL="ALL"
I also would like to know how to declare these commands as string inside the program.
Here is my program so far:
CODE;
This code is for the user to click on connect button which will connect to the serial port. So after connecting the modem will then auto read and display new incoming sms.