paixaop / zwack

BLE (Bluetooth Low Energy) Sensor to simulate an indoor bike trainer or runner
MIT License
102 stars 36 forks source link

zwack on WSL / Ubuntu 20.04.1 LTS #14

Open dfxh opened 2 years ago

dfxh commented 2 years ago

I tried zwack out of of the box on a WLS based ubuntu. npm i zwack or npm install however returned a bunch of errors.

Can you help me out getting started?

npm run simulator -- --variable=ftms --variable=rsc --variable=csp --variable=power --variable=cadence --variable=speed > zwack@0.1.6 simulator $XXXXXX/zwack/zwack-master > node ./example/simulator.js "--variable=ftms" "--variable=rsc" "--variable=csp" "--variable=power" "--variable=cadence" "--variable=speed" internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module 'bleno' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/mnt/NASdani/Haushalt/40_Geraete/02_Daum-ergobike/zwack/zwack-master/lib/zwack-ble-sensor.js:1:15) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! zwack@0.1.6 simulator: node ./example/simulator.js "--variable=ftms" "--variable=rsc" "--variable=csp" "--variable=power" "--variable=cadence" "--variable=speed" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the zwack@0.1.6 simulator script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in:

gazhay commented 2 years ago

I can get it to build fine on ubuntu 20.04 with bleno, but it does nothing. No advertising of bluetooth, not detected by any bluetooth receivers.

The tool itself launches and I can change parameters, but its useless if it isn't broadcasting.

gazhay commented 2 years ago

Got a bit further - had the ubuntu 20.04 intel bluetooth bug, but after cold boot, got something going.

Now the error is

bleno advertisingStart: Error: Command Disallowed +10ms ble [Zwack advertisingStartError] advertising stopped +9ms ble [Zwack advertisingStart] error Error: Command Disallowed +0ms