Commit graph

19 commits

Author SHA1 Message Date
Francis Gulotta
7a8b86fdb9
fix: update build tools and fix arm64 build for rpi (#111)
Two problems to fix with this one
- our rpi arm64 isn't working possibly because our libc is too new, so we'll target the lts of arm64, worked for [level](https://github.com/Level/classic-level/pull/71) thankful for [their investigation](https://github.com/Level/classic-level/issues/69)
- our arm64 builds were just broken and wouldn't build so we're fixing that with a variable in our binding.gyp for `openssl_fips`

When this is released it will hopefully fix https://github.com/serialport/node-serialport/issues/2438
2023-04-19 23:22:09 -04:00
Rob Moran
5eec7d1331
fix: Add universal binary support (#18) 2022-01-30 10:32:38 -05:00
Francis Gulotta
095b7c50be
chore: cleanup single package repository 2021-12-29 21:53:13 -05:00
Francis Gulotta
826545bd0a
chore: change to a monorepo structure with Lerna (#1586)
- move from istanbul to nyc and update coverage reporting
- global docs
- global linting
- global tests
2018-07-24 01:15:09 -04:00
Jade Bilkey
910438c2ca feat(linux): Custom baud rates for linux (eg 250k baudrate) (#1464)
* 250k baudrate now works
* Generic linux non-standard baudrate setting using termios2
* Tested successfully with an FTDI usb chip with the tx and rx pins bridged. Previous solution using the B38400 hack returned gibberish in same setup.
* Test for linux and win32 baudrate setting. Darwin stubbed out.

The arbitrary baud interface has been working on darwin up to this point so it's
likely that it works properly. The GetBaudRate extension should still get
written to be thorough but for now, this will let the CI tests pass properly and
still throw a warning about the check being disabled.

That is, of course, if anyone's testing with the arduino hardware on darwin,
otherwise, these tests never run anyway.
2018-02-05 09:33:11 -05:00
Francis Gulotta
4fc1404c8c [all] Unify the serialport.list output (#1266)
- [osx] remove the 0x from productID and locationId and vendorId
- [linux] remove the starting 0x from any values, small refactor
- [linux] Fixup output using the hex encoded fields
- [windows] Grab the serial number from the pnp id
- Isolate list functions to their own platform files (c++)
- Better ensure our serialports fields are present

closes #1220
2017-07-29 19:40:39 -04:00
Francis Gulotta
1888efc944 Ensure flushing doesn't cause a read error which closes the port 2017-07-09 21:25:02 -04:00
Francis Gulotta
6455ecbb51 [unix] New read/write subsystem (#1212)
This has always been the dream. Use `fs.read` and `fs.write` to do reading and writing. To make that happen I've created a cross platform `Poller` object that notifies us once on `readable` and `writable` states.

- Reduce large write cpu usage from 100% to 1-2%
- Replace ReadPoller with a multi purpose poller because you can only have a single uv_poll_t on a fd at a time because reasons
- Experimented with doing this all in c++, maybe there are gains to doing that but I'd never finish.
- Some unrelated eslint changes
- Arduino echo should just echo, writing random bytes was messing it up
- use a file to disable tests in envs
- read and write errors can trigger disconnects
- disconnect event only happens if there are listeners, otherwise error events will be triggered
- a disconnect during write will always have a write error too
- win32 bindings seem to only trigger disconnects on writes
2017-07-05 09:12:31 -04:00
Anton Litvinov
f24110b196
Refactoring of EIO_List for Windows: … (#1019)
* Refactoring of EIO_List for Windows:  …
1. use single API -- SetupAPI directly without COM-object
2. supply ResultItem with vendorId, productId and locationId (issue #877)
3. solve problem with pnpId not being returned on some systems
2016-11-27 22:09:24 -05:00
Francis Gulotta
39d0103937 Streams rewrite
This is a major change.  To reading, the poller and the bindings layer, there isn’t a great way to do this piecemeal. The goal here is to make bindings a plugin layer, our c++ bindings isolated and tested, and make Serialport a streams object.

- Move all bindings into platform specific modules DarwinBinding LinuxBinding, and WindowsBinding
- Separate out the bindings from the SerialPort class so it can be required by itself.
- Provide mock bindings as a tested first class bindings layer
- Mixin stream methods with `pushBindingWrap`, inspired from fs.readStream
- All integration tests now require an Arduino 
- Ditch sandboxed modules as we don't need to be that heavy handed to test anymore

TODO

- windows binding
- performance test
- memory leak test
- 🎉
2016-11-04 21:03:35 -04:00
Francis Gulotta
f0d7319149 Put all builds in /build/{Release,Debug}/ (#737)
* Put all builds in /build/{Release,Debug}/

Closes #736

* cleanup npm and git ignore
2016-04-07 13:22:03 -04:00
edgarsilva
1613243d0b Build, package and publish pre-compiled binary versions for serial port using node-pre-gyp
Add fallback to buil to node-pre-gyp install command, in case remote binary download fails.

Added travis automated binary build, to generate and pubslish the serialport packages.

Publish binaries adding `[publish binary]` to a commit message or by
adding a release tag.

Add travis automated build for x86 32 bit binaries.[publish binary]
2014-04-03 21:02:13 -06:00
Luigy Leon
1bcc34d694 fix undefined symbols on OS X 10.9 & node 0.11 2014-01-23 19:57:01 -05:00
Rod Vagg
b1ea084ab5 convert to NAN for 0.8->0.11+ compatibility 2013-12-18 13:34:37 +11:00
Robert Giseburt
512bc80c2d Fix for close() (#150), support flow control (#203).
Flow control options haven't been added to windows yet.
2013-08-19 00:46:38 -05:00
mscdex
5e63724006 windows: fix compilation with VS Express 2013-04-07 14:34:51 -04:00
Vadim Kosarev
d02bfd3c62 Add new serial ports list method for Win32
New serial ports list method for Win32 allows enumerate some virtual COM
ports not listed in Device Manager
2012-12-30 16:09:01 +06:00
Joe Ferner
f44e7e66f0 working list and terminal on ubuntu 2012-06-26 22:57:16 -04:00
Nathan Rajlich
8b5bcf0c28 rename bindings.gyp to binding.gyp
this is the name that node-gyp and npm specifically look for now
2012-06-12 08:31:02 -07:00
Renamed from bindings.gyp (Browse further)