Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serial Port H/W Issue #199

Open
johyeoncheol opened this issue Mar 5, 2024 · 5 comments
Open

Serial Port H/W Issue #199

johyeoncheol opened this issue Mar 5, 2024 · 5 comments

Comments

@johyeoncheol
Copy link

johyeoncheol commented Mar 5, 2024

HW Environment

Equipment: kiosks
OS: Window 7 Pro
Web Browser : Chrome
Scale: AND GF-4000 Series
Serial port communication in progress
( 9 Pin Serial Port - 25 Pin Serial Port )

  1. PortRequest fetched information about the port.
  2. Open the port.
  3. The value of the scale is well over.
  4. turn off the scale.
  5. turn on the scale
  6. The value of the scale does not exceed.

I have encountered this problem and am asking for your help. I really want to solve this problem. Please!

@reillyeon
Copy link
Collaborator

I don't understand what "The value of the scale is well over" and "The value of the scale does not exceed" mean. This sounds like an issue with the data returned by the scale, which is out of scope for this issue tracker. If you believe the scale is returning the correct data but Chrome is passing it to your application incorrectly please file an issue at crbug.com.

@johyeoncheol
Copy link
Author

I'm sorry. There's an error because I wrote it using a translator.

Data comes in port.readable.getReader().
But, when the hardware is powered off and turned on, data does not come in port.readable.getReader().

@reillyeon
Copy link
Collaborator

Are you using the RS-232 interface or the USB interface? When the hardware is powered off and powered back on a USB interface will disconnect and you will need to call navigator.serial.requestPort() or navigator.serial.getPorts() to get a new SerialPort object representing the new device connection. The RS-232 interface doesn't have this behavior.

@johyeoncheol
Copy link
Author

I'm using the RS-232C interface. I'm transferring data from scale to COM 2, and when I connect to COM 2 through navigator.serial.requestPort(), I was able to receive the data.

@reillyeon
Copy link
Collaborator

There may be an error when the scale is powered off or turned back on which would require you to call port.readable.getReader() again. For example, the scale may generate a "break" signal at power-on. Does your code handle errors returned by the reader and request a new reader on the new ReadableStream returned by port.readable in that case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants