Communications :: Using Telnet To Read A Sensor

Jul 28, 2009

I am using Telnet in VB to read a temperature and RH sensor. I don't know that the data is the exact same length every time. I have pasted the code below. This code does get the data back. I have also pasted the unparsed and parsed data as well.... Sometimes I get more or less data than the time before and I think this is because I am not reading the entire buffer. How can I make this code run a little better so that I can get the proper data every time? Below the code is a sample of several readings. You can see how I get bad data periodically.

Unparsed
" 24.4155 45.2235 11.7921 200.9005 45.2372 45.2235 -42.0242"
Parsed (replaced " " with , and then " " with ,)

[Code].....

View 2 Replies


ADVERTISEMENT

Read The Value Of The Sonar-sensor Of NXT Through Bluetooth?

Sep 22, 2011

How is it possible to read the value of the sonar-sensor of my NXT through Bluetooth (and Visual Basic 2010)?

View 3 Replies

Communications :: Connect And Read From Serial Com?

Sep 22, 2008

my code to read from serial port and store it in a variable?

Public Class Form1
'SerialPort object creation
WithEvents mySerialPort As New IO.Ports.SerialPort

[Code]......

View 1 Replies

Communications :: Parrallel Port Simple Input Read?

May 9, 2010

What i want to do it be able to read the input of a pin on the parrallel port. I want to supply a constant voltage to the pin and when that voltage drops i want to jump to another procedure.

View 2 Replies

Communications :: Serial Port Read Wrong Return Result?

Dec 17, 2008

Anyone else have an issue using read, It appears when I use read it gives me the correct buys but returns the wrong integer value So I use it and it fills the Array i make with &h10, &h6 but read reutnrs number of bytes returned to 1. if there a better way to go with Vb.net with RS232 I mean really my projet dosent have anything out of the Normal

Friend WithEvents CashValidator As System.IO.Ports.SerialPort = New System.IO.Ports.SerialPort("COM1", 9600, IO.Ports.Parity.Even, 8, IO.Ports.StopBits.One)
CashValidator.Read(MyResponce, MyResponceLen, 4)

View 2 Replies

Open A Communications Port And Read Data From A Wired Usb Device?

May 16, 2011

I know how to open a communications port and read data from a wired usb device.

How can I open a communications port to read data from a wireless bluetooth device?

View 5 Replies

Create An Interface For A Sensor?

Dec 7, 2011

How to access VB functions using C#? I am trying to create an interface for a sensor, whose files are given in VB format. How can i access themm and consequently make changes in the same?Ok! sorry for incomplete info. The files i have are .vbp and .frm format. I am trying to create a Form file(interface, with buttons etc.) using Microsoft Visual Studio2008, which has a included wrapper to combine C++ and C# and has console application. Now how do i call the .vbp files and to furthur work on the interface?

View 1 Replies

Getting Control Using Picoscope Sensor

Apr 1, 2009

I am looking to create a VB 2008 Express programme which converts a data stream from a picoscope muscle sensor into a power output board which controls a mechanism.

In simple terms when the Muscle sensor reaches a value of 0.8 V or higher I want the programme to send a text file to the power output control programme, and likewise when the sensor is below 0.2 V I want the power to be zero.[code]...

View 3 Replies

Pull Info From Sensor.dll?

Jan 15, 2010

I'm trying to get my hands on my ThinkPad T500 tilt sensor data.So the (unfinished, but works (i'll get three values, state,x and y)) code is:

Public Class Form1
Private Structure AccelData
Dim stat As Integer
Dim x As Short

[code]....

With debug.print I'll get the correct information, but as soon as I try to insert the outcomes to label.text I'll get error:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

So, how can I pull the information from dll to label text?how to use the sensor.dll to extract information?

View 1 Replies

Communicate To Telnet In Program?

Jan 27, 2010

How to send commands to a telnet session and then read the output from the telnet session?

I can easily create a Telnet session using something like this[code]...

View 2 Replies

VS 2008 Automated Telnet?

Oct 28, 2009

I'm new to VB and i'm using VS 2008, i just wanted to know if there's a set of instructions you can provide me that can enable me to auto login when you telnet on a node. That is when you telnet an ip address of that particular node it will automatically log on the system with your username and password already inserted in the instruction. So it wont have to prompt a screen saying insert username or password

View 1 Replies

G-Sensor/Accelerometer, How To Find Values

May 3, 2009

I have been searching everywhere to figure out how to access the G-Sensor/Accelerometer in my HTC Touch Pro and other like devices. I've already created a number of app's for windows mobile but now I'd like to add some more customizations into my app's. I don't mind installing 3rd party app's but I'd like to add the same fuctionality into my own apps with regaurds to the G-Sensor/Accelerometer funtions. I got a hold of some code(Rhaakmeester)...

[code]...

This code helped a bit but only detects the change after a 3rd party app has already changed the screen orientation or if the KB was slid out. How do I access the G-Sensor data myself.

View 2 Replies

Light Sensor And Audio Announcement

Nov 6, 2009

I'm new at VB therefore i need some guidance on how to go about doing e current project that i have. Currently doing on Light Sensor and Audio Announcement.

[Code]...

View 5 Replies

Communications :: Send A Command Via RS232 Communications

Jan 26, 2009

I am using VB2008 Express and am curious how to send a command via RS232 communications. The string that I need to send is 02h PON 03h. The start and end bits are 02h and 03h.

How can I convert 02h and 03h to its ascii form. In hyperterminal, I use the sequence {(hold)ALT 0 0 2} on the number pad to send the start bit.

I am using this code currently without the start and end bits

Code:

View 8 Replies

Send Commands To The Telnet Session Via Vb?

Dec 14, 2009

i'm trieing to configure a mp3 recorder via telnet and visual basic.how can i send commands to the telnet session via vb?I can make connection with it via telnet and ip adress , but after that i wil send the command for login( login=hdr1) ANd with another butten for example (transport=play)How can i do that?

[Code]...

View 1 Replies

VS 2010 Sending A Command To Telnet?

Apr 14, 2010

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.

View 1 Replies

Measure Distance Using Serial Port (sensor)?

Mar 21, 2010

measure distance using serial port (sensor)?

View 1 Replies

Test Telnet Communication On Remote Computer Using .net?

Feb 2, 2012

I have a central server and I need to write a bit of vb.net which will see if I can telnet to a specified server on a specified port.Is there anyway this can be done in VB.net? I thought about sending command prompts to the remote server to execute telnet, then output the logs of netsh and read those and send the information back to the central server for review.

Its a very messy way of doing it, so I was just wondering if there was an easier way

View 3 Replies

VS 2008 - Sends Data Via Telnet Locally On The PC

May 17, 2009

I have two main troubles. The most important is the telnet one. I have another program which sends data via telnet locally on the PC. It requires a login and optional pass. I can connect and draw data which comes in 77 byte packets.

The problem is, the first packet of data doesn't display until the 2nd one comes in, which for this arrangement could 10s or 24 hours depending on the final user's intended use. This staggered data rx continues until termination of the program. I've used tcpClient.Available() to confirm that my app is seeing the data almost the instant it leaves the other program but for some reason the message isn't passed until the 2nd packet arrives. I'm sure I've probably implemented this in a most cumbersome way so any streamlining.

The second issue (which is contributing in part to the first) is the timer which here uses a freeby snip from a forum somewhere - it screws with the app's menu's controls and program flow. I've tried the VB2008 timer but can't seem to make sense of the best way to use it in this context. I think I've been looking at the screen too long and can't see the obvious.

Imports System.Net
Imports System.Net.Sockets

Public Class Form1

[CODE]...

View 1 Replies

Writing A Telnet Client Using System.net.tcpclient

Aug 18, 2010

This isn't working for me when I connect to my solaris box

The server is sending back

Imports System.Net
Imports System.Net.Sockets
Imports System.Text

[Code]....

View 2 Replies

Converts A Data Stream From A Picoscope Muscle Sensor

Apr 1, 2009

I am looking to create a VB 2008 Express program which converts a data stream from a picoscope muscle sensor into a power output board which controls a mechanism. In simple terms when the Muscle sensor reaches a value of 0.8 V or higher I want the programme to send a text file to the power output control programme, and likewise when the sensor is below 0.2 V I want the power to be zero.

So 0.8 V > = send text file (0O=100%)
0.2 V < = send text file (0O=0%)

so when muscles being senced move the device turns on and off. I think I am successfully getting the data stream from the Picoscope which is plugged in the usb. I am using codes and examples that the programming guide for the device provided. [Code] I just need to now how to get the data to be displayed or how to tell the programme to do something with the data. The device also came with an example of how it can record data to an excel sheet if anyone needs the code to gain a better understanding.

View 20 Replies

Visual Basic Hard Disk Acceleration Sensor?

Oct 21, 2011

Is there a way to detect the motion sensor in the hard disk with visual basic .net?I know that hard discs has an acceleration sensor to turn the hard disk off when the computer falls from a height.I have seen one example of this in a game using this sensor.I want to detect the sensor so that my security program can alarm and email me if lets say someone nocks my computer to the floor while im gone.

View 1 Replies

Write An Application That Communicates With A Digi Watchport/D Sensor?

Jul 18, 2009

I am using Visual Basic Express 2008 to write an application that communicates with a Digi Watchport/D sensor. This is an IR sensor and I checked the manual for the commands to send to it. In order to get the distance, it say to send the sensor the command D<CR>. Here is my code so far...

Option Explicit On
Option Strict On
Imports System.IO.Ports
Public Class Form1

[Code]...

Every time when i click the button, I get the timeout exception error message.

View 1 Replies

Send And Receive Information From A Client Via Telnet Applciation

Apr 1, 2011

An currently writing a vb.net application to send and receive information from a client via telnet. Am using System.net.Sockets to do this. I can send data great and get data back is ok. So the Problem is in the command window after I telnet in to the server application, when i press the delete key the cursor moves back a character and doesn't delete the character, just over writes it and when I read the bytes in I get the deleted character and the ascii value for the delete key and then the replacement character. I have seen another telnet application that shows the deletion of characters in the Command window.

View 1 Replies

Make A Telnet Application To Communicate With A Special Video Player?

May 28, 2009

I am trying to make a telnet application to communicate with a special video player I have, I have gotten the telnet session to connect to the video player (server) but it won't respond back....I think the problem might be with the coding...the strData string below is supposed to be the replies I get back from the server, but it won't show any strings on the screen.

[Code]...

View 5 Replies

[2005] Make An Application Which Logs On To A Server Using The Telnet Protocol?

May 9, 2008

I am trying to make an application which logs on to a server using the telnet protocol runs a couple of commands and stores the output of these commands in a text file.The problem is that I cant really seem to figure out how to negotiate the telnet commands. I have done a packet capture of a telnet session todifferent servers using a packet capturing program and I dont seem to find any fixed pattern. Every server negotiates the command in its own different way and in a different sequence, moreover the commands exchanged are not the same.

What I want to do is to exchange the bare minimum commands which will allow me to log on to any server via telnet, run my commands, take the output and logout.I have searched the internet for such a set of 'general' telnet commands but I wasnt able to find any.

View 13 Replies

Socket Programming And Telnet Class For .NET To Simplify The Sending And Receiving Of Data?

Sep 28, 2009

I'm writing a GUI-based app in VB.net that talks to a LambdaMOO server via telnet, sends commands to display the object hierarchy, then parses the output and creates a visual representation of the object hierarchy.So my question is: is there some kind of "telnet client" class for .NET to simplify the sending and receiving of data, or do I have to write my own using the socket API?

View 7 Replies

Communications :: Use Class As Dll?

Jul 21, 2011

I got a piece of code that I have to use as a class. It gets added to the project every time, the accessed from the code of the forms.

It is for ethernet communication to an industrial radio.

So right now it's a just a class called MK

Question:

Is it possible to compile a class into a DLL which then can be just referenced to each application?

View 1 Replies

Communications :: What Does <MTAThread> Actually Do

Jun 17, 2010

I see it often declared in front of main functions and after reading the MSDN comment on the matter, it's purpose still eludes me. As far as i can understand it has to do with setting the program into some form of multithreaded state. But what does that even mean?When should I use it, why should I use it, is it even currently relevant becouse i read somewhere that the default apartment state is MTA nowaday's What's it's purpose mister Anderson ...

View 1 Replies

Communications - Difference Between A 802.11 And 802.3AE Adapter

Jul 1, 2010

How can I target a Adapter I have on the machine and Tell through windows API if its a Wireless or Hardwired Ethernet Adapter? I really want to avoid doing anything real High level like piping Command prompt text XD.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved