1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Solved]Serial Port setup options

Discussion in 'GPIO Modules' started by DMc, Sep 6, 2015.

  1. DMc

    DMc New Member

    Joined:
    Aug 19, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Occupation:
    Engineer
    Location:
    USA
    We are converting our nodeJS application communicating with the Numato GPIO 8 over to a Chrome Packaged App using chrome.serial. This will allow us to deploy on Chromebooks. The nodeJS application is straightforward but a Chrome Packaged App will be better for Chromebooks. A Chrome Packaged App uses the chrome.serial API for serial communication. Using chrome.serial is not as easy to use as nodeJS serialport is. Does anyone have experience getting a Numato USB device talking via chrome.serial for a Chrome Packaged App?

    As a sanity check that the chrome.serial API works we tested beagle-term, which is a Chrome Packaged App that communicates via serial. Beagle-term sent and received data to/fr the Numato device without a problem. Any other Chrome Packaged App or code using chrome.serial does not receive data or only receives the command back. That goes for the app we are trying to write. We can see the port, open the port, and get a connectionID. When we send a command and then read the port we only get the command back. For example, when we send "ver\n" in the nodeJS application we have, we get back "ver\n\r0000008\n\r>". When using chrome.serial we only get back "ver\n" and the returned character count is 4, so we know we are not missing anything when parsing what is returned.

    Any insight to get chrome.serial to receive data from a Numato GPIO 8 is appreciated.
     
    Last edited: Sep 6, 2015
  2. admin

    admin Administrator Staff Member

    Joined:
    Jan 23, 2015
    Messages:
    169
    Likes Received:
    11
    Trophy Points:
    18
    Hi DMc,

    We have never tried using chrome.serial, in fact never knew such a thing existed until seeing your post here :)

    As far as the command/response are concerned, the actual transport mechanism (library) shouldn't really matter as long as the whole command reaches the device with correct termination character. I see that you are using "\n" in the command instead of "\r" which the correct termination character. Can you please try "ver\r" instead and let me know if that helped ?

    Thanks,
    Tom
     
  3. DMc

    DMc New Member

    Joined:
    Aug 19, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Occupation:
    Engineer
    Location:
    USA
    Tom, consider it solved! "\r" works in chrome.serial. I don't know why I used "\n" because we used "\r" for the nodejs application we wrote and as per you nodejs example. I guess I was just not paying attention when starting with chrome.serial. Converting the nodejs/socketIO,/serialport/webserver application to chrome.serial will be easy now that the "\r" hiccup is behind us.

    Thank you for your support.

    We have fairly detailed GUI web app running using your GPIO and Relay boards that we may deploy on all of our new equipment. If other customers need support on the software side for a browser GUI nodeJS or Chrome Packaged App, we understand it pretty well now and possibly could help.
     
  4. admin

    admin Administrator Staff Member

    Joined:
    Jan 23, 2015
    Messages:
    169
    Likes Received:
    11
    Trophy Points:
    18
    Hi DMc,

    Thanks for the update. Happy to hear that it is working fine now.

    Do you have a website to contact just in case we need to send somebody your way ?

    Thanks,
    Tom
     

Share This Page