How to communicate with com ports

Hi ,
i want to answer if it possible to communicate with com port in client site.

Has anyone try ?

Thank you.

Fast answer:
You can’t.

Long answer:
You can’t on an easy way.

What are you trying to achieve?

I try to create control form that read weight from a weight bridge

and then create a weight ticket.

i found some examples in .php
Is possible to include the code to my project ?

[QUOTE=dagathos;38896]
Is possible to include the code to my project ?[/QUOTE]

It is possible to include third party codes as libraries and then possible to use within the scriptcase applications.

also the new version 8.1 it is possible to use different type of readings by curl, web services, soap etc provided your weight bridge exposes its data in web service format.

Having said that i am also interested in understanding what you are trying to achieve. if you show me the links of the examples, then i may be able to check further

Anil

It depends on where your scriptcase runs also. Under linux you can do that like the code I found here: http://stackoverflow.com/questions/13114275/php-serial-port-data-return-from-arduino
I found a library here: https://github.com/Xowap/PHP-Serial
So there is enough info to get php to talk to a serial port.
But be aware whilst php is talking to a serial port that thread is busy. Meaning that the thread is slow. You can get a problem if you want to read with another thread as well.
So you would need to make a nice library that allows only one communication channel per port. So 2 ports? meaning only two threads can use it.

Also read: http://www.brainboxes.com/faq/items/how-do-i-control-a-serial-port-using-php
And under windows: http://stackoverflow.com/questions/627965/serial-comm-with-php-on-windows

[QUOTE=rr;38915]It depends on where your scriptcase runs also. Under linux you can do that like the code I found here: http://stackoverflow.com/questions/13114275/php-serial-port-data-return-from-arduino
I found a library here: https://github.com/Xowap/PHP-Serial
So there is enough info to get php to talk to a serial port.
But be aware whilst php is talking to a serial port that thread is busy. Meaning that the thread is slow. You can get a problem if you want to read with another thread as well.
So you would need to make a nice library that allows only one communication channel per port. So 2 ports? meaning only two threads can use it.

Also read: http://www.brainboxes.com/faq/items/how-do-i-control-a-serial-port-using-php
And under windows: http://stackoverflow.com/questions/627965/serial-comm-with-php-on-windows[/QUOTE]

But all of this is server side, not client side

Duh my bad I totally overread client side…
On the server side this is only VERY limitededly available. But that can only be done using something that breaks out of the browser environment (e.g. an ACTIVEX control or flash or so).

I found another: https://www.npmjs.com/package/browser-serialport
In chrome in a chrome packaged app. Hence if a packed app runs on the client you can communicate with the client to the server and vice versa with some smart jquery programming (or any other ajax thingy).

And in java: http://stackoverflow.com/questions/3310643/how-to-read-from-serial-port-in-a-webpage

This is how we done to communicate with client-side devices. With our Patent-Pending PrinterManager Service :cool: