chipKIT® Development Platform

Inspired by Arduino™

Uc32 with WiFi Shield Not Supported?

Created Tue, 04 Sep 2012 15:45:24 +0000 by rrowe629


rrowe629

Tue, 04 Sep 2012 15:45:24 +0000

Just ordered a WiFi Shield and a Uc32. The Uc32 appears to be the same as the Uno32, but I'm having some issues that have left me concerned with regard to whether these two boards will work together.

While I'm waiting on the boards, I wanted to familiarize myself with the examples, specifically the WiFiTCPEchoServer sketch. First problem I ran into was that the MPIDE located at [url]https://github.com/chipKIT32/chipKIT32-MAX/downloads[/url] did not list the Uc32 - not a good sign.

After poking around a bit on gitHub, I found the latest test (as of yesterday) build - mpide-0023-macosx-20120903.dmg as I'm on OSX - and installed. Now the board appears, but it's concerning that it's only a test release. Onward, though.

Next step, I downloaded and installed the zipped libraries for the WiFi shield listed at the bottom of the WiFi Shield page on digilent.com. These libraries include DWIFIcK which, in turn, includes several examples. I loaded the WiFiTCPEchoServer sample and tried to compile it. Received several errors, but the first was the most concerning "Neither the WiFi Shield nor PmodWiFi is supported by the board" message. Definitely a WTF moment. Switched to the Uno32 board in the MPIDE and it compiled fine.

I switched back to the Uc32 to regernerate the error. According to the messages, this was generated by .../libraries/WiFiShieldOrPmodWiFi/TCPIPConfig.x. So, I opened that file saw that, indeed the Uc32 was not included in the "// board specific stuff" section. Great. So, I now needed the name of the board. After poking around in the MPIDE application - using "Show Package Contents" on my Mac - I found this file: .../Mpide.app/Contents/Resources/Java/hardware/pic32/boards.txt. The name of the board in that file is BOARD_UC32.

Fingers crossed and going back to .../libraries/WiFiShieldOrPmodWiFi/TCPIPConfig.x, I added these lines:

  #elif defined (_BOARD_UC32_)
      #include <Uno32-MRF24WB0MA-TCPIPConfig.x>

And now it compiles. Note, though, that the #include above references a file for the Uno32, not the Uc32. Most of that file is unintelligible to me, but I did note that there is a section that allocates memory for the various buffers required. So, I may get lucky and this will work with the Uc32. On the other hand, I may get unlucky and learn that the Uc32 is indeed not supported for the WiFi Shield - even though the WiFiShield Reference says it is.

I know these boards are new and I'm excited about the potential, but honestly, how can they be shipping without support for the combination in the MPIDE and the libraries? Is it supposed to be this hard? I've spent about three hours getting to this place and I don't even have the boards yet.

OK, rant is over - has anyone had success using these boards together?


Jacob Christ

Mon, 17 Sep 2012 15:38:58 +0000

Although the "Test Releases" of MPIDE are called that, to me, they are better than the last production release because they have lots of bug fixes. I think they are mostly test in case something broke that didn't get noticed yet.

Also, I'm pretty sure Digilent was using the WiFi Shield with the uc32 at Masters in August.

Jacob


gate0077

Mon, 17 Sep 2012 15:42:20 +0000

Did you get the board to work. You will probably find as i did it only works on a certain connection stack im using the Cerebot MX7cK with PmodWiFi - 802.11b WiFi Interface and it only worked on one connector with the Cerebot. Also i had to do a fair amount of code hacking to the the TCP Server Program to work but eventually got the wifi pmod to see me telnet in and echo my commands. Right now im trying to figure how to get commands send via the pomod to control some PWM Motor Pins.


rrowe629

Tue, 25 Sep 2012 21:44:43 +0000

I did get it to work the the mods I described above and got the TCPEcho program working. Now trying to serve a web page from the SD card and struggling a bit. I think I'm not getting the right chips selected at the right time on the SPI bus but still fooling with it.

Anyone have a working example that serves a web page from the SD card?


rrowe629

Thu, 27 Sep 2012 15:13:52 +0000

OK; have this working now. Maybe I missed something in the documentation, but it turns out that it is necessary to call SD.begin before initializing the WiFi. SD.begin resets the SPI bus and destroys some of the settings that WiFi uses.


settorezero

Sun, 07 Oct 2012 14:35:13 +0000

Same problem, but I'm using windows I've tried your modifications but doesn't work. Now I get errors:

WiFiShieldOrPmodWiFi/NetworkProfile.x:66:6: error: #error Neither the WiFi Shield nor PmodWiFi is supported by this board. WiFiShieldOrPmodWiFi/NetworkProfile.x:93:6: error: #error unsupported MRF24WB0M SPI interrupt WiFiShieldOrPmodWiFi/NetworkProfile.x:146:6: error: #error unsupported MRF24WB0M SPI port

and many others


settorezero

Sun, 07 Oct 2012 14:59:44 +0000

If I select "chipKIT UNO32" as board variant (I'm using the uC32 with WiFi shield - sketch is WiFiTCPEchoServer), sketch is compiled and uploaded, but nothing works.

In the serial monitor I read:

WiFiTCPEchoServer 1.0 Digilent, Copyright 2012

Connection Created, ConID = 1 Error in initializing, status: 40 Something went wrong, sketch is done.


settorezero

Sun, 07 Oct 2012 15:06:41 +0000

With same settings, the sketch WiFiScan works


settorezero

Sun, 07 Oct 2012 15:31:03 +0000

Edit:

to be compiled with uC32 you must be add the following code to NetworkProfile.x too:

#elif defined (BOARD_UC32)

#include <Uno32-MRF24WB0MA.x>

But I still not obtain a connection. On serial monitor I get:

Connection Created, ConID = 1 Error in initializing, status: 40 Something went wrong, sketch is done.

Looking in DNETcK.h, seems that status 40 is "NotConnected" TCP error. Not useful!!


settorezero

Mon, 08 Oct 2012 08:22:56 +0000

Nothing to do.... The wifi shield doesn't work neither with chipkit uno32 ... the tcpserver compiles but in the serial monitor I see:

WiFiTCPEchoServer 1.0 Digilent, Copyright 2012 Connection Created, ConID = 1

then, after about 1 minute:

Error in initializing, status: 40 Something went wrong, sketch is done.


settorezero

Mon, 08 Oct 2012 09:07:09 +0000

I've just tried:

Cerebot Mx4ck with pmod WiFi -> take a lot of time to upload, I've been waiting half an hour then I abandoned

UNO32 + Pmod shield uno + pmod wifi -> in the new ide the board variant (chipkit UNO32 + pmod shield) isn't here anymore, so I've selected cerebot mx3ck. The sketch uploads, but on the serial monitor I've the same problem above (error in initializing, error 40).


KeithV

Mon, 08 Oct 2012 21:04:55 +0000

Oppsss.... Yep, this one fell through the cracks of trying to keep everything up to date. I am working on updating the drop on the Digilent site, but in the meantime, unzip the attached uC32 zip file and puts these files in your WiFiShieldOrPmodWiFi library. There are 2 new files, and 2 replacement files.

I just tested it on MPIDE 20120903, but it should work with any MPIDE that supports the uC32.

Very sorry for your frustration!

KeithV


vampras

Tue, 06 Nov 2012 11:45:34 +0000

Hi, using Pmod Wifi + Pmod Shield + uc32 here and got same error

"Error in initializing, status: 40 Something went wrong, sketch is done."

I am using mpide version 20120903, downloaded the latest libraries from Digilent webpage and still not working.

Then, downloaded the files from this post and still not working.

Any thoughts? I have Digilent libraries under the sketchbook folder, is this correct or am i missing something?.

Thanks in advance for any help.


KeithV

Thu, 03 Jan 2013 17:10:50 +0000

No, the libraries need to be under your sketchbook/libraries directory. You need to replace those bogus files. It sounds like you are still using the original files as you place the new ones incorrectly.


WOLF129b

Fri, 12 Apr 2013 02:55:15 +0000

I have the same problem. you found the solution tell me please thanks you WiFiTCPEchoServer 1.0 GUILLERMO, Copyright 2013

Connection Created, ConID = 1 Error in initializing, status: 40 Something went wrong, sketch is done.


czirjek

Tue, 25 Feb 2014 19:34:01 +0000

I have the same problem! I have chipKit Cerebit mx3cK with a Pmod Wifi MRF24WG0MA. The WifiScan sketch run fines but when i try to run WifiUDPEchoServer i get this error: WiFiUDPEchoServer 1.0 Digilent, Copyright 2012

Connection Created, ConID = 1 Error in initializing, status: 40 Something went wrong, sketch is done.

And in the NetworkProfile.x file is added everything for cerebot MX3cK. Please help me!