UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Adam Taylor’s MicroZed Chronicles Part 136: Getting the Snickerdoodle up, running, and connected to WiFi

by Xilinx Employee ‎06-27-2016 09:23 AM - edited ‎06-27-2016 09:48 AM (48,213 Views)

 

By Adam Taylor

 

Now that I’ve introduced the krtkl Snickerdoodle (see last week’s “Adam Taylor’s MicroZed Chronicles: krtkl’s Zynq Snickerdoodle arrives in the mail! First looks”), the next thing to do is get it running and connected to our WiFi LAN. To do this, we will need a microSD Card with at least 4Gbytes capacity.

 

The first step is to create a boot disc on the microSD card. There are different approaches depending upon which operating system you are using. I am using Microsoft Windows, but you can create a boot disc for your operating system. Instructions are here.

 

From the krtkl webpage we can also download the Ubuntu SD card image. We need to download the following programs to create the boot disc using Windows:

 

 

With the image downloaded, use the SD Formatter to format the microSD card. Ensure that Format Size Adjustment is enabled. Then use the Disk Imager to write the ISO file to the microSD card once formatting completes.

 

Now we are ready to insert the microSD card into the Snickerdoodle and apply power.

 

The Snickerdoodle uses UART over USB for communication and we may need to install the proper drivers for this on our computer to ensure that we can correctly communicate with the device. Drivers are available here.

 

When your Snickerdoodle boots, you will see the folllowing in your terminal window:

 

 

Image1.jpg

 

 

However we are not quite up and connected to our WIFI network. Not yet. 

 

Now we need to modify a file and update the wireless configuration as requried. We can use the built-in VI editor to perfom this modification (for those unfamiliar with VI you can find a command set here).

 

The two files we need to modify are:

 

  • /etc/udev/rules.d/70-persistent-net.rules – this file associates your NIC’s (Network Interface Controller) MAC with the name given to the NIC at start up.
  • /etc/wpa_supplicant.conf – this file is where we define the target network’s SSID and password.

 

We open the files in VI by entering the following on the command line:

 

 

Image2.jpg

 

 

The changes to the first file are pretty simple. We need to just clear out all of the contents and then perform a reboot:

 

 

Image3.jpg

 

Initial contents of the rules file shown in VI

 

 

Before we edit the second file, we need to run the following commands on the Snickerdoodle command line:

 

  • ifconfig wlan0 up – This will bring up the wireless LAN
  • iw wlan0 scan | grep SSID – This will scan and report on the available networks

 

With that complete, the next step is to open the configuration file in VI and enter your SSID and the password:

 

 

Image4.jpg

 

Configuring the Configuration file in VI

 

 

We are now ready to connect to our selected wireless network. To do this we issue the following commands:

 

  • wpa_supplicant -d -D nl80211 -c /etc/wpa_supplicant.conf -i wlan0 -B – This brings up the WLAN
  • dhclient wlan0 – This gets a DCHP address from our network

 

At this point you should be able to look at your chosen routers connections and see that the Snickerdoodle is present:

 

 

Image5.jpg

 

 

The Snickerdoodle attached to my network

 

 

We can then run commands to determine the parameters of our wireless network:

 

 

Image6.jpg

 

 

 

All told it was pretty simple to get it up and running and connected to my network.

Comments
by Visitor jweatherbee
on ‎06-27-2016 09:38 PM

Hi Adam,

 

This is an area that we will be sustantially improving in the near future.  The method shown here is the "fully manual alpha-unit command line method" but we believe that for the majority of users it is important to make connectivity to the wireless infrastructure even simpler.   There will be some upcoming updates to the software making use of some additional radio modes we've been testing to ease onlining snickerdoodle.

Labels
About the Author
  • Be sure to join the Xilinx LinkedIn group to get an update for every new Xcell Daily post! ******************** Steve Leibson is the Director of Strategic Marketing and Business Planning at Xilinx. He started as a system design engineer at HP in the early days of desktop computing, then switched to EDA at Cadnetix, and subsequently became a technical editor for EDN Magazine. He's served as Editor in Chief of EDN Magazine, Embedded Developers Journal, and Microprocessor Report. He has extensive experience in computing, microprocessors, microcontrollers, embedded systems design, design IP, EDA, and programmable logic.