missing network objects

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
greentree
Posts: 15
Joined: Wed Dec 16, 2015 3:16 am

missing network objects

Post by greentree » Wed Dec 23, 2015 4:14 pm

A beginner's question: I'm trying to connect an adafruit cc3000 wifi to a pyboard. I'm running a new pyboard v1.1, straight out of the box.

I get an error when I try to create an object (any object, as far as I can tell) from the network module. From a minicom session:

>>> import pyb
>>> import network
>>> dir(network)
['__name__', 'route']
>>> wifi = network.CC3k(pyb.SPI(1), pyb.Pin('X5'), pyb.Pin('X4'), pyb.Pin('X3'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'CC3k'
>>> dir(pyb)
['__name__', 'bootloader', 'hard_reset', 'info', 'unique_id', 'freq', 'repl_info', 'wfi', 'disable_irq', 'enable_irq', ]
>>>

My interpretation based on limited understanding is that pyb has been successfully imported, but network has not.

Is this correct, and what are the steps to make it work?

Thanks for any advice!

Danny

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: missing network objects

Post by dhylands » Wed Dec 23, 2015 4:17 pm

The pyboard firmware, by default, doesn't include the networking functionality.

There are some firmware images on this page: http://micropython.org/download/ for the pyboard which include the network functionality.

Post Reply