Click here to Skip to main content
15,904,500 members
Home / Discussions / C#
   

C#

 
GeneralRe: serial port programming in C# Pin
Dave Kreskowiak9-Sep-05 4:34
mveDave Kreskowiak9-Sep-05 4:34 
GeneralRe: serial port programming in C# Pin
Nadia Mughal9-Sep-05 5:54
Nadia Mughal9-Sep-05 5:54 
GeneralRe: serial port programming in C# Pin
Dario Solera9-Sep-05 7:50
Dario Solera9-Sep-05 7:50 
AnswerRe: serial port programming in C# Pin
enjoycrack9-Sep-05 0:04
enjoycrack9-Sep-05 0:04 
AnswerRe: serial port programming in C# Pin
pxp9-Sep-05 0:37
pxp9-Sep-05 0:37 
QuestionPrint Preview Urgent!!!!!!!! Pin
AB77718-Sep-05 23:08
AB77718-Sep-05 23:08 
QuestionRegarding MSHTML & AxWebBrower Pin
A.Grover8-Sep-05 22:51
A.Grover8-Sep-05 22:51 
AnswerRe: Regarding MSHTML & AxWebBrower Pin
John Fisher9-Sep-05 3:31
John Fisher9-Sep-05 3:31 
QuestionHow can i send a message across the internet? Pin
Anthony Mushrow8-Sep-05 22:14
professionalAnthony Mushrow8-Sep-05 22:14 
AnswerRe: How can i send a message across the internet? Pin
kin3tik8-Sep-05 23:22
kin3tik8-Sep-05 23:22 
QuestionPlace an ICON in a Datagrid cell Pin
Member 20458968-Sep-05 22:10
Member 20458968-Sep-05 22:10 
AnswerRe: Place an ICON in a Datagrid cell Pin
Lapje9-Sep-05 23:50
Lapje9-Sep-05 23:50 
QuestionSerialport - Wait until Device is ready Pin
pxp8-Sep-05 21:23
pxp8-Sep-05 21:23 
AnswerRe: Serialport - Wait until Device is ready Pin
Dave Kreskowiak9-Sep-05 2:29
mveDave Kreskowiak9-Sep-05 2:29 
GeneralRe: Serialport - Wait until Device is ready Pin
pxp9-Sep-05 4:55
pxp9-Sep-05 4:55 
GeneralRe: Serialport - Wait until Device is ready Pin
Dave Kreskowiak9-Sep-05 14:08
mveDave Kreskowiak9-Sep-05 14:08 
GeneralRe: Serialport - Wait until Device is ready Pin
pxp10-Sep-05 6:02
pxp10-Sep-05 6:02 
GeneralRe: Serialport - Wait until Device is ready Pin
Dave Kreskowiak10-Sep-05 9:00
mveDave Kreskowiak10-Sep-05 9:00 
GeneralRe: Serialport - Wait until Device is ready Pin
pxp10-Sep-05 15:10
pxp10-Sep-05 15:10 
In principle i have a small list of commands which i can send so it can gather the info i need, like a list of all available files on it and the possibility to retrieve a file.

It can also send data 'realtime' but if have not been able to collect that.
Something to do is to know if it 'preparing-data' or 'in-rest-mode'.
Could use threads,...let one wait if data is available,...not failsafe, some threads could never be triggered.

The problem is that stuff like 'end-of-transfer' is not available.

I was using something like:

<br />
if port.BytesToRead > 0 then add it to a string and later parse that string<br />


The problem with that logic is that it's not the way for this device. It works only when:

<br />
try<br />
{<br />
    for i = 0 to 999999<br />
    read byte and add it to cumulative string<br />
}<br />
catch<br />
{<br />
   // timeout occured or ehm,...somthing like that.<br />
   // Assuming no more data is available<br />
   // Could implement a [another] wait of 1000ms to be sure buffer is 100% empty...<br />
}<br />


...otherwise BytesToRead will be 0 at one time eventhough there should [and 1ms later] be more data available.

There is a commercial tool which can do the same as i do, however the tool is very user-unfriendly.



-- modified at 21:27 Saturday 10th September, 2005
GeneralRe: Serialport - Wait until Device is ready Pin
Dave Kreskowiak10-Sep-05 17:22
mveDave Kreskowiak10-Sep-05 17:22 
Questiondatagrid update and scrolling Pin
xrado8-Sep-05 21:21
xrado8-Sep-05 21:21 
QuestionTAB key problem in datagrid Pin
deep78-Sep-05 21:08
deep78-Sep-05 21:08 
AnswerRe: TAB key problem in datagrid Pin
Lapje9-Sep-05 23:52
Lapje9-Sep-05 23:52 
Questionregex problem Pin
Mridang Agarwalla8-Sep-05 19:24
Mridang Agarwalla8-Sep-05 19:24 
AnswerRe: regex problem Pin
Guffa8-Sep-05 23:32
Guffa8-Sep-05 23:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.