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

serialport.list returns no data #442

Closed
24X7 opened this issue Jan 16, 2015 · 17 comments
Closed

serialport.list returns no data #442

24X7 opened this issue Jan 16, 2015 · 17 comments

Comments

@24X7
Copy link

24X7 commented Jan 16, 2015

I have a MacBook Pro running windows bootcamp (does not seem to be the issue though) and it is not able to list any of the ports nor connect. Am I missing something?

@reconbot
Copy link
Member

Can you give us some sample code? What version of node are you running? And lastly, What does the serialportlist command output? (you might have to find it in your node-modules/bin directory)

@24X7
Copy link
Author

24X7 commented Jan 16, 2015

Yeah... pretty simple... The array printed is empty. "[]"

require('serialport').list(function (err, results)
{
if (err)
{
throw err;
}

console.log(results);

});

@reconbot
Copy link
Member

The version of node, and the version of windows?

@24X7
Copy link
Author

24X7 commented Jan 16, 2015

Node is 0.10.32 and windows is 8.1. Note I do not have the issue on OSX.

Sent from my iPhone

On Jan 16, 2015, at 12:35 PM, Francis Gulotta notifications@github.com wrote:

The version of node, and the version of windows?


Reply to this email directly or view it on GitHub.

@Alex-Werner
Copy link

I have the same issues on windows 8.1 with Node 0.10.32

@voodootikigod
Copy link
Collaborator

Have you installed the FTDI drivers

On Monday, January 19, 2015, Alex W notifications@github.com wrote:

I have the same issues on windows 8.1 with Node 0.10.32


Reply to this email directly or view it on GitHub
#442 (comment)
.

Chris Williams

@voodootikigod http://twitter.com/voodootikigod | GitHub
http://github.com/voodootikigod

Maker of Improbable Things: JSConf http://jsconf.com/ | RobotsConf
http://robotsconf.com/ | Beer.js http://beerjs.com | Logo.js
https://github.com/voodootikigod/logo.js | node-serialport
http://nodebots.io/

@24X7
Copy link
Author

24X7 commented Jan 20, 2015

So I have drivers for the devices installed. I did not however install anything from the FTDrivers site. Is this required if you already have drivers installed?

@reconbot
Copy link
Member

Can anything see the com port?
On Jan 20, 2015 11:16 AM, "24X7" notifications@github.com wrote:

So I have drivers for the devices installed. I did not however install
anything from the FTDrivers site. Is this required if you already have
drivers installed?


Reply to this email directly or view it on GitHub
#442 (comment)
.

@haydockjp
Copy link

I am seeing the same thing on TurnKey Linux 12.0 / Debian 6.0.10 Squeeze. I did noticed is that in "serialport.js" Line: 658. The default (for my platform) is "listUnix". My "process.platform" equates to "Linux".

Looking at "listUnix" line 510 and 525, '/dev/serial/by-id' is used. It doesn't look like that is used on (at least my version of) Linux. It looks like it separates out the device types.

find /dev -name "by-id"
/dev/v4l/by-id
/dev/snd/by-id
/dev/disk/by-id

For reference:

uname -a
Linux nodejs 2.6.32-5-686 #1 SMP Tue May 13 16:33:32 UTC 2014 i686 GNU/Linux

node -v
v0.10.2

@reconbot
Copy link
Member

@24X7 can you run node -e 'console.log(process.platform)'

@haydockjp
Copy link

node -e 'console.log(process.platform)'
linux

@haydockjp
Copy link

I also get the same on my raspberry pi

uname -a
Linux raspberrypi 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l GNU/Linux

node -e 'console.log(process.platform)'
linux

@reconbot
Copy link
Member

@haydockjp you probably have a similar but different issue then @24X7

@haydockjp
Copy link

Sorry, I think I should be watching #343

@jacobrosenthal
Copy link
Contributor

Closed with no response from original poster

@rshirodkar
Copy link

rshirodkar commented Feb 17, 2017

I have this same issue on windows 7, with node version 6.9.5 and serialport v4.0.7,
I cannot list any ports on the machine. I can see the COM4 port in Devicemanager on Win7.

_

`var SerialPort = require("serialport");
var util = require("util"), repl = require("repl");

SerialPort.list(function (err, ports) {
ports.forEach(function(port) {
console.log(port.comName);
console.log(port.pnpId);
console.log(port.manufacturer);
});
});

var serial_port = new SerialPort("COM4", {baudrate: 57600});

console.log("Writing '*IDN?' to the serial port");
serial_port.write("*IDN?\r");

serial_port.on("data", function (data) {
console.log("here: "+data);
})
serial_port.on("error", function (msg) {
console.log("error: "+msg);
})

serial_port.close();`

_

Also I tried with the following code

`var Serialport = require("serialport");

var Serialport = new serialport("COM4", {
baudrate : 57600,
startbits : 1,
stopbits : 1,
parity : "none",
parser: Serialport.parsers.readline("\n")
});

Serialport.list(function (err, results) {
if (err) {
throw err;
}

for (var i = 0; i < results.length; i++) {
var item = results[i];
console.log('{comName,-15} {pnpId,-20} {manufacturer}', item);
}
});`

And finally tried to run the (node serialport-list.js) directly from the bin . It never shows anything.

Can someone please help me ?

@reconbot
Copy link
Member

Can you open a new issue and fill out the template? serialport-list is a good indicator if your install and setup are working correctly.

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

7 participants