|
hi,
i wrote an application that sends and receives data via serial port.
when i am connected via the PC real serial port(COM1) everything works fine.
when i connect a USB serail port and try to work with it only short messages work ok. but if i have big messages it doesn't work properlly.
my usb device is ok (i have an old application in MFC that work fine with the USB serial, sending and receiving big packets)
can anyone tell me what could be the reason for it and how can i fix it?
thanks,
Samy
|
|
|
|
|
Probably your COM port settings. Make sure they are the same as the MFC app. Also check any additional settings.
|
|
|
|
|
samy100 wrote: if i have big messages it doesn't work properlly.
I am curious, I have been using USB-to-RS232C on many occasions, never had any trouble (but
always have short messages, i.e. less than 100 chars)
What is big? at what length does it start to fail?
and what is your baudrate?
You are aware timing is different? the serial data (actual data and control line status) gets
grouped and packetized to make USB transport efficient. So if your code contains some delays,
you may have to increase them a bit.
BTW: not really a C# issue, is it?
|
|
|
|
|
Hi,
Have been developing web app using c# and asp.net.
I intend venturing into Client/Server Programming.
Can anyone direct me to where i can get e-books to start? preferably free e-books.
Thanks in anticipation.
|
|
|
|
|
Hi! i´am not an advance programmer but i can give you a little aid.
For a chat app, database? You can search it here you have lots of articles.
keywords:
manage threads (very important)
asynchronous connection = non blocking
sockets
good luck
|
|
|
|
|
Hi guys,
Im about to start development on a countdown timer that will display the time left for a particular product.
the format will be like this - 00:00:11.
I have been watching the AJAX video tutorials so im thinking of approaching this by setting an updatePannel with a timer with a tick event every 1000ms. Inside the updatePannel i could have a label that is attached to a C# method that contains the countdown logic
2 questions...
1: is this a good way forward or not.
2: can anyone suggest data time classes/methods that i will find useful so for example an admin can enter a start date and an end date and the timer will show the days, hours, minutes and seconds remaining.
the site im trying to emulate is this http://www.telebid.com/ looks like they have AJAX countdown timers too.
thank you for your help
Truegilly
|
|
|
|
|
truegilly wrote: AJAX
Head off to ASP.NET forum then...
|
|
|
|
|
Can't you use pure javascript for this? That will be lot better I think.
If you want to use C# for this, the TimeSpan class and it's properties will be useful.
|
|
|
|
|
hi freind i create a configurator that is use to Update Our Product.
now i want to update my configurator when new update arrived how i can do this without using (ClickOnce Deployment)
wasim khan
|
|
|
|
|
Hi, Wasin
Put another post with your code and explain what you want, maybe some advanced programmer can help you there!
Good Luck
|
|
|
|
|
What are the differences between the following events, and which should be used when?
Activated<br />
Load<br />
Shown<br />
Validated
Let's say that you want to perform some actions (run SQL, copy files, etc.) when a form appears, but with no user interaction. In which event handler do you place your code? Thanks.
|
|
|
|
|
i will do it in Load Event
wasim khan
|
|
|
|
|
I usually use "load" or "click" event to trigger it.
|
|
|
|
|
this function run when the DataArrival event is fired,
but the w1.GetData is not working, and the code never arraive to
"data = (String)dat" part ( no exception)
void w1_DataArrival(int Len)
{
String data = "";
dat = new object()data;
len = (object)Len;
w1.GetData(ref dat, dat, len);
data = (String)dat;
}
|
|
|
|
|
onakar wrote:
void w1_DataArrival(int Len)
{
String data = "";
dat = new object()data;
len = (object)Len;
w1.GetData(ref dat, dat, len);
data = (String)dat;
}
WTF?
|
|
|
|
|
|
Have a look at the documentation for the Array[^] class.
|
|
|
|
|
THANKS
Have Fun
Never forget it
|
|
|
|
|
Array.Copy(array1, 7, array2, 0, 18);
Dave
|
|
|
|
|
|
This is the second question today about something that can easily be found in the documentation or on the web (search for "c# format binary string" and "c# copy part of array" to get the solutions as the first hit). You really should learn how to use google and MSDN Library, and save your forum posts until you need them.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
System.Buffer.BlockCopy()
|
|
|
|
|
In my application I have hooked the keyboard.Global hooked and in one function im getting a error saying..
“Attempted to read or write protected memory. This is often an indication that other memory is corrupt.”
It comes from this code statement,
return CallNextHookEx(hookID, nCode, wParam, ref lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode,
IntPtr wParam, ref KBDLLHOOKSTRUCT lParam);
This cause to carshed my application. And Can U explain to overcome this issue.
|
|
|
|
|
ASysSolvers wrote: This cause to carshed my application. And Can U explain to overcome this issue.
Yes, you are having a buffer overflow/overrun in your unmanaged code.
|
|
|
|