Hi friends, now i am developing serial port communication in asp.net and c#. i need to read incoming data and evaluate that datas like incoming data : PNR 1234565. i got this string and evaluate it... can i get incoming data in char wise or read whole buffer
ata a time... which one is good.
Hello Suthakar ... no offense meant: yours is a bit of a strange question. Let me explain:
ASP.NET (MVC or WebForms) is for Internet and Intranet applications.
serial port communications are generally for talking to attached devices: modems, various hardware that can interface to a computer (example, a gasoline fuel pump's computer captures quantity and fuel card information that can be input and sent to an accounting
package).
So, I'm curious as to the nature of your application.
In answer to your question, it depends on the capabilities the device with which you happen to be communicating. You need to give the documentation for that device and then determine what you options are with it.
Example: likely most modern modems can send half duplex and full duplex. Which mode is better likely depends more on the nature of the developer's application than on the merits of half duplex versus full duplex.
Rule of thumb (general): if the developer needs to make decisions based on input line content, likely character input is preferred; OTOH, if the developer is processing
input records, likely line based input is preferred.
To better respond to your question, imo, you need to give us many more details. Sorry, your question is just way too general. You need to clarify it for the rest of us.
Regards,
Gerry (Lowry)
B-) Please help me by completing my school survey about computer programmers on my website. Thank you!!! Gerry Lowry +1 705-429-7550 wasaga beach, ontario, canada
Thanks for the reply sir, 1)i need to communicate with my Micro controller. 2) The MCU sends a byte at a time and i need to get that byte and process it. whenever a byte/data is transmitted from MCU, interrupt has to be generated in asp.net. i have got Data_received
event occurs in windows application... can u guide me for asp.net application.
i have got Data_received event occurs in windows application... can u guide me for asp.net application.
All you can do AFAIK is to store your data in your ASP.NET MVC Model until a user requests it by clicking a submit button.
Alternatively, your web page on your end user's computer could continuously request updates using Ajax.
Ajax example tutorial: #39 |
Iteration #7 – Add Ajax functionality View in
VB or C#
Regards,
Gerry (Lowry)
B-) Please help me by completing my school survey about computer programmers on my website. Thank you!!! Gerry Lowry +1 705-429-7550 wasaga beach, ontario, canada
i got serial port communication in windows application. but i need serial port communication in web application. i am developing asp.net appplication in my server side. i need to communicate with external GSM modem via serial port.
suthakar .... you can not have what you want per se.
you need a multi-tier architecture because the hardware that talks to the
external GSM modem via the serial port must be
physically connected to the external GSM modem.
Therefore:
(A)
external GSM modem<====>serial port[web_server] ...... Internet ..... [web_client]
(B)
external GSM modem<====>serial port[data_layer_computer]<====>[web_server] ...... Internet ..... [web_client]
(C)
external GSM modem<====>serial port[data_layer_computer] ..... Internet ..... [web_server] ...... Internet ..... [web_client]
<====> =. physical connection
....... =. TCP/IP connection
suthakar, please study the above three architectures. Remember,
physical devices without wireless connectivity
must be physically connected to whatever computer needs to communicate with the
physical device.
Gerry
B-) Please help me by completing my school survey about computer programmers on my website. Thank you!!! Gerry Lowry +1 705-429-7550 wasaga beach, ontario, canada
ok sir, i have connected my kit with my server via serial port. Asp webpage runs in a server only. i want receive or send data via serial port in server only. there is a SDK available for serial port communication. can i use it. is it safe for our project?
i am having 5 client systems and one server. all the system having wireless kit. all the clients sends the data to server via serial port. i want to collect and save the all the data in to server.
Now i am using ASP.net and C#.
but i need to get data from wireless kit via serial port in whole day. Is it possible to communicate. otherwise can i change the environment web application to windows...
If you want to purchase someone's SKD, it's probably safe ~~ I would ask them for references from their existing customers. You probably do not need an SDK from a third party.
Also, the manufacturer of your modem should have documentation to help you.
You have at least two options: do it yourself; hire a specialist.
Gerry
B-) Please help me by completing my school survey about computer programmers on my website. Thank you!!! Gerry Lowry +1 705-429-7550 wasaga beach, ontario, canada
Marked as answer by suthakar on Jun 29, 2009 07:55 AM
suthakar, in your previous post, you said the modem was connected directly to the server. I do not understand ...
TIMTOWTDI =. there is more than one way to do it
are your clients in the same room as your server?
a remote client computer can capture information from its serial port and then send it via FTP to the server.
TIMTOWTDI
???? are you trying to do something in real time?
???? is this simply aggregating data for reporting purposes?
I really do not understand what you are trying to achieve. That makes it difficult for anyone to answer your question.
Perhaps you can explain your design goals, your design constraints, and your physical architecture in more detail?
Gerry
B-) Please help me by completing my school survey about computer programmers on my website. Thank you!!! Gerry Lowry +1 705-429-7550 wasaga beach, ontario, canada
suthakar
Member
9 Points
31 Posts
Serial port communication in asp.net
Jun 22, 2009 07:58 AM|LINK
Serial port communication in asp.net
gerrylowry
All-Star
20513 Points
5712 Posts
Re: Serial port communication in asp.net
Jun 22, 2009 08:14 AM|LINK
Hello Suthakar ... no offense meant: yours is a bit of a strange question. Let me explain:
ASP.NET (MVC or WebForms) is for Internet and Intranet applications.
serial port communications are generally for talking to attached devices: modems, various hardware that can interface to a computer (example, a gasoline fuel pump's computer captures quantity and fuel card information that can be input and sent to an accounting package).
So, I'm curious as to the nature of your application.
In answer to your question, it depends on the capabilities the device with which you happen to be communicating. You need to give the documentation for that device and then determine what you options are with it.
Example: likely most modern modems can send half duplex and full duplex. Which mode is better likely depends more on the nature of the developer's application than on the merits of half duplex versus full duplex.
Rule of thumb (general): if the developer needs to make decisions based on input line content, likely character input is preferred; OTOH, if the developer is processing input records, likely line based input is preferred.
To better respond to your question, imo, you need to give us many more details. Sorry, your question is just way too general. You need to clarify it for the rest of us.
Regards,
Gerry (Lowry)
suthakar
Member
9 Points
31 Posts
Re: Serial port communication in asp.net
Jun 22, 2009 08:31 AM|LINK
gerrylowry
All-Star
20513 Points
5712 Posts
Re: Serial port communication in asp.net
Jun 22, 2009 12:45 PM|LINK
I do not see what this has to do with the ASP.NET paradigm.
I think you may be mixing ideas here. I'm not sure what you're trying to achieve.
Example:
ASP.NET MVC or WebForms
(a) a page request is received
(b) ASP.NET application displays that page and goes back to sleep
(c) GET or POST comes back from page displayed by (b)
(d) ASP.NET application responds appropriately and goes back to sleep.
et cetera
----------------------------------------
serial port processing
(i) local application starts and negotiates connectivity with serial port.
(ii) local application runs constantly, no sleeping, and continuously listens to serial port.
----------------------------------------
Here is what you should read to meet your serial port listening needs:
http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx
also: http://lmgtfy.com/?q=c%23+baud+port+even+stop+handshake+site%3Amsdn.microsoft.com
All you can do AFAIK is to store your data in your ASP.NET MVC Model until a user requests it by clicking a submit button.
Alternatively, your web page on your end user's computer could continuously request updates using Ajax.
Ajax example tutorial: #39 | Iteration #7 – Add Ajax functionality View in VB or C#
Regards,
Gerry (Lowry)
suthakar
Member
9 Points
31 Posts
Re: Serial port communication in asp.net
Jun 23, 2009 07:24 AM|LINK
thanks for the mail sir,
i got serial port communication in windows application. but i need serial port communication in web application. i am developing asp.net appplication in my server side. i need to communicate with external GSM modem via serial port.
gerrylowry
All-Star
20513 Points
5712 Posts
Re: Serial port communication in asp.net
Jun 25, 2009 05:28 PM|LINK
suthakar .... you can not have what you want per se.
you need a multi-tier architecture because the hardware that talks to the external GSM modem via the serial port must be physically connected to the external GSM modem.
Therefore:
(A)
external GSM modem<====>serial port[web_server] ...... Internet ..... [web_client]
(B)
external GSM modem<====>serial port[data_layer_computer]<====>[web_server] ...... Internet ..... [web_client]
(C)
external GSM modem<====>serial port[data_layer_computer] ..... Internet ..... [web_server] ...... Internet ..... [web_client]
<====> =. physical connection
....... =. TCP/IP connection
suthakar, please study the above three architectures. Remember, physical devices without wireless connectivity must be physically connected to whatever computer needs to communicate with the physical device.
Gerry
suthakar
Member
9 Points
31 Posts
Re: Serial port communication in asp.net
Jun 26, 2009 04:58 AM|LINK
ok sir, i have connected my kit with my server via serial port. Asp webpage runs in a server only. i want receive or send data via serial port in server only. there is a SDK available for serial port communication. can i use it. is it safe for our project?
asp .net ... c# serial port communication
suthakar
Member
9 Points
31 Posts
Re: Serial port communication in asp.net
Jun 26, 2009 05:05 AM|LINK
i am having 5 client systems and one server. all the system having wireless kit. all the clients sends the data to server via serial port. i want to collect and save the all the data in to server.
Now i am using ASP.net and C#.
but i need to get data from wireless kit via serial port in whole day. Is it possible to communicate. otherwise can i change the environment web application to windows...
gerrylowry
All-Star
20513 Points
5712 Posts
Re: Serial port communication in asp.net
Jun 26, 2009 11:40 AM|LINK
suthakar, you are talking about architecture (A) ...
(A)
external GSM modem<====>serial port[web_server] ...... Internet ..... [web_client]
Earlier in this thread, I showed you what to check out:
Here is what you should read to meet your serial port listening needs:
http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx
also: http://lmgtfy.com/?q=c%23+baud+port+even+stop+handshake+site%3Amsdn.microsoft.com
If you want to purchase someone's SKD, it's probably safe ~~ I would ask them for references from their existing customers. You probably do not need an SDK from a third party.
Also, the manufacturer of your modem should have documentation to help you.
You have at least two options: do it yourself; hire a specialist.
Gerry
gerrylowry
All-Star
20513 Points
5712 Posts
Re: Serial port communication in asp.net
Jun 26, 2009 11:47 AM|LINK
suthakar, in your previous post, you said the modem was connected directly to the server. I do not understand ...
TIMTOWTDI =. there is more than one way to do it
are your clients in the same room as your server?
a remote client computer can capture information from its serial port and then send it via FTP to the server.
TIMTOWTDI
???? are you trying to do something in real time?
???? is this simply aggregating data for reporting purposes?
I really do not understand what you are trying to achieve. That makes it difficult for anyone to answer your question.
Perhaps you can explain your design goals, your design constraints, and your physical architecture in more detail?
Gerry