chipKIT® Development Platform

Inspired by Arduino™

Max32 with a WiFiShield

Created Tue, 23 Apr 2013 20:28:32 +0000 by Vigaro


Vigaro

Tue, 23 Apr 2013 20:28:32 +0000

Has anyone gotten the max32 to work with the WIFI shield? I want a link from wifi module to PC, phone, etc. I have a router to help


thepascalix

Tue, 30 Apr 2013 08:44:57 +0000

hi, excuse for my bad english. I've try the wifishield on my max32 board and try the example provided from the mpide, in particular the tcp client, the tcp server and network scan. It work properly. Have you any problem on use this?


Vigaro

Tue, 30 Apr 2013 12:47:27 +0000

Yes, I have a problem in MPIDE. I uploaded the WiFiTCPEchoClient to the board but I can't get the program to pass the "DNETcK::begin();" command...

I don't get any error, but nothing below that command gets done...


thepascalix

Tue, 30 Apr 2013 14:47:04 +0000

hi, in the wifi server/client tcp example provided by the mpide, have you set the correct setting, in terms of ssid, ip and key? I try this examples with my wireless router setted in wpa2 AES


Vigaro

Tue, 30 Apr 2013 16:18:36 +0000

Yes I believe so:

  1. I have no password in the router so I chose none of the security parametes (commented them all)
  2. In the IP I write the IP of the server (my PC by a code in JAVA)
  3. In the SSID field I insert the name of my router's network

KeithV

Wed, 01 May 2013 14:34:33 +0000

There are 2 WiFiShields, a B module and a G module. Please look at your MRF24 on the board and see if you have the B or G and use the correct WiFi library for what you have.

For a B module select WiFiShieldOrPmodWiFi.h For the G module select WiFiShieldOrPmodWiFi_G.h

If you use the wrong library, it will compile but not connect.


Vigaro

Fri, 03 May 2013 11:18:49 +0000

Yes, I know it. I reinstalled the libraries and now when I uploaded the WiFiTCPEchoClient to the board it works. But now I have a problem with WiFiTCPEchoServer. I uploaded the program to the board and I can't connect to the server. I try to connect with another wifishield running the WiFiTCPEchoClient and with a java program.

The server stays in "Listening on port:" and never gets connected.


thepascalix

Fri, 03 May 2013 14:32:53 +0000

have you try the executable in DNETcK\examples\TCPEchoServer\PCCode directory?


Vigaro

Fri, 03 May 2013 18:00:59 +0000

Yes, I tried the TCPEchoClient into DNETcK\examples\TCPEchoServer\PCCode directory but I has this error: "Unable to connect to 192.168.1.100:44300".

If I run the WiFiTCPEchoClient in the router appear the wifishield but in WiFiTCPEchoServer nothing appears....

I run the WiFiRemoteWOL and the wifishield appears in the router but again I can't connect the client...

The code stop in "Listening on Port:44300" for all server codes...


KeithV

Tue, 07 May 2013 05:00:13 +0000

Is there a class or something where a bunch of you are trying to do some project? Are you all working on the same network? I am getting the distinct impression that there are IP conflicts going on. Here is the deal, there is no DHCP when you assign a static IP (server example), so it would be real easy for 2 or more people running the same server example on the same network to get a conflict because that same IP is on many chipKITs. If the client (example) works, your are golden as far as the hardware is concerned. So instead of assigning a static IP for the server, remove the IP from the begin(), allow DHCP to assign your network parameters, and once connected print out the IP you were assigned, and then use that one. In general, DHCP will make sure that 2 IPs are not in use at the same time on the network.


KeithV

Tue, 07 May 2013 05:06:03 +0000

OH, and with static IP, your router will have no idea about your static IP because it (the router) did not assign it. By assigning a static IP without an admin adding you to a router table, you are just an anarchist on the network.


Vigaro

Tue, 07 May 2013 13:03:02 +0000

I'm trying to connect my wifi shield with a client in JAVA. In this network works just me and another person, but I already tried this at home (with no one else but me connected to this network) and I did get the same results...

In router's configurations I chose a Dynamic WAN Connection Type.

I made the changes you recommended. The IP that it prints is the same that appears in the DHCP Clients List, but no change occured: if the wifi shield is a client, I can connect it to any server; but if the wifi shield is a server I can't connect it with no client...

What I get is that count = tcpServer.availableClients() = 0.


PICedh

Tue, 07 May 2013 21:14:00 +0000

Hello,

Yes I have a MAX32 with a WIFI shield and I communicate with a router

My code is in lib DNETcK and DWIFIcK in GIT: https://github.com/RobotEdh/RobotChipKit.git