Skip to content

Add status.dtr to modemBitsCallback #1481

@AgileDog

Description

@AgileDog
  • SerialPort Version: 6.1.0

  • NodeJS Version: 8.9.3

  • Operating System and Hardware Platform: Windows 7 64 bit, Dell Precision T3500

  • Have you checked the right version of the api docs?: yes

  • Are you having trouble installing and you checked the Installation Special Cases docs? No trouble installing

  • Are you using Electron and have you checked the Electron Docs?: I don't know what this is.

Summary of Problem

I am attempting to retrieve the status of the DTR line (high or low). There does not appear to be a way to do this. I looked through the docs and the code itself. With .set you can set true/false for BRK, CTS, DSR, DTR and RTS. For .get you only can check CTS, DSR and DCD (You cannot set DCD with .set). I would like to be able to check the status of DTR using .get. If there is another method for doing so, that would suffice.

Steps and Code to Reproduce the Issue

This is just some test code, definitely not production code.
Note that DTR is set using .set
Then .get is used to retrieve settings. status will not contain information about DTR.

	var sbeSerialPort = new serialport(nameOfPort, configOfPort);
	sbeSerialPort.on('open', function ()
	{
		console.log("Connected to: ",sbeSerialPort.path);
		sbeSerialPort.set({dtr:false},function(){
			console.log('values set');
			sbeSerialPort.get(function(error, status){
				console.log('retrieved');
				console.log(error);
				console.log(status);
			});
		});
	});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions