WIFI PLUS CLICK PROBLEMS(Does not work after scan)

General discussion on Libstock website & codes posted on this website.
Post Reply
Author
Message
akintoye
Posts: 1
Joined: 16 Feb 2013 15:08

WIFI PLUS CLICK PROBLEMS(Does not work after scan)

#1 Post by akintoye » 16 Feb 2013 15:46

I am having some serious difficulty with my wifi plus click board. I am using the "Network WIFI PIC" library provided on libstock.
I have tried to run the WIFI_HTTP_DEMO example. It does not work!!!
The microcontroller I am using is an 18F45K22 running at 20MHz with PLL disabled. The microcontroller is configured correctly and runs every other program except WIFI_HTTP_DEMO. :roll:

As you can imagine, this is a source of great frustration for me. I have made an effort to debug the code myself by disabling certain parts of it. The result of this is that everything is in order until I try to scanSSID();

Code: Select all

 response = 1;
  while(response != 0)
    response = Net_Wireless_MCW1001_SetMode(_NET_WIRELESS_MCW1001_CP_1, _NET_WIRELESS_MCW1001_MODE_INFRASTRUCTURE); // Set "Connection Profile 1" mode (Ad-Hoc mode)

  

I get a "response", Zero (which means no errors)
and then I proceed to SET CHANNEL, SECURITY, ETC... All of these seem to work fine.

Things only begin to go south after:

Code: Select all

while(1)
{
          response = Net_Wireless_MCW1001_ScanStart(255, &numOfScanRes);  //SCAN FOR NETWORKS
          if(response == 0)                                                                       
            break;
          Delay_ms(500);
  }
The "numOfScanRes" returns 3 or 4 depending on the number of networks in the area. So I know it works.

Code: Select all

for(i = 1; i <= numOfScanRes; i++) {
      response = Net_Wireless_MCW1001_GetScanResult(i);
      strncpy(strTmp, Net_Wireless_MCW1001_ScanResult.SSID, Net_Wireless_MCW1001_ScanResult.SSIDLength);
}
This seems to be the faulty code. If I uncomment this part of the code, the entire program just does not work!!!!!

User avatar
dejan.odabasic
mikroElektronika team
Posts: 2649
Joined: 30 Apr 2012 14:20

Re: WIFI PLUS CLICK PROBLEMS(Does not work after scan)

#2 Post by dejan.odabasic » 20 Feb 2013 11:11

Hello,

I believe that I have contacted you regarding this question on our Help Desk, I suggest that we continue our correspondence there.

Best regards.

tangram
Posts: 2
Joined: 05 Sep 2013 16:01

Re: WIFI PLUS CLICK PROBLEMS(Does not work after scan)

#3 Post by tangram » 05 Sep 2013 16:24

This thread was interesting because I too am trying to get the wifi click demo working on a 18F45K22 PIC chip. I am using the Ready for PIC board instead of the EasyPIC 7 dev system.

I do get connected, I do see my mac on the router tables but I can NEVER ping or access the little web server. I changed my router to match the demo so only modified code to use E1 instead of port E2.

So would be interested in knowing what the "Help Desk" resolution to this thread was. Maybe it does not work on this chip / board and that would be ok, just tired of trying to make it work.

Thanks.

User avatar
dejan.odabasic
mikroElektronika team
Posts: 2649
Joined: 30 Apr 2012 14:20

Re: WIFI PLUS CLICK PROBLEMS(Does not work after scan)

#4 Post by dejan.odabasic » 06 Sep 2013 12:39

Hello,

Most probably, you need to adjust the IP addresses to match your network configuration.
Make sure that your WiFi click and your PC IP addresses belongs to the same subnet.

Best regards.

tangram
Posts: 2
Joined: 05 Sep 2013 16:01

Re: WIFI PLUS CLICK PROBLEMS(Does not work after scan)

#5 Post by tangram » 06 Sep 2013 15:15

Thank you for your quick reply.

Subnet is a good suggestion. My setup does match the demo. I have an extra wifi router I simply modified it to the subnet and dhcp range to match. I am still using static IP in the demo.

One thought came to mind, the Ready for PIC board comes with a 8M crystal, but the chip has a multiplier that bumps it to 32M. Because everything connects and the wifi click finds all (about 8) SSIDs in the area I expect that is not the issue. I can look in my parts bin and to try a faster crystal.

From your reply I gather you think my set up should work - I will tinker some more. Thanks

Love you products, this one is a puzzler to get working.

atolex
Posts: 1
Joined: 28 Apr 2014 23:12

Re: WIFI PLUS CLICK PROBLEMS(Does not work after scan)

#6 Post by atolex » 28 Apr 2014 23:24

akintoye wrote:I am having some serious difficulty with my wifi plus click board. I am using the "Network WIFI PIC" library provided on libstock.
I have tried to run the WIFI_HTTP_DEMO example. It does not work!!!
The microcontroller I am using is an 18F45K22 running at 20MHz with PLL disabled. The microcontroller is configured correctly and runs every other program except WIFI_HTTP_DEMO. :roll:

As you can imagine, this is a source of great frustration for me. I have made an effort to debug the code myself by disabling certain parts of it. The result of this is that everything is in order until I try to scanSSID();

Code: Select all

 response = 1;
  while(response != 0)
    response = Net_Wireless_MCW1001_SetMode(_NET_WIRELESS_MCW1001_CP_1, _NET_WIRELESS_MCW1001_MODE_INFRASTRUCTURE); // Set "Connection Profile 1" mode (Ad-Hoc mode)

  

I get a "response", Zero (which means no errors)
and then I proceed to SET CHANNEL, SECURITY, ETC... All of these seem to work fine.

Things only begin to go south after:

Code: Select all

while(1)
{
          response = Net_Wireless_MCW1001_ScanStart(255, &numOfScanRes);  //SCAN FOR NETWORKS
          if(response == 0)                                                                       
            break;
          Delay_ms(500);
  }
The "numOfScanRes" returns 3 or 4 depending on the number of networks in the area. So I know it works.

Code: Select all

for(i = 1; i <= numOfScanRes; i++) {
      response = Net_Wireless_MCW1001_GetScanResult(i);
      strncpy(strTmp, Net_Wireless_MCW1001_ScanResult.SSID, Net_Wireless_MCW1001_ScanResult.SSIDLength);
}
This seems to be the faulty code. If I uncomment this part of the code, the entire program just does not work!!!!!
//////////////////////
*****************
I have the same problem, what is the solution?

Please :? :(

Post Reply

Return to “Libstock Discussion”