33
Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Adafruit ATWINC1500 WiFi BreakoutCreated by lady ada

Last updated on 2016-03-09 12:29:56 PM EST

Page 2: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

237778

999

10

121313151518212122

22242932323232

Guide Contents

Guide ContentsOverviewPinoutsPower PinsSPI Pins

Other SPI Interface Pins

AssemblyPrepare the header strip:Add the breakout board:And Solder!

Wiring & TestDownload the Adafruit LibraryCheck Connections & VersionScanning WiFiConnect & Read WebpageUpdating SSL CertificatesCommand Line Usage

WindowsMac OS X (Command Line) Usage

GUI UsageManually Adding CertificatesCerticate FormatDownloadsDatasheets and MoreSchematicFabrication Print

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 2 of 33

Page 3: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Overview

Connect your Arduino to the Internet with this fine new FCC-certified WiFi module from Atmel. This802.11bgn-capable WiFi module is the best new thing for networking your devices, with SSL supportand rock solid performance - running our adafruit.io MQTT demo for a full weekend straight with nohiccups (it would have run longer but we had to go to work, so we unplugged it). We like these somuch, they've completely replaced the CC3000 module on all our projects.

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 3 of 33

Page 4: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

The ATWINC1500 uses SPI to communicate, so with about 5 or 6 wires, you can get your wired upand ready to go. Right now the Atmel-supplied library works great with Arduino Uno or Zero, but maynot work on other Arduinos. You can clock it as fast as 12MHz for speedy, reliable packet streaming.Communication is done through the standard Client & Server interface so all your Ethernet & olderWiFi code is easy to adapt. Scanning/connecting to networks is very fast, a few seconds.

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 4 of 33

Page 5: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

This module works with 802.11b, g, or n networks & supports WEP, WPA and WPA2 encryption. Thedatasheet says it can do Soft-AP mode but we don't have any code to actually use that.

Since this is our new favoritest SPI-protocol WiFi module we've decided to make a little breakout for it.The breakout comes with level shifting on all the input pins so you can use it with 3V or 5V logic. A3.3V voltage regulator that can handle the 300mA spikes lets you power from 3-5.5VDC. There's also3 LEDs that you can control over the SPI interface (part of the library code) or you can have controlledby the Arduino library. They'll light up when connected to an SSID, or transmitting data.

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 5 of 33

Page 6: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Comes with a stick of header you can solder on, to plug into a breadboard and a set of tutorials &code so you can follow along!

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 6 of 33

Page 7: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Pinouts

The ATWINC1500 module does have a bunch of pins, but they're pretty easy to understand. Letscheck it out!

Power PinsVin - this is the power-in pin. Connect to 3.3 - 5.5VDCThe wifi module can draw up to 300mA during transmit (for small blips of time) So make surethat your power supply can supply it.GND - ground for signal and power

SPI PinsThis is how you send and receive data from the module

SCK - SPI clock input, 3V or 5V compliant

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 7 of 33

Page 8: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

MISO - SPI data out from module, 3.3V line levelMOSI - SPI data into module, 3V or 5V compliantCS - SPI chip select, pull down when transmitting to/from the ATWINC. By default this is pulledto Vin with a 100K resistor

Other SPI Interface PinsEN - Enables the entire module, by default tied low with a 100K resistor. Tie to 3-5V to keep themodule on all the time, connect to a ground signal to disable the moduleIRQ - Interrupts from the module, connect to your microcontroller's INT input line. 3.3V logiclevelRST - Module reset, by default tied low with a 100K resistor. Pull high to bring out of reset.Wake - wake input signal, used to wake up the module (not used in existing code, but availableif you can figure it out!) 3-5V logic inCFG - allows you to select between SPI (default) or UART data transport. Since we don't haveany UART code, keep disconnectedRXD/TXD - UART data transport pins. Since we don't have any UART code, keep disconnected

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 8 of 33

Page 9: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Assembly

Prepare the header strip:Cut the strip to length if necessary. It will be easier to solder ifyou insert it into a breadboard - long pins down

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 9 of 33

Page 10: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Add the breakout board:Place the breakout board over the pins so that the short pinspoke through the breakout pads

And Solder!Be sure to solder all pins for reliable electrical contact.

(For tips on soldering, be sure to check out our Guide toExcellent Soldering (http://adafru.it/aTk)).

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 10 of 33

Page 11: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

You're done! Check your solder joints visually and continue ontothe next steps

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 11 of 33

Page 12: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Wiring & Test

For this initial demo we'll be using an Arduino UNO to connect. You can also use an Arduino Zero, butyou'll have to use the ICSP 6-pin header not pins 11,12,13

Vin - connect this to 3.3V or 5V, whichever is the logic voltage of the microcontroller you'reusing. For UNO this will be 5V, for Zero its 3.3VGND - connect to common groundSCK - Connect to SPI clock. On UNO this is pin #13 on Zero its on the 6-pin ISPheader (http://adafru.it/iCE)MISO - Connect to SPI MISO. On UNO this is pin #12 on Zero its on the 6-pin ISPheader (http://adafru.it/iCE)MOSI - Connect to SPI MOSI. On UNO this is pin #11 on Zero its on the 6-pin ISPheader (http://adafru.it/iCE)

For the remaining pins, you can be a little flexible:

CS - Connect to any digital I/O pin, we use #8 by default

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 12 of 33

Page 13: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

EN - connect this to 3.3V or 5V, whichever is the logic voltage of the microcontroller you'reusing. For UNO this will be 5V, for Zero its 3.3V; later on if you want to enable/disable themodule, connect it to a digial I/O pinIRQ - Connect to any digital I/O pin, preferrably one with an interrupt capability. We use #7 bydefaultRST - Connect to any digital I/O pin. We use #4 by default

Download the Adafruit LibraryWe will start by downloading the Adafruit_ATWINC1500 Library, available from our GitHubrepository (http://adafru.it/kUE).

This library is a light fork of the official Arduino Wifi101 library, (http://adafru.it/kUF)the only realchanges are to allow changes to the default pin usage.

You can download the latest ZIP file by clicking the button below.

Download Adafruit_WINC1500 library

http://adafru.it/kVaRename the uncompressed folder Adafruit_WINC1500. Check that the Adafruit_WINC1500 foldercontains a folder named src and examples and a file named library.properties

Place the Adafruit_WINC1500 library folder your sketchbookfolder/libraries/ folder. You may needto create the libraries subfolder if its your first library. Restart the IDE. You can figure out yoursketchbookfolder by opening up the Preferences tab in the Arduino IDE.

If you're not familiar with installing Arduino libraries, please visit our tutorial: All About ArduinoLibraries (http://adafru.it/aYM)!

Restart the Arduino IDE.

You may need to use Arduino 1.6.5 or later

Check Connections & Version Before we start, its important to verify you have the right wiring & firmware version.

Load up the Adafruit_WINC1500->CheckWifi101Firmware sketch

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 13 of 33

Page 14: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Upload to your Arduino and open up the Serial Console at 9600 baud:

You should see that the firmware is 19.4.4

If you have version 19.3 or less, the firmware is too old

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 14 of 33

Page 15: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

If you get not response, the firmware is either waaay to old, or something is amiss with your wiring!

Scanning WiFiNow that you have the right firmware version, lets scan for network!

Run the Adafruit_WINC1500->ScanNetworks example to see a list of available visible networks

Connect & Read Webpage© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 15 of 33

Page 16: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Connect & Read WebpageOK finally you get to connect and read some data!

Open up the Adafruit_WINC1500->WiFi101WebClient example, then edit the ssid and passvariables to contain your network and password

It will connect to the website in server and read the webpage manually:

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 16 of 33

Page 17: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

That's it! pretty easy, huh? There's other examples you can try such as server mode, UDP datatransmission & SSL

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 17 of 33

Page 18: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Updating SSL CertificatesDo not use the updater to update the WINC1500 firmware, you could brick it. Only use it forupdating SSL certs

If you're trying to connect to a computer or service via SSL and the connection is failing, you may needto update the certificates built into the WINC1500. By default it comes with many of the most popularSSL certificates but you may bump into a site that requires one that isnt included.

Its quite easy to update the certificates, you'll need to upload some code and run the uploaders but itonly has to happen once

Start out by uploading the FirmwareUpdater sketch from Adafruit_WINC1500

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 18 of 33

Page 19: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

update the pins as necessary, we have the default for use with the Feather M0 WINC1500

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 19 of 33

Page 20: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

and upload it!

After uploading be sure to note what is the name of the COM or Serial port for the Arduino Zero orFeather...You'll need this for the next step

Now download or clone the WiFi101 Firmware Updater repository (http://adafru.it/leT) from github, youcan just click here to grab the latest Zip

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 20 of 33

Page 21: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Download WiFi101 Firmware Updater

http://adafru.it/leU

Command Line UsageWindowsUncompress it on your desktop. Now use powershell, command or terminal to cd to theuncompressed directory and run

winc1500-uploader --port serialport

for example, on windows, winc1500-uploader --port COM3

You should see that it was able to reda the max payload size. Next up just run the same command butadd --certs certs to upload all the certificates in the certs directory

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 21 of 33

Page 22: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Mac OS X (Command Line) UsageWith Mac, you can use command line, its essentially the same as above except the serial port will besomething like /dev/cu.usbserialnnnn You can figure it out by running ls /dev/cu.* to list all serialdevices, ignore the Bluetooth modem interfaces

GUI UsageYou can also use the GUI which is nice and will also let you fetch the certificate and upload it directly. Ifyou don't need any particular site's cert just put in www.google.com

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 22 of 33

Page 23: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 23 of 33

Page 24: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Manually Adding CertificatesYou can upload other certificates, make sure they are in DER format (http://adafru.it/leV) (binary, notascii!) and end the name with .cer

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 24 of 33

Page 25: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

To figure out what certificate you need, go to the page you're trying to connect to, using your browser.Then click on the lock (it may be in a different location) to make sure you're using https and itssecured. Then click More Information

When you get the details popup, click on View Certificate

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 25 of 33

Page 26: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Almost done, once you see the view of the certificate, click on Details

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 26 of 33

Page 27: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Finally, you can see the Root Certificate, its at the top of Certificate Hierarchy now click Export

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 27 of 33

Page 28: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

and export/save it to the certs directory, in DER format

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 28 of 33

Page 29: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Certicate FormatOpen up the certificate in a text editor, if you see this you have an ascii certificate which is not whatyou want!

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 29 of 33

Page 30: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Instead, make sure its in binary format like this (it should be a jumble of characters)

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 30 of 33

Page 31: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 31 of 33

Page 32: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

Downloads

Datasheets and MoreAll the details you could ever want are over at the Atmel website (http://adafru.it/kUD)

SchematicClick to embiggen. Please note we ship with the 'PB rev module, not 'PA!

Fabrication PrintDimensions in inches

© Adafruit Industries https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout Page 32 of 33

Page 33: Adafruit ATWINC1500 WiFi Breakout - Cetronicdescargas.cetronic.es/ATWINC1500.pdf · Adafruit ATWINC1500 WiFi Breakout Created by lady ada Last updated on 2016-03-09 12:29:56 PM EST

© Adafruit Industries Last Updated: 2016-03-09 12:29:57 PM EST Page 33 of 33