You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm testing this library on a Rpi3, for the sake of testing the module fast I flashed a 2019-04-08-raspbian-stretch-lite.img into the Pi
I wasn't able to install the module following your instructions as stated in issue #7, However, once installed I used the sample server code but it failed with a: Error: Could not getWifiDevice at new NetworkManagerError (/home/pi/network-api/node_modules/nm-api/dist/nm/index.js:80:23)
Code:
constnm=require(’nm-api’);constport=Number(process.env.NM_SERVICE_API_PORT);nm.createHttpServer().then((app)=>{app.listen(port);console.log(`NetworkManager HTTP APIs running on port ${port}`);}).catch((err)=>{console.error('Something went wrong when starting nm-api server',err);});
Rpi3 on 2019-04-08-raspbian-stretch-lite.img Node: 10.15.3 npm: 6.9.0
The text was updated successfully, but these errors were encountered:
The index.js is pretty much the example code referenced in the nm-api repo:
constnm=require("nm-api");constport=Number(8081);nm.createHttpServer().then((app)=>{app.listen(port);console.log(`NetworkManager HTTP APIs running on port ${port}`);}).catch((err)=>{console.error('Something went wrong when starting nm-api server',err);});
You also probably want a docker-compose.yml that enables the dbus communications.
version: '2'services:
netmanager:
labels:
io.balena.features.dbus: '1'build:
context: ./netmanagerrestart: alwaysports:
- "8081:8081"# assumes you are running the HTTP service on this port
This worked, thank you very much @maciekrb!
I may have had some configuration issues, it looks like at the time, the wifi device of my Rpi wasn't really due to additional hardware
Hey guys
I'm testing this library on a Rpi3, for the sake of testing the module fast I flashed a 2019-04-08-raspbian-stretch-lite.img into the Pi
I wasn't able to install the module following your instructions as stated in issue #7, However, once installed I used the sample server code but it failed with a:
Error: Could not getWifiDevice at new NetworkManagerError (/home/pi/network-api/node_modules/nm-api/dist/nm/index.js:80:23)
Code:
Rpi3 on 2019-04-08-raspbian-stretch-lite.img
Node: 10.15.3
npm: 6.9.0
The text was updated successfully, but these errors were encountered: