Announcement

Collapse
No announcement yet.

How to communicate with com ports

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    Fast answer:
    You can't.

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

    What are you trying to achieve?
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      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 ?

      Comment


      • #4
        Originally posted by dagathos View Post
        Is possible to include the code to my project ?
        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
        ************************************************** ********
        We are Developing your Future Business Requirement right now with Scriptcase.
        www.sri.com.au & www.madikonda.com

        Comment


        • #5
          It depends on where your scriptcase runs also. Under linux you can do that like the code I found here: http://stackoverflow.com/questions/1...n-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/...port-using-php
          And under windows: http://stackoverflow.com/questions/6...php-on-windows

          Comment


          • #6
            Originally posted by rr View Post
            It depends on where your scriptcase runs also. Under linux you can do that like the code I found here: http://stackoverflow.com/questions/1...n-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/...port-using-php
            And under windows: http://stackoverflow.com/questions/6...php-on-windows
            But all of this is server side, not client side
            /Giuseppe

            Professional Scriptcase Services
            Some Customers opinions

            Comment


            • #7
              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/3...t-in-a-webpage
              Last edited by rr; 07-24-2015, 09:05 AM.

              Comment


              • #8
                This is how we done to communicate with client-side devices. With our Patent-Pending PrinterManager Service
                /Giuseppe

                Professional Scriptcase Services
                Some Customers opinions

                Comment

                Working...
                X