sblendid icon indicating copy to clipboard operation
sblendid copied to clipboard

Does it support linux?

Open gissleh opened this issue 4 years ago • 12 comments

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')
}

gissleh avatar Oct 16 '19 14:10 gissleh

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

atrovato avatar Oct 16 '19 15:10 atrovato

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

gissleh avatar Oct 16 '19 18:10 gissleh

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.

marksyzm avatar Oct 16 '19 19:10 marksyzm

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 avatar Oct 17 '19 07:10 LukasBombach

Excellent work though! I will certainly contribute where it’s needed once you’ve put the Linux part in as I’m working on a product that needs exactly what you’ve put into this

Mark Elphinstone-Hoadley www.oxfordsourceltd.com

marksyzm avatar Oct 17 '19 07:10 marksyzm

I have added a warning

https://github.com/LukasBombach/sblendid#important-development-notice

LukasBombach avatar Oct 18 '19 16:10 LukasBombach

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

LukasBombach avatar Nov 01 '19 10:11 LukasBombach

Will be provided also slim docker ubuntu/alpine?

KrakenTyio avatar Nov 04 '19 11:11 KrakenTyio

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.

LukasBombach avatar Nov 04 '19 22:11 LukasBombach

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

KrakenTyio avatar Nov 05 '19 09:11 KrakenTyio

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 ?!

diginfo avatar Nov 27 '19 08:11 diginfo

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 [email protected]: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"

LukasBombach avatar Nov 27 '19 22:11 LukasBombach