{"action":"created","issue":{"url":"https://api.github.com/repos/node-serialport/node-serialport/issues/1744","repository_url":"https://api.github.com/repos/node-serialport/node-serialport","labels_url":"https://api.github.com/repos/node-serialport/node-serialport/issues/1744/labels{/name}","comments_url":"https://api.github.com/repos/node-serialport/node-serialport/issues/1744/comments","events_url":"https://api.github.com/repos/node-serialport/node-serialport/issues/1744/events","html_url":"https://github.com/node-serialport/node-serialport/issues/1744","id":391610587,"node_id":"MDU6SXNzdWUzOTE2MTA1ODc=","number":1744,"title":"serialport does not work with Virtual COM on Windows ","user":{"login":"huydox","id":970592,"node_id":"MDQ6VXNlcjk3MDU5Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/970592?v=4","gravatar_id":"","url":"https://api.github.com/users/huydox","html_url":"https://github.com/huydox","followers_url":"https://api.github.com/users/huydox/followers","following_url":"https://api.github.com/users/huydox/following{/other_user}","gists_url":"https://api.github.com/users/huydox/gists{/gist_id}","starred_url":"https://api.github.com/users/huydox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huydox/subscriptions","organizations_url":"https://api.github.com/users/huydox/orgs","repos_url":"https://api.github.com/users/huydox/repos","events_url":"https://api.github.com/users/huydox/events{/privacy}","received_events_url":"https://api.github.com/users/huydox/received_events","type":"User","site_admin":false},"labels":[{"id":46026455,"node_id":"MDU6TGFiZWw0NjAyNjQ1NQ==","url":"https://api.github.com/repos/node-serialport/node-serialport/labels/support","name":"support","color":"fbca04","default":false},{"id":45378384,"node_id":"MDU6TGFiZWw0NTM3ODM4NA==","url":"https://api.github.com/repos/node-serialport/node-serialport/labels/windows","name":"windows","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-12-17T08:50:20Z","updated_at":"2018-12-19T14:37:23Z","closed_at":"2018-12-19T14:37:23Z","author_association":"NONE","body":"<!-- Having trouble installing? Be sure to check out the installation docs! https://serialport.io/docs/guide-installation -->\r\n\r\n### Summary of Problem\r\nI tried to get an example of reading data from COM port on Windows but no luck. There is no data emit on data event of serialport as well as parser.\r\n\r\n(Please answer all 3)\r\n\r\n- What are you trying to do?\r\nJust read data from serialport.\r\n- What happens?\r\nNo data got in data event of serialport or parser. \r\nIf I stop code as read function of library in debug mode, and make data available before continue, data will be emitted.\r\nAfter that, `end` event will be emit and no data can be receive after that.\r\n- What should have happened?\r\nI should get data whenever data come to my COM port\r\n### Code to Reproduce the Issue\r\n\r\n```js\r\nconst SerialPort = require('serialport');\r\nconst Readline = require('@serialport/parser-readline');\r\nconst port = new SerialPort('COM1', { \r\n    baudRate: 9600,\r\n    dataBits: 8,\r\n    parity: 'none',\r\n    stopBits: 1,\r\n    highWaterMark: 32,\r\n    hupcl: false\r\n});\r\n\r\nparser = port.pipe(new Readline({delimiter: '\\n', encoding:'utf8'}));\r\n\r\nparser.on('data', function(data){\r\n  console.log('parser data:', data);\r\n})\r\n\r\nport.on('data', data =>{\r\n  console.log('got word from arduino:', data);\r\n  console.log(data.toString());\r\n});\r\n\r\nport.on('error', (err) => {\r\n  console.log('port err', err);\r\n});\r\n\r\nport.on('close', () => {\r\n  console.log('port close');\r\n})\r\n\r\nport.on('end', () => {\r\n  console.log('port end');\r\n})\r\n\r\nport.on('open', function(){\r\n  console.log('port already open');\r\n})\r\n```\r\n### Output\r\n```\r\nserver>$env:DEBUG=\"*\";node .\\test.js\r\n  serialport/stream opened path: COM1 +3ms\r\nport already open\r\n  serialport/stream _read reading +0ms\r\n  serialport/binding-abstract read +13ms\r\n  serialport/stream binding.read finished +2ms\r\n  serialport/stream binding.read Zero bytes read closing readable stream +0ms\r\nport end\r\nserver>\r\n```\r\n### Versions, Operating System and Hardware\r\n\r\n- SerialPort@7.1\r\n- Node.js v8.12\r\n- Windows 10\r\n- Hardware and chipset: ATC-1200 (Ethernet to Serial Converter)\r\n"},"comment":{"url":"https://api.github.com/repos/node-serialport/node-serialport/issues/comments/448617585","html_url":"https://github.com/node-serialport/node-serialport/issues/1744#issuecomment-448617585","issue_url":"https://api.github.com/repos/node-serialport/node-serialport/issues/1744","id":448617585,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODYxNzU4NQ==","user":{"login":"HipsterBrown","id":3051193,"node_id":"MDQ6VXNlcjMwNTExOTM=","avatar_url":"https://avatars3.githubusercontent.com/u/3051193?v=4","gravatar_id":"","url":"https://api.github.com/users/HipsterBrown","html_url":"https://github.com/HipsterBrown","followers_url":"https://api.github.com/users/HipsterBrown/followers","following_url":"https://api.github.com/users/HipsterBrown/following{/other_user}","gists_url":"https://api.github.com/users/HipsterBrown/gists{/gist_id}","starred_url":"https://api.github.com/users/HipsterBrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HipsterBrown/subscriptions","organizations_url":"https://api.github.com/users/HipsterBrown/orgs","repos_url":"https://api.github.com/users/HipsterBrown/repos","events_url":"https://api.github.com/users/HipsterBrown/events{/privacy}","received_events_url":"https://api.github.com/users/HipsterBrown/received_events","type":"User","site_admin":false},"created_at":"2018-12-19T14:37:23Z","updated_at":"2018-12-19T14:37:23Z","author_association":"CONTRIBUTOR","body":"Thanks for the update, that's great to know. Happy building! 🎉 "}}
{"actor":{"display_login":"HipsterBrown"}}