Giter Site home page Giter Site logo

garrows / browser-serialport Goto Github PK

View Code? Open in Web Editor NEW
205.0 205.0 73.0 726 KB

Robots in the browser. Just like node-serialport but for browser/chrome apps.

License: MIT License

Makefile 0.43% JavaScript 87.32% CSS 0.34% HTML 6.82% Arduino 5.09%

browser-serialport's People

Contributors

2fast2fourier avatar cotejp avatar garrows avatar jacobrosenthal avatar korynunn avatar monteslu avatar phated avatar soldair avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

browser-serialport's Issues

(bad patch) .. } else if (typeof fc === 'string'){

options.rtscts = _options.rtscts;

if (options.flowControl || options.flowcontrol) {
var fc = options.flowControl || options.flowcontrol;

if (typeof fc === 'boolean') {
  options.rtscts = true;
} else if (typeof fc === 'string'){
    var fcup = fc.toUpperCase();
    var idx = FLOWCONTROLS.indexOf(fcup);
    if (idx < 0) {
      var err = new Error('Invalid "flowControl": ' + fcup + '. Valid options: ' + FLOWCONTROLS.join(', '));
      callback(err);
      return false;
    } else {

      // "XON", "XOFF", "XANY", "DTRDTS", "RTSCTS"
      switch (idx) {
        case 0: 
			options.rtscts = true; 
		break;
      }
      return true;
    }
}else{
	
    var clean = fc.every(function (flowControl) {
    var fcup = flowControl.toUpperCase();
    var idx = FLOWCONTROLS.indexOf(fcup);
    if (idx < 0) {
      var err = new Error('Invalid "flowControl": ' + fcup + '. Valid options: ' + FLOWCONTROLS.join(', '));
      callback(err);
      return false;
    } else {

      // "XON", "XOFF", "XANY", "DTRDTS", "RTSCTS"
      switch (idx) {
        case 0: 
			options.rtscts = true; 
		break;
      }
      return true;
    }
  });
  if(!clean){
    return;
  }
}

}

close / disconnect events not firing in win32

I have an App with nwjs (0.15.3) that communicates to an Arduino board using browser-serialport.

When the usb cable is disconnected I get a disconnect and close event on mac64 and win64 platforms, but the same code on win32 platform does not receive any event when the cable is disconnected.

Is there any known incompatibility with win32? (or maybe I am missing something to make it work)

Thanks

Merge with node-serialport via bindings

Hi Folks,
I'm working towards getting our c++ bindings isolated enough that we could switch out serialport implementations in an easier way. This could include the chrome serialport object. I think this is something to talk about because I'm going to be releasing some breaking changes to serialport to improve it's api and it's silly to implement everything twice. I'm thinking maybe we could merge projects.

I've opened serialport/node-serialport#739 to explore the option.

Not finding "Serial Monitor" in Web Store on crouton

I can find "Serial Monitor" in Chrome OS and it runs fine.
But I can't find when I'm searching Web Store for "Serial Monitor" in crouton (https://github.com/dnschneid/crouton).
When I use link to it you have in README, I'm able to install it and it runs.
It doesn't allow opening serial port though. chrome.serial.open() returns -1 as connectionId. This looks like a crouton udev user permission issue as I am able to run "Serial Monitor" when I start Chrome as root.
I tried the latest Chrome Version 30.0.1599.114 (for Ubuntu 12.04, 32 bit).

Still, the question is why can't I find "Serial Monitor" in Web Store on crouton?

Timeouts when loading a program with stk500v1 protocol

Hi,

i'm trying to load an Arduino program, in a chrome extension with avrgirl-arduino, but when try to load a big program to an Arduino UNO modified board (mCore board), sometimes (or everytime ) give a timeout when loading an address on verify, or when its programming a page.

Load the same program to an original Arduino UNO always work, no problem, just on this board and just on chrome, if i use avrgirl-arduino on a NodeJS program, always work too.

You know the differences between the nodejs and chome.serial API that maybe, can origin the problem

Any help to debug it better will be appreciated.

Thanks!

The chrome extension code its here, we use avrgirl-arduino and add some code to create a serial monitor.

If you have a mCore board (with a common Arduino UNO always work ) you can test here:

http://beta-bitbloq.bq.com/

Login, and activate the "show under development board and robots" on profile account ( http://beta-bitbloq.bq.com/#/account )

Then go to create a new project, select the robot mBot, and create and load some programs.

Typings for TS?

Hi,

are there type definitions for TypeScript somewhere in the wild?
None found with npm install @types/browser-serialport

Bye,
Martin

supported by electron?

hello, is browser-serialport supported by electron?

I tried to use the package, but the list ports are null.

Maybe the trouble is permission.

Failure to connect to port

When I start my chrome app

  1. sometimes I get a failure to connect error
  2. and sometimes I get a malformed header error
    connection failure

Are there ways to intercept these errors? Or if I am not asking the question correctly, please tell me what information to provide?

Do I need to convert the module with browserify when use it in client end?

Hi @garrows , do I need to convert the module with browserify?
I convert the module firstly:
browserify index.js > browser-serialport.js
When I try to get the serialPort in the html, but there is error say cannot find:
<script src="require-2.2.0.js"></script>
<script src="browser-serialport.js"></script>
<script>
var SerialPort = require("browser-serialport").SerialPort;
</script>

Where is wrong?

Licence?

Hi Glen
Do you have any sort of licence on this? - or is it all just as is.
Best to stick some sort of open licence on it than nothing at all.
Thanks
Steve

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.