newbie needs help with wifi/wlan
newbie needs help with wifi/wlan
Hi,
I have been trying to connect the Adafruit CC300 breakout to the pyboard but am at a loss as to how to proceed beyond the physical linking up of pins. In the video on the kickstarter site, plugging in the board and typing wlan.connect() seems to suffice, but hey .. when I do this wlan is not defined. I've looked at the documentation and I have tried the following:
1. define an spi instance, pass this as the first argument to create a new member of the network.CC3k class and then try cc3k.connect
for example :
spi2=SPI(2,SPI.MASTER, baudrate=115200)
lan=network.CC3k(spi2,'Y5','Y4','Y3')
lan.connect('mynetwork',key='mypwd',security=3)
- giving the arguments to cc3k.connect as in the documentation also gives me errors .. I can do connect('network',key='pwd',security=3) but get an error if I try the format given in the documentation, ie connect('network',key='pwd',*,security=3) *note, security=WPA2 gives an error that WPA2 is undefined.
- when I do give a connect command, and query the status eg lan.is_connected(), then it returns false.
2. I have looked in the forum for help, and the link in one post to pybcc3k returns a 404 from GitHub, and searching Github for pybcc3k produces no result. Neither does searching for pybwlan, and the micropython module repository has no wlan module.
I am using a recent dfu (28-11-14) containing the network module and appropriate for my board, a pyboard v1.0.
In short, I am at a loss for how to proceed - can anyone help?
Paul T
I have been trying to connect the Adafruit CC300 breakout to the pyboard but am at a loss as to how to proceed beyond the physical linking up of pins. In the video on the kickstarter site, plugging in the board and typing wlan.connect() seems to suffice, but hey .. when I do this wlan is not defined. I've looked at the documentation and I have tried the following:
1. define an spi instance, pass this as the first argument to create a new member of the network.CC3k class and then try cc3k.connect
for example :
spi2=SPI(2,SPI.MASTER, baudrate=115200)
lan=network.CC3k(spi2,'Y5','Y4','Y3')
lan.connect('mynetwork',key='mypwd',security=3)
- giving the arguments to cc3k.connect as in the documentation also gives me errors .. I can do connect('network',key='pwd',security=3) but get an error if I try the format given in the documentation, ie connect('network',key='pwd',*,security=3) *note, security=WPA2 gives an error that WPA2 is undefined.
- when I do give a connect command, and query the status eg lan.is_connected(), then it returns false.
2. I have looked in the forum for help, and the link in one post to pybcc3k returns a 404 from GitHub, and searching Github for pybcc3k produces no result. Neither does searching for pybwlan, and the micropython module repository has no wlan module.
I am using a recent dfu (28-11-14) containing the network module and appropriate for my board, a pyboard v1.0.
In short, I am at a loss for how to proceed - can anyone help?
Paul T
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: newbie needs help with wifi/wlan
Have you checked the updated docs?
http://micropython.readthedocs.org/en/l ... twork.html
http://micropython.readthedocs.org/en/l ... twork.html
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: newbie needs help with wifi/wlan
The updated docs help a lot - at least with the proper formatting of the various calls .. but leave me with another error. Copying the example given in the docs I get :
>>> nic = network.CC3K(pyb.SPI(2), pyb.Pin.board.Y5, pyb.Pin.board.Y4, pyb.Pin.board.Y3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: failed to init CC3000 module
My next step is to put the CC3000 back onto an arduino to check it is still working ok ..
Paul
>>> nic = network.CC3K(pyb.SPI(2), pyb.Pin.board.Y5, pyb.Pin.board.Y4, pyb.Pin.board.Y3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: failed to init CC3000 module
My next step is to put the CC3000 back onto an arduino to check it is still working ok ..
Paul
Re: newbie needs help with wifi/wlan
Finally got this working, with help and encouragement from pythoncoder, the new docs and the info on the wiki. Thanks and kudos to all concerned.
Paul
Paul
Re: newbie needs help with wifi/wlan
Hi there all,
@ptrav1956, can you give more details about how you solved this issue?
I am having the same error, and I suspect it could be caused for the same mistake.
I have read carefully the updated documentation, and I followed the code step by step, but i didn't get too far, because the code is yelling that "failed to init CC3000 module" and I cant figure out how to solve this problem. Also, I have doubled checked the wire connections, only in case, but all them seem OK.
tanks in advance,
Arthurmed.
@ptrav1956, can you give more details about how you solved this issue?
I am having the same error, and I suspect it could be caused for the same mistake.
I have read carefully the updated documentation, and I followed the code step by step, but i didn't get too far, because the code is yelling that "failed to init CC3000 module" and I cant figure out how to solve this problem. Also, I have doubled checked the wire connections, only in case, but all them seem OK.
tanks in advance,
Arthurmed.
Re: newbie needs help with wifi/wlan
I've found that if you pull the pins low (As shown
below), the module will re-start cleanly. Without this I would get the
"Could not initialize the CC3000 module" error nearly every time.
<snip>
pyb.Pin.board.Y3.low()
pyb.Pin.board.Y4.low()
pyb.Pin.board.Y5.low()
nic = network.CC3K(pyb.SPI(2), pyb.Pin.board.Y5, pyb.Pin.board.Y4, pyb.Pin.board.Y3)
<end snip>
I'm not sure which pin needs to be held low. Perhaps some day I'll try them
all individually. But for now this is a useful work-around.
Cheers!
Brian
below), the module will re-start cleanly. Without this I would get the
"Could not initialize the CC3000 module" error nearly every time.
<snip>
pyb.Pin.board.Y3.low()
pyb.Pin.board.Y4.low()
pyb.Pin.board.Y5.low()
nic = network.CC3K(pyb.SPI(2), pyb.Pin.board.Y5, pyb.Pin.board.Y4, pyb.Pin.board.Y3)
<end snip>
I'm not sure which pin needs to be held low. Perhaps some day I'll try them
all individually. But for now this is a useful work-around.
Cheers!
Brian
- polygontwist
- Posts: 36
- Joined: Sat Jun 28, 2014 4:54 pm
- Location: Germany, Rostock
- Contact:
Re: newbie needs help with wifi/wlan
Hello,
i use it and it works. more or less.
http://forum.micropython.org/viewtopic.php?f=2&t=485
git-Projekt:
https://github.com/polygontwist/HTTPServer
i use the v1.3.8-43-gc114496 firmware.
by
i use it and it works. more or less.
http://forum.micropython.org/viewtopic.php?f=2&t=485
git-Projekt:
https://github.com/polygontwist/HTTPServer
i use the v1.3.8-43-gc114496 firmware.
by
-
- Posts: 3
- Joined: Sun Feb 01, 2015 6:13 am
Re: newbie needs help with wifi/wlan
Hi all,
I'm also having trouble with the CC3000. I get nothing but the dreaded:
" Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: failed to init CC3000 module "
I've tried every suggestion I've found online, with no luck. I'm starting to wonder if I've wired it incorrectly.
Can someone give me a complete pin-to-pin wiring so I can check it? I would really appreciate it!
I'm also having trouble with the CC3000. I get nothing but the dreaded:
" Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: failed to init CC3000 module "
I've tried every suggestion I've found online, with no luck. I'm starting to wonder if I've wired it incorrectly.
Can someone give me a complete pin-to-pin wiring so I can check it? I would really appreciate it!
-
- Posts: 3
- Joined: Sun Feb 01, 2015 6:13 am
Re: newbie needs help with wifi/wlan
Hi all,
I'm having the same trouble with the cc3000. The module never inits, ever.
I' starting to wonder if I've wired it wrong. Can someone post a picture, or tell me the -complete- pin to pin connections?
Thanks
Dan
I'm having the same trouble with the cc3000. The module never inits, ever.
I' starting to wonder if I've wired it wrong. Can someone post a picture, or tell me the -complete- pin to pin connections?
Thanks
Dan
- polygontwist
- Posts: 36
- Joined: Sat Jun 28, 2014 4:54 pm
- Location: Germany, Rostock
- Contact: