Communicate With A Device Via COM1. Sending A Command In The HEX Format?
Jul 27, 2009
I use visual basic. net, I would like to communicate with a device via COM1. Sending a command in the HEX format for example 02 00 05 15 ... and take the device to respond in HEX format. these commands I found on the Internet.
Private Sub Button1_Click () Handles Button1.Click
MSComm1.CommPort = 1 'Use the COM1 serial port
MSComm1.Settings = "4800, N, 8.1"[code].....
I bol pioneer of this program looking at Google, but I was never clear. meetings drgač this would be doing, but the service not to a significant'd be best if someone had already written CODO. better, but also that we already sent someone made programs
I want to send a simple command, such as "v20" followed by a carriage control character, to a heating/cooling block connected to a desktop computer running Windows XP. I am able to get the commands to work within a terminal emulator. I want to compile a simple program that will be executed by software used to control a liquid handling robot.I've looked at the how to send strings to serial ports in visual basic page and modified that code ever so slightly to send the data that I want. However, it does not work and my heating/cooling block is not changing temperatures.
Here's what I have written:
Sub SendSerialData(ByVal data As String) data = "n65" ' Send strings to a serial port.
I am having a little trouble with the serialport object in VB2008. I have a program that will send a command to the slave device however the program will not read the data from the slave device. I know my computer is communicating with the slave device because in hypertem it has no problem. For example I send the word "AT" and I should get back a response of "OK",
I`m working on a project where i have connected a FPGA chip to the PCI bus but now i am trying to figure out how to communicate in VB to that device? Normally the device has memory assigned to it in XP (address h00000200 to h0000037F) but i don`t know how to read/Write to that memory directly in VB...
I have a tracking device CT-04 car tracker that i am trying to integrate with my vb.net desktop application. I have the protocol from the manufacturer (redview) that contains the commands to send to the tracker unit and from tracker to the server. My application is in vb.net .
I wanted to know how i can send the commands from my vb application i.e can i still use vb.net to send these commands to the tracker through gprs?
what do i require in terms of hardware and software from my side in order to send these commands through gprs (not SMS ) to the tracker unit and to receive data from the unit.
what is the printing command for the vb.net, as i have develop 1 of the program to auto print the label from the word pad,how is VB program communicate with the printer in order to print out the label as expected from my end?
I am trying to open an audio device using the waveOutOpen function in winmm.dll and receiving a WAVERR_BADFORMAT error. It was working fine when I was just using the WAVEFORMATEX structure alone but unfortunately this has the limitation of only handling 16bit audio and I would like to handle higher resolutions.
i was using a pocketpc phone and i want to have a program it with a database.i am not familiar w/ the database of vs 2k8 because it was using a dataset i i dnt know how to connect the database of that...
I have a need to construct a command Byte to send to another device using bit wise operations.There seem to be plenty of article on how to do this for indiviual bits using an OR'd constant but how do I do this for values that span multiple bits? eg "Bits 4-1" set the repeat count".so how to I inject a repeat count value of say 7 into my command byte?
I am connecting to a website using a Httpwebrequest command... this is going good as far as I can tell but to test it I want to send a command to the website that presses a button on the website... of course this will not be a physical push as I do not have a browser but I just want to use the "submit" button on the site...So when it sends the request to the website it will also send a command to "press" the submit button and do the same action that the submit button normally would if I had pressed it through a web browser...y code is as follows:
Dim r As New Random Dim s As New Random Dim l As New Random
I have wrote a nice little app in VB.Net to connect to an IP device via telnet and send a command, then write the reply to this command into a text file.I have everything working appart from the command.I need to send "Ctrl+a I2100" so if I was doing it manually in a dos box with telnet I would connect, then hold down Ctrl key and a then release, then type I2100 How do I do the Ctrl+a bit in VB. The line of code I have at the moment, is
client.SendCommand("Ctrl testing")
Now this obviously sends the word Ctrl testing to the telnet device.
I am working on writing a program that needs to send a command to a specific port on the same computer, I have that working fine. There is another piece of software running that is listening to that port for some commands (read on). Dim myTcpClient As New TcpClient myTcpClient.Connect("127.0.0.1", 61225) Dim networkStream As NetworkStream = myTcpClient.GetStream()
However when I try to send a command I get no response... Dim outStream As Byte() = System.Text.Encoding.ASCII.GetBytes("0x33") networkStream.Write(outStream, 0, outStream.Length) networkStream.Flush()
I have been given a list of protocols that I need to send to that port. What I have been told is that the size (in byes) is 1 and the value is "0x33" with no parameters. I am completely new to sockets and sending data through tcp.
I've done it before, so I'm getting a little frustrated on how to get this to work exactly I need to send some arguments to a command line window and I thought I did it this way:
VB.NET Dim p As New Process p.StartInfo.FileName = "cmd"
What I would like to do is have one button be able to call any number of other sub routines when needed. In other words...the app is running and I need it to stop so the user can either read information presented...or make choices...then click the CONTINUE button to pick up where the app left off. However, I need this to happen many times across several forms and modules.
I know I can use a MessageBox and get the same effect..
In vb.net 2005 I want to send a webpage as a test. Its a neat piece of code that sends mail that I figured out, but I get the error bodyformat/urlcontentbase not member of system.net.mail, and also mailformat not declared on the below. www data is dummy data for security reasons.
I want to convert a file to binary code by byte, but it's extremely slow for large files. I found out that the Format command is why it's so slow, is there a substitute?
A Problem in accessing a device from VB Windows cannot load the device driver for this hardware because there is a duplicate device already running in the system. (Code 42) This error is because i am using 2 devices of the same company which has the mass usb storage on it and when i install one of the device the other hides. So one is detected the Other is not. It also give a error called designed dragnonacally something...
Does anybody know what specific Nokia mobile phone should i use for my project development to send SMS through my PC using a GSM phone... I have my own mobile phone but it doesnt support SMS Text Format on AT COMMANDS. It shows error 303 when i use AT+CMGF=1. meaning my phone does not support Text format. It only support PDU code. I dont have any idea using PDU codes.
The VB format(object,formatString) command fails when placed in the handler routines of a DataGridView.In the following procedure the newCellValue returns the Format string value instead of a formatted cell value.This pproblem occurs in both the dgv_CellFormatting and the dgv_CellClick routines.The same commands work properly when placed in a procedure on the form.
Private Sub dgv_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles dgv.CellFormatting If e.FormattingApplied = False And Not e.CellStyle.Format = Nothing Then[code]...........
I try to write a application to make the communicate noise meter with PC, and following are my code[code]...
Why it does not work at all, and a sentence kept pop out in immediate window. "A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in System.Windows.Forms.dllyvonne
I have written in VB.NET a POS application.I'm using one thermal printer connected to COM1,I create a bat file wit this command :
copy mydata.txt COM1:
I run this bat and printer is working fine.I've installed my application on a second computer in the network and I need to print from there to the same printer,but is located on another computer.So how I use COM1 over the network,I've seen that for LPT port can be used NET USE command.
I am trying the following code using vb.net and have managed to capture the running application values via portmon... look likes below and connects with success:
QUESTION: What is the HyperTerminal Equivalent string value for this Keystroke Sequence: Ctrl-A Shift-V Ctrl-B 02 1234512345 Ctrl-C Ctrl-M The above works great using a windows HyperTerminal window and writes data to the device.
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged If Serial.IsOpen = True Then
[Code]....
Opens a serial connection when a radiobutton is selected. My question is: How can I make a message pop up saying "COM Port in use" if the radio button is selected when the com port is in use by another application? Right now, the program just crashes.
In the developing environment the computers do not have com ports, but I am working on a project for a client who does. It is annoying that when I test the program on my computers I always get the error. "The port (COM1) does not exist"
I am catching the general exeption but the debugger stops there anyway. I can press "continue" and the program resumes but I would like to clean that up and not try to open the port if the computer does not have one.
vb.net Try SerialPort1.Open()
[Code].....
lblNoCOM1 just tells the user that there is no serial port and that the barcode scanner is not working.
I am trying to read data from serial com1 port. Now, I am not sure how to send. I found so many method to send but that are not so good and I cann't read any data. I am using VB.net 2005. Which is the best way and how can I read and send?
Just trying to capture some text data flowing in on COM1. The port opens but the data does not flow in. I have a textbox on the form and a SerialPort in the tray.
Public Class Form1 Private Sub IncomingData(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived