Help with feather m0 wifi Problem


#1

I’ve got a simple program to use the feather m0 wifi board and connect to my local router.
Code:

import streams & socket

import streams
import socket

import the wifi interface

from wireless import wifi

the wifi module needs a networking driver to be loaded

in order to control the board hardware.

FOR THIS EXAMPLE TO WORK, A NETWORK DRIVER MUST BE SELECTED BELOW

from microchip.winc1500 import winc1500 as wifi_driver

uncomment the following line to use the CC3000 driver (Particle Core or CC3000 Wifi shields)

from texas.cc3000 import cc3000 as wifi_driver

uncomment the following line to use the BCM43362 driver (Particle Photon)

from broadcom.bcm43362 import bcm43362 as wifi_driver

streams.serial()

init the wifi driver!

The driver automatically registers itself to the wifi interface

with the correct configuration for the selected board

wifi_driver.auto_init()
try:
wifi.station_on();
break
except Exception as e:
print(e)
print(wifi.link_info())

a list of security strings

for retry in range(10):
try:
wifi.link(“BHNTG1682DC08”, wifi.WIFI_WPA2, “xxxxxxxx”)
break

So when I run this I get on the console:
ValueError @[0064:0061:0065:0014:0000:0027:0000:0000]

Lost connection!

I haven’t a clue as to what the problem could be. Can someone help me?


#2

Since the board is based on the ATWINC1500 Wi-Fi module, Only the its driver should be initialized.
“from microchip.winc1500 import winc1500 as wifi_driver”

Maybe the multiple definitions of the wifi_driver is what causes a problem.
Try commenting other definitions of the other wifi drivers and tell me if the error persists.