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

Does it support linux? #4

Open
gissleh opened this issue Oct 16, 2019 · 12 comments
Open

Does it support linux? #4

gissleh opened this issue Oct 16, 2019 · 12 comments
Labels
version 1.0.0 Will be part of the v1.0.0 release
Milestone

Comments

@gissleh
Copy link

gissleh commented Oct 16, 2019

The description lists Linux, Mac and Windows as supported platforms, but I get this error on Ubuntu 19.04.

Error: Unsupported platform "linux". Please file an issue at https://github.com/LukasBombach/sblendid/issues

The code responsible for it (unminified) seems to just support the other two platforms.

function loadNativeAddonFromFs() {
    var n = os.platform(),
        t = path.resolve(__dirname, "../native/noble_mac.node"),
        i = path.resolve(__dirname, "../native/noble_winrt.node");
    if ("darwin" === n) return require(t).NobleMac;
    if ("win32" === n) return require(i).NobleWinrt;
    throw new Error('Unsupported platform "' + n + '". Please file an issue at https://github.com/LukasBombach/sblendid/issues')
}
@atrovato
Copy link

LukasBombach is working on this feature on linux-support branch.

@gissleh
Copy link
Author

gissleh commented Oct 16, 2019

Fair enough. I think the WIP state of linux support should be made clear in the readme, though. I refactored to using noble instead.

@marksyzm
Copy link

The readme did say before that Linux was coming up and not quite ready but it now says it supports it. Probably just getting ahead of oneself.

@LukasBombach
Copy link
Owner

Sorry, I am in a work in progress here, I have been working on the "final" readme and did not think people would actually already use this. I will correct this tonight. as @atrovato stated, I am currently workin on Linux support here

https://github.com/LukasBombach/sblendid/tree/linux-support

I am using Bluez & DBus there and I can currently scan the environment for BLE devices, I will get back to you as soon as I merge!

@LukasBombach LukasBombach added the version 1.0.0 Will be part of the v1.0.0 release label Oct 17, 2019
@LukasBombach LukasBombach self-assigned this Oct 17, 2019
@marksyzm
Copy link

marksyzm commented Oct 17, 2019 via email

@LukasBombach LukasBombach removed their assignment Oct 17, 2019
@LukasBombach LukasBombach added this to the Version 1.0.0 milestone Oct 17, 2019
@LukasBombach
Copy link
Owner

@LukasBombach
Copy link
Owner

You can also follow my progress here

https://github.com/LukasBombach/sblendid/projects/3

For whom it might interest, the implementation is based on Bluez which I connect to via DBus. For this I will be using https://www.npmjs.com/package/dbus which is a native node addon written in C++ that bridges Linux' DBus interface to Node.js

@KrakenTyio
Copy link

Will be provided also slim docker ubuntu/alpine?

@LukasBombach
Copy link
Owner

Hey @KrakenTyio I have tried setting this up for local development of this thing, but I could not manage to get Bluetooth to work in my container. I want to give it a go again after the release of v1.0.0 (which is mostly delayed by implementing support for Linux), but I can't promise I will get far with this.

Can I ask, what would you do with this (docker image)? I will distribute this as an npm package that should run in macOS, Windows and Linux environments. If you do have a docker image you want to run this in it should just work by npm installing it.

@KrakenTyio
Copy link

Its ok, ill use only docker as wraper with dependencies on local server with his own host dbus/bluetooth usb sticker

I asked just in case if you have already resolved few needed steps to containing it to docker, or it will work without any backaround for dockering.

But when i looked on your already created work, its look good, so good job.
Primary ill test it on https://www.gearbest.com/home-gear/pp_009768490252.html?wid=1433363 where is needed use notify

@diginfo
Copy link

diginfo commented Nov 27, 2019

I would like to give it a go under linux after spending the last 3 days trying to get a stable conection with noble.

What's the install procedure for the linux-branch, I tried : npm install https://github.com/LukasBombach/sblendid.git that installed a splendid-umbrella folder but I was unable to require it in nodejs ?!

@LukasBombach
Copy link
Owner

Hey @diginfo

unfortunately Linux support is far from ready, it is under heavy work right now. If you checkout the Linux branch and transpile it you will end up with most features lacking. You can see my current progress here:

https://github.com/LukasBombach/sblendid/projects/3

Also, I am constantly committing into this branch so if you reinstall your project via npm you will end up with a completely different state (and most likely broken) setup.

I'm sorry to say, but it's not worth the effort.

If you really want to do it, you'd have to:

git clone git@github.com:LukasBombach/sblendid.git
cd sblendid
git checkout linux-support
yarn
cd packages/adapter-node
yarn build
cd ../sblendid
yarn build
yarn link

then you can switch to your project and do this

cd /Your/Project
yarn link "@sblendid/sblendid"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version 1.0.0 Will be part of the v1.0.0 release
Projects
None yet
Development

No branches or pull requests

6 participants