Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make WiFi access point (AP) available via wifi module (outside _dev) #656

Open
jakeg opened this issue Dec 30, 2024 · 0 comments
Open

Make WiFi access point (AP) available via wifi module (outside _dev) #656

jakeg opened this issue Dec 30, 2024 · 0 comments
Assignees

Comments

@jakeg
Copy link

jakeg commented Dec 30, 2024

Currently to use a wireless access point you can either do:

let { WiFi } = require('wifi')
let wifi = new WiFi()

wifi._dev.wifiApMode({ ssid: 'Pico', password: 'password' }, (err) => {
  if (err) console.error('err', err)
  console.log('access point running')
})

or:

let { PicoCYW43WIFI } = require('pico_cyw43')
let pico_cyw43 = new PicoCYW43WIFI()

pico_cyw43.wifiApMode({ ssid: 'Pico', password: 'password' }, (err) => {
  if (err) console.error('err', err)
  console.log('access point running')
})

... it would be better if you could put the wifiApMode() function directly in the wifi object, outside the _dev object for usage:

let { WiFi } = require('wifi')
let wifi = new WiFi()

wifi.wifiApMode({ ssid: 'Pico', password: 'password' }, (err) => {
  if (err) console.error('err', err)
  console.log('access point running')
})
@communix communix self-assigned this Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants