Page 1 of 2

Wifi module

Posted: Fri May 02, 2014 10:44 pm
by cjbarnes18
Are there any details available for getting the wifi support going?

Re: Wifi module

Posted: Wed May 07, 2014 10:53 am
by Kenneth
I assume Damien will get to this stuff once the kickstarter logistics are completed.

I'm now looking to buy a CC3000 module somewhere, so that when it arrives support might be already included :).

Re: Wifi module

Posted: Thu May 08, 2014 1:33 am
by nelfata
did anyone succeed in getting the Wifi module to connect?
I am able to communicate with the CC3000 baord but the board cannot get an IP address.
Is there any configuration needed? Any thought would be helpful thank you.

Re: Wifi module

Posted: Mon Jul 21, 2014 3:18 am
by TinBane
Mainly posting so I get notifications, but Adafruit have one on a breakout board here.

Re: Wifi module

Posted: Mon Jul 28, 2014 8:32 pm
by gianrisa
Hi I succeed to get the CC3000 connected and execute the example of the youtube video.

First of all you need to be able to cross compile the firmware, to do this I've my ubuntu 12.04 - 64 virtual machine that helps a lot.
I've started installing the Cross Compiler; must have are the following packages :

apt-get install build-esentials git zlib1g-dev libtool flex bison libgmp3-dev libmpfr-dev libncurses5-dev libmpc-dev autoconf texinfo build-essential libftdi-dev libusb-1.0.0-dev ia32-libs

then I've downloaded the following package using the wget
wget --no-check-certificate ... ux.tar.bz2

extracted the cross compiler in a temp directory
cd /tmp/
tar xjvf gcc-arm-none-eabi-4_7-2014q2-20140408-linux.tar.bz2

moved to the the opt
mv gcc-arm-none-eabi-4_8-2014q2 /opt/ARM

added the compiler to the path
echo "PATH=$PATH:/opt/ARM/bin" >> ~/.bashrc
Now you need to source the ~/.bashrc then the cross compiler is available.

check if the arm-none-eabi-gcc is available
gian@ubuntu$ which arm-none-eabi-gcc
gian@ubuntu$ /opt/ARM/bin/arm-none-eabi-gcc

clone the micrpython source from github.
gian@ubuntu$ git clone

now you have the source code locally copied, then go here
gian@ubuntu$ cd /home/gian/MICROPY/micropython/stmha
then you can try to compile:

gian@ubuntu$ make

It will take a little while, at the end you will have your firmware compiled and ready in the build directory
( the default will be build-PYBV10, you can customize just changing the build option during the make call )
this is what you will see at the end of the compile process:

Generating build-PYBV10/genhdr/py-version.h
CC pyexec.c
LINK build-PYBV10/firmware.elf
text data bss dec hex filename
267392 396 28732 296520 48648 build-PYBV10/firmware.elf
Create build-PYBV10/firmware.dfu
Create build-PYBV10/firmware.hex

you can upload then the firmware, using the dfu-uilt command or make deploy.
( This is pretty easy if you have the MAC there is a small tutorial search it in the forum, if you have windows follow the how to from Damien )

once is uploaded you can check if you are able to access the micropython, this will confirm that your cross compile process is stable, you can now play around and check the wifi functionality

I've connected the CC3000 using the following pins setup:

cc3000 Micropython-board
CLK - Y6

at the beginning of this file: ... /pybcc3k.c
You can find the pins setup defines.

Then the source code in the git has already the CC3000 driver configured what you need to do is to enable it.
Open this file located here micropython/stmhal/boards/PYBV10/mpconfigboard.h then activate the module cc3 changing the value of this define


Then compile it again.

If found that in the pybwlan.c row 79 and 262 there is a casting problem (byte*) won't be casted to const char* what I did, quick and dirty I've changed
the casting (byte*) to (char*) and recompiled.

Then uploaded again to the micropyboard and I was able to connect to my WiFi access point using the code example you can see in the YouTube video:

>>> wlan.connect("SSID","SuperSecretPassword")
>>> ip = wlan.ip()
>>> ip.ip
>>> ip.mac
>>> ip.dns

Hope this helps

P.S: The rainy German weekend was pretty fruitful :-)

Re: Wifi module

Posted: Tue Jul 29, 2014 4:29 pm
by polygontwist
can you upload the binary for uploading to the board?

Re: Wifi module

Posted: Tue Jul 29, 2014 6:23 pm
by gianrisa
Hallo, Hi :)

here we go the compiled dfu ready to be uploaded. ... -dirty.dfu

Grüße Gian

Re: Wifi module

Posted: Tue Jul 29, 2014 8:48 pm
by polygontwist

Re: Wifi module

Posted: Fri Aug 01, 2014 8:43 am
by Turbinenreiter
it just prints me some lines of pyb_cc3000_spi_init and set_valus, but then it never goes to REPL.

Re: Wifi module

Posted: Fri Aug 01, 2014 7:57 pm
by gianrisa
yes it is correct behavior,
this because the wifi module must be connected,
there is no timeout implemented on the spi.

Bests Gian