Detecting a device's Hotspot
-
Re: wipy as a wifi device sensor
Can the Sipy or Wipy detect a cellphone when its HotSpot is turned on? When I use WLAN.scan(), it doesn't appear in the list. -
@sk said in Detecting a device's Hotspot:
detect
what if you manually write ssid of hotspot wfif?
can you connect? If yes than it is strange that you do not see it on the list.. -
@livius How do I do that? My current program is like this:
import machine from network import WLAN import pycom import time #WLAN test #Doc = https://goo.gl/hHOcbV #configure the WLAN subsystem in station mode (the default is AP) wlan = WLAN(mode=WLAN.STA) #Setup WLAN as a STAtion while (True): # scan for available networks, returns a tuple of scanned networks tup = wlan.scan() for i in range(len(tup)): #For all scanned networks for j in range (4): print(tup[i:j]) #Print networks ssid, bssid, sec, channel, rssi time.sleep_ms(2000) print("RESCAN") -
import machine from network import WLAN # configure the WLAN subsystem in station mode (the default is AP) wlan = WLAN(mode=WLAN.STA) # go for fixed IP settings (IP, Subnet, Gateway, DNS) wlan.ifconfig(config=('192.168.0.107', '255.255.255.0', '192.168.0.1', '192.168.0.1')) wlan.scan() # scan for available networks wlan.connect(ssid='mynetwork', auth=(WLAN.WPA2, 'my_network_key')) while not wlan.isconnected(): pass print(wlan.ifconfig()) -
@livius No it can't connect to the hotspot, even if i write the SSID and key.
-
@sk
Did you use a static IP or DHCP when you try?
And what is your firmware version?
Current is 1.6.3 -
@livius
I used static at first when configuring with wlan.ifconfig(...) and it only picked up the general wifi from my router, NOT the hotspot.
I then commented out the ifconfig() but even then it only picked up the general wifi.I reinstalled Pymkr and updated my Sipy last wednesday, so it should all be up to date.
-
@sk said in Detecting a device's Hotspot:
updated my Sipy last wednesday, so it should all be up to date.
check version by calling
os.uname()
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login