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

NanoPiM1-UbuntuCore 16.04 LTS ARMV7L-USB port doesn't work #1105

Closed
projectxmaker opened this issue Feb 23, 2017 · 2 comments
Closed

NanoPiM1-UbuntuCore 16.04 LTS ARMV7L-USB port doesn't work #1105

projectxmaker opened this issue Feb 23, 2017 · 2 comments
Labels

Comments

@projectxmaker
Copy link

projectxmaker commented Feb 23, 2017

Summary of Problem

SerialPort doesn't receive or send data to /dev/ttyUSB0 port even though we can see the message send to this port via minicom.

plz check this image: https://goo.gl/pBElZE

  • left top terminal: is source code.
  • right top terminal: is running code.
  • bottom terminal: is minicom screen.

Steps and Code to Reproduce the Issue

  • step Issue #1: SerialPort package is installed completed with node-pre-gyp
    -- for global usage: sudo npm install -g serialport --unsafe-perm --build-from-source
    -- for test folder: npm install serialport --unsafe-perm --build-from-source

  • step variable 'me' is not defined in read() #2: create c.js

var SerialPort = require('serialport');
var port = new SerialPort('/dev/ttyUSB0',{baudRate:115200});

port.on('open', function() {
  port.write('main screen turn on', function(err) {
    if (err) {
      return console.log('Error on write: ', err.message);
    }
    console.log('message written');
  });
});

port.on('data', function (data) {
  console.log('Data: ' + data);
});

port.on('error', function(err) {
  console.log('Error: ', err.message);
});

don't know why, plz give me some glue.

thanks for any help!

@reconbot
Copy link
Member

This is a great bug report. I need to think on this a little bit. For the record, have you confirmed it doesn't work without minicom running?

@reconbot
Copy link
Member

I'm going to close this issue due to it's age, but if you'd like to continue with it feel free to comment and we'll reopen.

@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
Development

No branches or pull requests

2 participants