• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

serial communication using applet

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have one strange problem, I have to do some serial port communication on remote machine.

so i am planning to develop some webstart application but i have one question that can i do this using applet (signed)???

any help is appreciated.

Jigar
 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jigar if I am not wrong then to read from serial port you require

(1)Java Comm jar
(2)Platform Proprietary supporting file (.dll for windows)

Hence it is not possible to achieve same using applet.

I don’t have idea about webstart, but if you are developing a web based application and client can come from heterogeneous platforms, I don’t see any solution.
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thx for reply,

you are saying correct that if i implement using comm api then i will loose platform portability.

but atleast i can start with.

and i have gone through comm api faqs on sun they have mention that we can communicate with serial port using signed applet.

Jigar
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am also searching for any other option if there is ???
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your application has to be web based only?

Are you open for client server model using Java?
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes my application is web-based and server is located at remote place.
Now i am suppose to give some solution for following.

There might be some equiment attached to some machine and they will post some data in computer which i have to read and push in to my application.
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My application is based on servlet,xsl,ejb and web services and i am using linux as deployment server.
Client will be limited most of the cases they will be windows machine
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jigar parekh:
Yes my application is web-based and server is located at remote place.
Now i am suppose to give some solution for following.

There might be some equiment attached to some machine and they will post some data in computer which i have to read and push in to my application.



What do you mean by "some equiment" ?

Is it digital certificate that you wanna read?
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry it was typo error
there might be some equipment attached computer and will post data through serial port.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no no i am asking which instrument is that?

do you need to read digital certificate from the port?
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i dont know what do you mean by digital certificate.
but the equipment will post some raw binary data to machine which i will need to push in to application
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jigar parekh:
i dont know what do you mean by digital certificate.
but the equipment will post some raw binary data to machine which i will need to push in to application



What is Digital Certificate

You application can by accessed by “anybody” using internet or only by those who have specific kind of device attached with their PC?

[ September 30, 2005: Message edited by: Chetan Parekh ]
[ September 30, 2005: Message edited by: Chetan Parekh ]
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
application is going to use by specific client but they are going to much more than this (ie posting data through serial port).

Thx
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First develop an application that read data from serial port, put it in jar, sign it and give it to the client. Tell him to put it JAVA_HOME\jre\lib\ext folder.

Include an applet in you web application that instantiate a class from the local jar and call a specific method that read binary data from port.

This should work for you!!
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thx for solution let me try this.

just one question why i will need to create jar and place it into ext folder of java.

can i transfer it with my applet jar ??

Jigar
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well using applet use can check that whether the needed jar/dll/sh files are there at specific location or not, if not then download it from server and copy at specific location.

Even you can register dll file in window registry using applet, hence you can transfer required dll file from server to client firs time when client accessing site and install all needed files there.
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chetan Parekh:
Well using applet use can check that whether the needed jar/dll/sh files are there at specific location or not, if not then download it from server and copy at specific location.

Even you can register dll file in window registry using applet, hence you can transfer required dll file from server to client firs time when client accessing site and install all needed files there.



Relly can we do these with applet !!
can u tell me how we can achive this ? if u know..
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See you need all required jar files in JAVA_HOME\jre\lib\ext folder. Using applet get JAVA_HOME value and using IO check whether required jars file are there or not in JAVA_HOME\jre\lib\ext. If no then using IO copy file from server to client.
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thx chetan,
Let me do it and let u know if i have any problem.

JigaR Parekh
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic