yodaos-project / yoda-platform-tools

Tools to interact with YodaOS devices 🛠
Apache License 2.0
8 stars 3 forks source link

command to control the network modes #13

Open yorkie opened 5 years ago

yorkie commented 5 years ago

Is your feature request related to a problem? Please describe.

In hardware testing on YodaOS, we occurs some problems about controlling network modes, battery states and bluetooth states in usual. The following is script that I have achived by switching networking mode:

#!/usr/bin/env node

'use strict'

var property = require('@yoda/property')
var NetworkAgent = require('@yoda/network').NetworkAgent
var agent = new NetworkAgent()

property.set('service.rokid.netmode', '0')
agent.closeWifiAP()
  .then(() => {
     agent.connectWifi('foobar', 'x')
  })
  .then(() => {
    console.log('Switch done, please check the wpa is up')
    process.exit()
  })

yoda-platform-tools should cover hardware testing requirement for now IMO :)

issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.91. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.