VS 2008 SerialPort Hang-up?

Jun 23, 2010

I am trying to send and receive data using the SerialPort component. I am sending data to an Texas Instruments MSP430 which simply echos the sent character. I wanted my VB solution to read characters from a file, send a single character, and wait until the echoed character is received before sending another.

I have been fairly successful thus far but I have run into a little catch. When I attempt to send large files (323505+ characters) my MSP430 just hangs there and will not receive any more characters. My VB app return to VS '08 with timeout errors (timeout set to 1 minute).

I wanted to post my VB code here to see if the problem is from my VB app. I will be posting this problem on the IT usergroup to sort out anything on the MCU end. Here is the pastbin of the data write and the data receive subs:[URl]..

View 2 Replies


ADVERTISEMENT

VS 2008 - Process.waitforexit Is Hang Up When Running On Windows 2008

Sep 21, 2009

I use the 'Process' object to run EXE from my application. It works fine when it run on Windows XP and 2003. When it run on Windows server 2008, it hangs up: the process is stayed in background but never returns. It never goes ahead for the next commands. What could be the reason? [Code]

View 6 Replies

VS 2008 Process.waitforexit Is Hang Up When Running On Windows 2008?

Feb 4, 2012

I use the 'Process' object to run EXE from my application. It works fine when it run on Windows XP and 2003. When it run on Windows server 2008, it hangs up: the process is stayed in background but never returns. It never goes ahead for the next commands

View 2 Replies

VS 2008 - DataReader While Loop (Hang After Few Minutes)

Sep 9, 2009

How come my datareader looping at the while loop line it become totally no response and without error eventhough I got use the try catch error catching... it only will hang on after few minute... after few loop. Is it the data reader got time out limit?? If exceed the limit it will no response..? Inside my while loop it do a lot of transaction and each transaction also take quite long time... it will affect?

myCommand = New MySqlCommand("SELECT * FROM stk_cus_inv_hd WHERE DocType=?DocType;", conn1)
myCommand.Parameters.AddWithValue("?DocType", "CS")
myCommand.CommandTimeout = 99999
myReader = myCommand.ExecuteReader
While myreader.read <<---- it jam at here and totally no response my coding... but my interface is clickable...
my lot of work here...
End While

View 11 Replies

VS 2008 Application Hang - Can't Minimize Nor Move The Exe

Jun 7, 2012

i have develop an application which write to comport. what i am exp is application hang while writing to port i cant minimize nor move the exe. the better part is it does task successfully for what it is made for.

View 9 Replies

VS 2008 System.Net.Mail And Outlook Hang

Feb 9, 2010

I am using the System.Net.Mail namespace to create and send email messages. Everything was working fine until a couple of QC members of our team noticed something strange.

If they send emails from within my application and then leave the application open for a while (perhaps working on other tasks on the PC), when they try and activate my application again, it appears to be hung. The CPU is not pegged and everything appears to be normal in the task manager. We narrowed it down and it appears that this issue only manifests itself when MS Outlook is also opened and connected to a server.

I was playing around with process monitor, but nothing I saw was really glaring. I actually started deleting some threads on the PC and eventually my application became usable again.

View 6 Replies

VS 2008 PDA SerialPort?

Jun 23, 2010

I have wrote this program (for PDA), to connect a PDA to the PC via RS232.It only works half way.

If I send anything from the pda to the pc, I receive data correctly.If I send anything from the pc, then the pda hangs up.Can anybody tell me what I'm doing wrong?

Also, how do I make sure the port on PDA is closed when quitting the application?

[Code]...

View 1 Replies

VB 2008 On XP Exception With Serialport?

Mar 14, 2009

I am trying to access a printer via the serial port in VB Express 2008. I wrote a small prog with buttons on the form to exercise the escape codes in a Windows Vista 32 laptop with a USB to serial adapter. Only 3 codes worked, BEL, reset and a printer specific command. Also, when i try to receive data, it justs times out. So, I tried to move to a WinXP machine with real serial ports. The program now has an illegal argument exception and the message is to the effect that the name of the port for the property portName does not start with COM/com. Which is very puzzling because I did verify the portname and it is com1.Is this a known issue or am I doing something wrong? The form works on Vista but not in XP.

[Code]...

View 8 Replies

VS 2008 Using Serialport On 2 Different Forms?

Aug 25, 2009

I'm using one form to make contact with the serial port with the next

Imports System.IO.Ports
Imports Microsoft
Public Class Menu

[Code].....

View 2 Replies

VS 2008 - Warning - Serialport.encoding

Jul 7, 2009

My program has been running fine for months and still is, but I now have this warning, (which must have shown up since upgrading to VB2008 from 2005 a month ago).

It regards the serial port encoding setup and reads as follows -- serialport1.Encoding = encoding.GetEncoding(1252) 'for char > 127

Warning 1Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated. Perhaps there was an update on this with 2008 and it's now redundant or something?

View 4 Replies

VS 2008 IO.Serialport Does Not Receive Any Data

Apr 6, 2009

I want to use IO.ports.serialport to receive ASCII data from an instrument (A Luxmeter for those interested). So far, i've been unable to read any single byte from the instrument using the IO.ports.serialport.A terminal window shows the datastream just fine, and I've used MScommlib to read the data without problems. I just had other problems with the latter, so I thought I'd give this IO.ports.serialport a try.The code runs fine, no errors. It just doesn't receive anything.Bytestoread stays 0 forever.I distilled the code to it's bare essence. What am I missing? Is it something obvious, or did I completely misunderstand the whole concept? (Which is not unlikely..)I did check the obvious, of course: settings, baudrate, cable is connected, instrument is sending, etc.[code]

View 6 Replies

[2008] SerialPort Blue Screen?

Jan 22, 2009

I was attempting to clean up my serial port example that is in the code bank. I had decided to use a modem, thinking that a lot of computers still had them. By using the loopback feature of the modem I am able to simulate / emulate various features of the serial port.All was going well, and then I got a Blue Screen with this error after running for 10 minutes or so:DRIVER_IRQL_NOT_LESS_OR_EQUALSTOP 0x000000d1 etc.I then went back to using my GPS receiver, which sends messages constantly to a serial port. This test ran for several hours(4). It received messages correctly during the entire test.I then created a new, not as complex, version and it also receives the Blue Screen. I have made sure that the modem drivers are up to date, searched for the error, etc. My gut is telling me that it is the modem driver. I have attached the project. This is the scaled back version, but it uses the same functionality.

View 7 Replies

VS 2008 Creating Dynamic SerialPort Controls

May 31, 2009

I need to create some serial port controlls manually. My program reads through a config file, and it if comes across an entry called COMPORT then I need to create a contol to talk to this port. The entries in the ini file might be

COMPORT=COM1
COMPORT=COM3
COMPORT=COM7

So here is my problem! I'd like to create the variable control name with part of the com port number, so I can always refer back to it.
EG.

Dim strVar as sring = "COM1"
Dim CName+strVar As New System.IO.Ports.SerialPort

View 1 Replies

VS 2008 Get Response From Serialport To Update Property?

Feb 19, 2011

There is a problem in my project. It has a class with several properties. When I set the property, it send command to device through serialport. But the problem is when I get the property, it need to send request command to device, and device return value back. How can I update the property?

View 2 Replies

VS 2008 SerialPort Custom NewLine Character?

May 21, 2010

I have this sample code...

Private Sub DataReceived( _
ByVal sender As Object, _
ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) _

[code]....

this displays in a text box the received data from a serial port. And it works like a charm but the data received has custom start and end of line characters. A line begins with chr(&H2) and ends with chr(&H3). What i want is on the text box those characters to be hidden and the chr(&H3) to start a new line.

View 5 Replies

SerialPort Events Won't Fire On Windows Server 2008 Using .NET 2.0 Application

Jul 9, 2010

I have a program that reads data from a scanner via the serial port.This program works fine on Windows XP.We have a terminal server set up running Windows Server 2008.I run HyperTerminal on our test terminal, it connects and reads the scanner data fine through COM1.I run my app on that same test terminal and get nothing when I scan.My app connects to COM1 without errors and disconnects without errors.BUT, the DataRecieved event is NEVER getting fired.Neither is the ErrorReceived event.I have played with the Handshaking, with the RecievedBytesThreshhold and pretty much every setup setting I found.Set it up exactly like the settings on Hyperterminal.I have even tried starting a timer on a different thread to call ReadByte every second to try to KICK this thing into doing SOMETHING.Nothing has worked.

I have been trying to fix this for an entire day now.Added events to my class trying to see EVERYTHING that is going on. All I know is, it connects to the port and it disconnects from the port correctly but nothing happens in between.No data when I scan.No event fired at all between connecting to and disconnecting from the port.I have also downloaded other's simple serial communications applications.Nothing in .NET works.[code]

View 1 Replies

Hang/deadlock In MSJET40.dll?

Jan 17, 2012

I have a VB.NET GUI (VS2005) that calls into a VB6 DLL to query MSAccess 2003 databases using DAO 3.6. Yes, I know this is not an ideal scenario, but that's the way the current application is set up. Component Checker shows MDAC 2.8 SP1 is installed. This application usually runs for a long time on our customer's Windows XP SP3 system with no issues. Occasionally (read: after 11 minutes or 11 hours or days), we experience a hang in the application, such that it needs to be ended with task manager and restarted. According to crash dumps and one lucky capture within the debugger, all threads are waiting on objects/critical sections within ntdll.dll. My specific thread gets stuck there and comes from MSJet40.dll. In the crash dumps, most threads are stuck in NTWaitForSingleObject, RtlEnterCriticalSection, etc.

I've been troubleshooting this intermittent issue for months and am convinced this is a bug in MSJet40.dll. The version of the DLL is 4.0.9511 and I see there is a hotfix for 4.0.9514 on XP SP3 outlined in: =[URL] I would like to get this hotfix to see if it fixes the issue and speak with MS if it doesn't. I have crash dumps and procmon traces of these events. This sounds very similar to the dreaded "Jet Bug" that shows up on a Google, supposedly fixed for Windows 2003 Server SP1, but I see no mention of it on Windows XP SP3.

View 7 Replies

[2005] Hang Application?

Feb 5, 2009

I am using Background Worker control to cancel internal operation.I am populating data in to datagridview and written this entire code in Do_Work event of Background Worker .But when my number of rows are greater thansize of datagridview that time my application is hang.Number of row always greater than 50.

View 1 Replies

Application Form HANG B/w Loop

Sep 4, 2009

I am made program to get Picture Pixel and check Pixel colors.

between looping my Application Form HANG (STOP) and also how can stop loop between working (on Run time)?

in listbox1 picture List with path
For P = 0 To ListBox1.Items.Count - 1
DisplayPic.Image = System.Drawing.Image.FromFile(ListBox1.Items.Item(P))
Call GetPicPixel()

[Code].....

View 1 Replies

Application Get Hang After Download Log Complete?

Feb 17, 2010

My application get hang after i download log from hardware unit.Basically hardware protocol is custom design(no modbus).there are huge number of records(minimum 1000) which i have to show in grid at the time of download process takes place i add new rows into grid to show record function works on but after function execution over application gets hang. No process is pending after that function.

Private Sub manikPro_DownloadDataReceive(ByVal packet As String) Handles manikPro.DownloadDataReceive
Dim str As String = ""

[code].....

View 1 Replies

Backgroundworker Thread Causing UI To Hang?

Aug 29, 2010

I have a background worker that's checking the status of four services on a remote server.This is setup on a timer (5 Seconds) as below. For some reason it's hanging the UI thread causing the application to 'lock' for a second each tick, I cannot work out why?!

Private Sub ServiceTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ServiceTimer.Tick
_ServiceBGWorker = New System.ComponentModel.BackgroundWorker()

[code]......

View 2 Replies

Coding Makes Application Hang

Apr 9, 2012

I have some coding which basically edits my text file and removes the duplicates. For some reason when I run it, it hangs my application for like 10 seconds - the coding does work just hangs my application..[code]

View 8 Replies

Form Hang On Search Operation

Sep 11, 2009

I m make search file project. In This Project I Search All File From Drive. ( *.* )When i Press Button For Search, Its Still Hand For Few Seconds Or Minutes When Search Completed its Normal. 1. How to Resolve its Hanging. 2. Can I Add Progress-bar For This Action. [Code]

View 15 Replies

FtpWebRequest.GetRequestStream Hang Up And Fails?

Jul 30, 2011

I have wrote a web service, in a nutshell it uses openpop to get email messages does stuff with the content to insert into databases and saves attachments which are images. That works fine when i save images locally, it does exactley what it is suppose to. Now an added requirment was to save images to an FTP directory, so i can create my folders dynamically (they are created based upon timestamp) and that works well. My problem comes from when i try to save them to the ftp. Yes my user name and password are correct,otherwise i wouldn't be creating the directory.

Private Sub UploadFile(ByVal fileToSave As FileInfo, ByVal path As String)
Dim UploadRequest As FtpWebRequest = DirectCast(WebRequest.Create("ftp://UserName:Passowrd@999.99.999.9" & path),

[code].....

View 1 Replies

How To Programatically Check If An Application Has Hang

Mar 22, 2012

I need to write a monitoring/watchdog program to check a series of application..The monitoring program should be able to Determine whether the applications it is monitoring has hang or no response If it hangs, restart the specific application.What sort of API in VB.NET can help me achieve this?

View 2 Replies

Progress Bar Makes Program Hang?

Sep 4, 2011

Try
OleDbConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\list.mdb")
OleDbConn.Open()

[code]......

View 5 Replies

Visual Studio To Hang While Debugging?

May 23, 2009

I have a vb.net project which sometimes, when running in the IDE, suddenly hangs. Normally this wouldn't be a problem. Just hit 'pause', look at the currently running threads, and find the deadlock (or whatever else). But now I'm running into a situation where not only does the program hang, but trying to pause it causes visual studio itself to hang. In order to get control back, I have to kill the program-being-debugged's process, at which point visual studio comes back to life and says it was unable to pause execution. This is frustrating, because killing the process means the program state is lost (of course), so I don't know where the hang is.

View 4 Replies

Application Hang Whenever Plugs In A Thumb-drive

Oct 11, 2011

I have a client who is causing my software application to "hang" whenever he plugs in a thumb-drive and copies files. My software is using none of these files... can anyone hazard a guess at what's going on?

View 14 Replies

VS 2005 Hang Up When Clicking Any Component Or Toolbox

Aug 6, 2009

My Visual studio is hanging when I click any component or on toolbox.

View 3 Replies

VS 2005 Listview Hang Up While Loading Data On It?

Apr 27, 2009

i have a listview and everytime I load a 10,000 data my listview hang up. Is there any alternative on how to load data to listview that will not hang up.

View 10 Replies







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