mulderp / mulderp.github.com

blog
1 stars 0 forks source link

HTML5, PHP and JS communication with serial usb device #21

Open pmfooks opened 7 years ago

pmfooks commented 7 years ago

I have a standard PHP program that uses Javascript running on a Windows 10 Pc. I want to get serial device (Ohaus scale) data and send requests to the scale. I have seen a lot of discussions about various techniques using Python, VB, C++, Arduinos etc. Even using an Excel spreadsheet to communicate with the serial port. There appears to be many ways to communicate with a serial device but all paths I take yield no results. Given my environment what path would you recommend. I don't mind using yet another language if it will yield results. What do you recommend?

mulderp commented 7 years ago

hi, in Windows the device mgr shows the status of a serial port offen incl connection parameters (comport + baudrate possibly) with that info try to send/receive bytes with a serial terminal EG. hterm once you See bytes in the terminal Programm let me know Le 12 avr. 2017 6:04 PM, "pmfooks" notifications@github.com a écrit :

I have a standard PHP program that uses Javascript running on a Windows 10 Pc. I want to get serial device (Ohaus scale) data and send requests to the scale. I have seen a lot of discussions about various techniques using Python, VB, C++, Arduinos etc. Even using an Excel spreadsheet to communicate with the serial port. There appears to be many ways to communicate with a serial device but all paths I take yield no results. Given my environment what path would you recommend. I don't mind using yet another language if it will yield results. What do you recommend?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mulderp/mulderp.github.com/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/AANdkBqKWQ13pZuq3R0VUmHcWOozQhEcks5rvPX6gaJpZM4M7onE .

pmfooks commented 7 years ago

Hello again Patrick,

in Windows the device mgr shows the status of a serial port offen incl connection parameters (comport + baudrate possibly)

My device mgr for COM3: [image: Inline image 1] You say:

with that info try to send/receive bytes with a serial terminal EG. hterm once you See bytes in the terminal Programm let me know

but when I put weight on the scale nothing changes in Device Manager. You say with "a serial EG hterm" - what does that mean? Pete

On Wed, Apr 12, 2017 at 10:36 AM, Patrick Mulder notifications@github.com wrote:

hi, in Windows the device mgr shows the status of a serial port offen incl connection parameters (comport + baudrate possibly) with that info try to send/receive bytes with a serial terminal EG. hterm once you See bytes in the terminal Programm let me know Le 12 avr. 2017 6:04 PM, "pmfooks" notifications@github.com a écrit :

I have a standard PHP program that uses Javascript running on a Windows 10 Pc. I want to get serial device (Ohaus scale) data and send requests to the scale. I have seen a lot of discussions about various techniques using Python, VB, C++, Arduinos etc. Even using an Excel spreadsheet to communicate with the serial port. There appears to be many ways to communicate with a serial device but all paths I take yield no results. Given my environment what path would you recommend. I don't mind using yet another language if it will yield results. What do you recommend?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mulderp/mulderp.github.com/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/ AANdkBqKWQ13pZuq3R0VUmHcWOozQhEcks5rvPX6gaJpZM4M7onE .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mulderp/mulderp.github.com/issues/21#issuecomment-293652799, or mute the thread https://github.com/notifications/unsubscribe-auth/AaDZ7GRgnIUaiJkWw5ksJN8G2HzrC6Rzks5rvQupgaJpZM4M7onE .

pmfooks commented 7 years ago

In your article http://thinkingonthinking.com/serial-communication-with-nodejs/ you say

Let’s create a fresh JavaScript project and add this module to it:

$ npm install --save-dev serialport

I am familiar with the command "npm install . . ." but what is "$ npm install" ? Is that Jquery? What module do you mean?

Pete

On Wed, Apr 12, 2017 at 8:22 PM, Peter Fooks pmfooks@gmail.com wrote:

Hello again Patrick,

in Windows the device mgr shows the status of a serial port offen incl connection parameters (comport + baudrate possibly)

My device mgr for COM3: [image: Inline image 1] You say:

with that info try to send/receive bytes with a serial terminal EG. hterm once you See bytes in the terminal Programm let me know

but when I put weight on the scale nothing changes in Device Manager. You say with "a serial EG hterm" - what does that mean? Pete

On Wed, Apr 12, 2017 at 10:36 AM, Patrick Mulder <notifications@github.com

wrote:

hi, in Windows the device mgr shows the status of a serial port offen incl connection parameters (comport + baudrate possibly) with that info try to send/receive bytes with a serial terminal EG. hterm once you See bytes in the terminal Programm let me know Le 12 avr. 2017 6:04 PM, "pmfooks" notifications@github.com a écrit :

I have a standard PHP program that uses Javascript running on a Windows 10 Pc. I want to get serial device (Ohaus scale) data and send requests to the scale. I have seen a lot of discussions about various techniques using Python, VB, C++, Arduinos etc. Even using an Excel spreadsheet to communicate with the serial port. There appears to be many ways to communicate with a serial device but all paths I take yield no results. Given my environment what path would you recommend. I don't mind using yet another language if it will yield results. What do you recommend?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mulderp/mulderp.github.com/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/AANdkBqKW Q13pZuq3R0VUmHcWOozQhEcks5rvPX6gaJpZM4M7onE .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mulderp/mulderp.github.com/issues/21#issuecomment-293652799, or mute the thread https://github.com/notifications/unsubscribe-auth/AaDZ7GRgnIUaiJkWw5ksJN8G2HzrC6Rzks5rvQupgaJpZM4M7onE .

mulderp commented 7 years ago

hterm is a free Software on Windows.

$ means command line prompt Le 13 avr. 2017 05:29, "pmfooks" notifications@github.com a écrit :

In your article http://thinkingonthinking.com/serial-communication-with-nodejs/ you say

Let’s create a fresh JavaScript project and add this module to it:

$ npm install --save-dev serialport

I am familiar with the command "npm install . . ." but what is "$ npm install" ? Is that Jquery? What module do you mean?

Pete

On Wed, Apr 12, 2017 at 8:22 PM, Peter Fooks pmfooks@gmail.com wrote:

Hello again Patrick,

in Windows the device mgr shows the status of a serial port offen incl connection parameters (comport + baudrate possibly)

My device mgr for COM3: [image: Inline image 1] You say:

with that info try to send/receive bytes with a serial terminal EG. hterm once you See bytes in the terminal Programm let me know

but when I put weight on the scale nothing changes in Device Manager. You say with "a serial EG hterm" - what does that mean? Pete

On Wed, Apr 12, 2017 at 10:36 AM, Patrick Mulder < notifications@github.com

wrote:

hi, in Windows the device mgr shows the status of a serial port offen incl connection parameters (comport + baudrate possibly) with that info try to send/receive bytes with a serial terminal EG. hterm once you See bytes in the terminal Programm let me know Le 12 avr. 2017 6:04 PM, "pmfooks" notifications@github.com a écrit :

I have a standard PHP program that uses Javascript running on a Windows 10 Pc. I want to get serial device (Ohaus scale) data and send requests to the scale. I have seen a lot of discussions about various techniques using Python, VB, C++, Arduinos etc. Even using an Excel spreadsheet to communicate with the serial port. There appears to be many ways to communicate with a serial device but all paths I take yield no results. Given my environment what path would you recommend. I don't mind using yet another language if it will yield results. What do you recommend?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mulderp/mulderp.github.com/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/AANdkBqKW Q13pZuq3R0VUmHcWOozQhEcks5rvPX6gaJpZM4M7onE .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mulderp/mulderp.github.com/issues/21# issuecomment-293652799, or mute the thread https://github.com/notifications/unsubscribe-auth/ AaDZ7GRgnIUaiJkWw5ksJN8G2HzrC6Rzks5rvQupgaJpZM4M7onE .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mulderp/mulderp.github.com/issues/21#issuecomment-293769355, or mute the thread https://github.com/notifications/unsubscribe-auth/AANdkKslaasthSXzLnBt-CkXAZPOLbGUks5rvZZ9gaJpZM4M7onE .