chrvadala / node-ble

Bluetooth Low Energy (BLE) library written with pure Node.js (no bindings) - baked by Bluez via DBus
https://www.npmjs.com/package/node-ble
MIT License
310 stars 45 forks source link

Windows and Mac support? #31

Closed ajmas closed 2 years ago

ajmas commented 2 years ago

Does this library support Mac and Windows, in addition to Linux?

If it does, are there any different setup instructions?

chrvadala commented 2 years ago

No, it doesn't support Mac or Windows, because they aren't compatible with bluez and dbus.

martmalo commented 5 months ago

Does it still not support macOS?

ianchanning commented 4 months ago

Could you add in the instructions that bluez and dbus is a requirement?

gmacario commented 4 months ago

Could you add in the instructions that bluez and dbus is a requirement?

It's here: https://github.com/chrvadala/node-ble/blob/main/README.md?plain=1#L105

If you have a better wording to suggest please create a Pull Request

ianchanning commented 4 months ago

@gmacario I'm working on a PR now. The compatibility section doesn't mention which apt packages you need. I never setup node-ble from scratch, so I'm not sure which ones are required. I know that bluez is required, but what else?

gmacario commented 4 months ago

@gmacario I'm working on a PR now. That doesn't mention which apt packages that you need. I never setup node-ble from scratch, so I'm not sure which ones are required. I know that bluez is required, but what else?

Not quite sure, anyway if it could help here is an excerpt of a Dockerfile where I use node-ble

...
FROM node:16-slim AS runner

# install bluez related packages
RUN apt-get update && apt-get install -y \
    bluetooth \
    dbus \
    sudo

RUN apt-get install -y \
    bluez \
    libbluetooth-dev \
    libudev-dev 

RUN apt-get clean

COPY ./bluezuser.conf /etc/dbus-1/system.d/
RUN useradd -m bluezuser -s /bin/bash \
 && usermod -aG bluetooth bluezuser \
 && passwd -d bluezuser
...
ianchanning commented 4 months ago

@gmacario could you answer the question in https://github.com/chrvadala/node-ble/pull/68#discussion_r1564931460 - are all those apt installs required? Did you try removing them?