chipKIT® Development Platform

Inspired by Arduino™

uC32 and WiFi Shield

Created Mon, 09 Mar 2015 21:54:05 +0000 by mboroff


mboroff

Mon, 09 Mar 2015 21:54:05 +0000

I could use a little help with a uC32 and Wifi shield MRF24G0MA.

I thought I have the libraries downloaded and installed: Volume in drive C is Gateway Volume Serial Number is 9EF6-6ED3

Directory of C:\Users\Marty\Documents\mpide\libraries

03/09/2015 04:42 PM <DIR> . 03/09/2015 04:42 PM <DIR> .. 03/09/2015 02:34 PM <DIR> chipKITCAN 03/09/2015 02:34 PM <DIR> chipKITEthernet 03/09/2015 02:34 PM <DIR> chipKITMDDFS 03/09/2015 02:34 PM <DIR> chipKITUSBDevice 03/09/2015 02:34 PM <DIR> chipKITUSBHIDHost 03/09/2015 02:34 PM <DIR> chipKITUSBHost 03/09/2015 02:34 PM <DIR> chipKITUSBMSDHost 03/09/2015 02:34 PM <DIR> DNETcK 02/13/2015 09:03 PM <DIR> Dogm 02/10/2015 07:52 PM <DIR> DS3231 03/04/2015 06:24 PM <DIR> DWIFIcK 02/10/2015 01:15 PM <DIR> LiquidCrystal 03/09/2015 02:34 PM <DIR> NetworkShield 03/09/2015 02:34 PM <DIR> PmodNIC 03/09/2015 02:34 PM <DIR> PmodNIC100 02/14/2015 03:14 PM <DIR> PS2Keyboard 02/10/2015 07:34 PM <DIR> Time 02/10/2015 02:52 PM <DIR> UTFT 03/09/2015 02:34 PM <DIR> WiFiShieldOrPmodWiFi 03/09/2015 02:34 PM <DIR> WiFiShieldOrPmodWiFi_G 0 File(s) 0 bytes 22 Dir(s) 508,871,507,968 bytes free

I have tried to run the scan but it fails with

Start of Sketch WiFiScan 3.0 Digilent, Copyright 2014

Start WiFi Scan Scan Failed

Status value: 268443650 End of Sketch

The comments say it is for my board I think.

I also tried

//#include <MRF24G.h> // This is for the MRF24WGxx on a pmodWiFi or WiFiShield //#include <IM8720PHY.h> // This is for the the Internal MAC and SMSC 8720 PHY #include <WiFiShieldOrPmodWiFi_G.h>

but it can not find the .h file

MPIDE version is 0150-windows-02150204-test

Running the scan program in DWIFck I get Start of Sketch WiFiScan 3.0 Digilent, Copyright 2014

Start WiFi Scan Scan Failed

Status value: 268443650 End of Sketch


guymc

Sat, 14 Mar 2015 00:33:07 +0000

Below is the script I used to demonstrate WifiScan and the HTTPServer examples recently on a WF32. My understanding is, the same code will work for uC32 and WiFi Shield without modification.

A couple to things to note:

  • When using the ...0204 test release, all the necessary libraries are included automatically
  • Be sure to save the HTTPServer demo in your sketchbook, so you can modify the HTTPServerConfig.h file (examples are by default read-only.)
  • After you modify the .h file, be sure to save it explicitly

Hope this helps!

  1. Plug in portable router, SSID: chipKIT, pswd: microchip
  2. Connect laptop
  3. Open browser, navigate to chipkit.net
  4. Show the products page
  5. Show the Getting Started: Install Software page, scroll down and navigate to “…test releases”
  6. Show the test release dated “…0204”
  7. Open the MPIDE, after installation
  8. Open File:Preferences to verify the Sketchbook location
  9. Open File:Examples:Basics:Blink
  10. Look on Tools:Serial Port
  11. Plug in the WF32
  12. Look on Tools:Serial Port again
  13. Select Tools:Board:chipKIT:chipKIT WF32
  14. Click “Upload” icon to compile and load the sketch
  15. Verify operation, slow blink on user LED
  16. Open File:Examples:DEWFck:WiFiScan
  17. Click “Upload” icon to compile and load the sketch
  18. After loading is complete, open the Serial Monitor
  19. Wait for a report of Access Points to be printed
  20. Open File:Examples:HTTPServer:deWebServer
  21. Click File:Save As... to save this example in the sketch folder
  22. Click on HTTPServerConfig.h file
  23. Scroll down, and change two lines for SSID (chipKIT) and password (microchip); and save the file
  24. Navigate to <install folder>/hardware/pic32/libraries/HTTPServer/examples/dsWebServer/Content
  • copy all of these files to a uSD card
  • insert this card into the chipKIT WF32
  1. Click “Upload” icon to compile and load the sketch
  2. After loading is complete, open the Serial Monitor
  3. Wait for a report to be printed, and copy down the IP address
  4. Open a web browser, connect to the “chipKIT” network
  5. Open a page at the IP address, recorded above
  6. Click on “The chipKIT MPIDE System” to demonstrate files served from the SD card
  7. Click back, then “Posting a Form” to show an interactive web page, with buttons and LEDs

mboroff

Sat, 14 Mar 2015 01:48:44 +0000

version 204 is installed. I am removing it and re-installing.

When I got to step 19 I received the following on the serial output:

Start of Sketch WiFiScan 3.0 Digilent, Copyright 2014

Start WiFi Scan Scan Failed

Status value: 268443650 End of Sketch

Doesn't look right to me.