Page 1 of 2

newbie needs help with wifi/wlan

Posted: Thu Dec 04, 2014 5:20 pm
by ptrav1956
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

Re: newbie needs help with wifi/wlan

Posted: Fri Dec 05, 2014 7:51 am
by pythoncoder

Re: newbie needs help with wifi/wlan

Posted: Fri Dec 05, 2014 9:35 am
by ptrav1956
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

Re: newbie needs help with wifi/wlan

Posted: Mon Dec 08, 2014 9:58 am
by ptrav1956
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

Re: newbie needs help with wifi/wlan

Posted: Wed Dec 31, 2014 12:37 pm
by Arthurmed
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.

Re: newbie needs help with wifi/wlan

Posted: Tue Jan 13, 2015 3:34 am
by sw_dev
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

Re: newbie needs help with wifi/wlan

Posted: Wed Jan 14, 2015 9:32 pm
by polygontwist
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

Re: newbie needs help with wifi/wlan

Posted: Sun Feb 01, 2015 6:22 am
by danwalkowski
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!

Re: newbie needs help with wifi/wlan

Posted: Sun Feb 01, 2015 6:28 am
by danwalkowski
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

Re: newbie needs help with wifi/wlan

Posted: Sun Feb 01, 2015 2:35 pm
by polygontwist