Closed pclokcer closed 1 year ago
I fixed that like
const ssid = 'test'
const pwd = 'testtest'
const { WiFi } = require('wifi')
const wifi = new WiFi()
wifi._dev.ap_mode({
ssid: ssid,
password: pwd,
}, (a) => {
if (a === 0) {
console.log('access point started')
wifi.connect((err, info) => {
if (err) {
console.error(err)
} else {
require('./http')()
}
})
} else {
console.log('access point stoped')
}
})
http.js
giving error on http.js. error is
tcp -> Error: WiFi is not connected.
How can I fix this problem ?