Go Down

Topic: wi-shiled doesn't works in infra mode (Read 447 times) previous topic - next topic

jonyjakee

hi, i am connected my wi-shiled's wifi signal to my laptop wifi in adhoc mode. but when i program with infra mode, my wi-shiled indicator led itself not glowing and i couldnt see my wishiled's wifi signal name in my laptop.

And also i couldnt set the security WEP or WPA, WPA-2.

please help me to connect with the security and also to connect to my android phone.

Quote

/*
* A simple sketch that uses WiServer to serve a web page
*/


#include <WiServer.h>

#define WIRELESS_MODE_INFRA   1
#define WIRELESS_MODE_ADHOC   2

// Wireless configuration parameters ----------------------------------------
unsigned char local_ip[] = {192,168,43,9};   // IP address of WiShield
unsigned char gateway_ip[] = {192,168,43,1};   // router or gateway IP address
unsigned char subnet_mask[] = {255,255,255,0};   // subnet mask for the local network
const prog_char ssid[] PROGMEM = {"androidAP7925"};      // max 32 bytes
int ON, OFF;
unsigned char security_type = 0;   // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2

// WPA/WPA2 passphrase
const prog_char security_passphrase[] PROGMEM = {"12345678"};   // max 64 characters

// WEP 128-bit keys
// sample HEX keys
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,   // Key 0
              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   // Key 1
              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   // Key 2
              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00   // Key 3
            };

// setup the wireless mode
// infrastructure - connect to AP
// adhoc - connect to another WiFi device
unsigned char wireless_mode = WIRELESS_MODE_ADHOC;

unsigned char ssid_len;
unsigned char security_passphrase_len;
// End of wireless configuration parameters ----------------------------------------


// This is our page serving function that generates web pages
boolean sendMyPage(char* URL) {
 
   // Check if the requested URL matches "/"
   if (strcmp(URL, "/") == 0) {
       
       WiServer.print("<html>");
       WiServer.print("<center>hi</center>");
       WiServer.print("</html>");
       return true;
   }
}


void setup() {

 WiServer.init(sendMyPage);
 Serial.begin(57600);
 WiServer.enableVerboseMode(true);

}

void loop(){

 // Run WiServer
 WiServer.server_task();
}




PaulS

Quote
hi, i am connected my wi-shiled's wifi signal to my laptop wifi in adhoc mode. but when i program with infra mode, my wi-shiled indicator led itself not glowing and i couldnt see my wishiled's wifi signal name in my laptop.

The physic took the summer off. We don't play guessing games without the physic to give us a fair chance.

Which WiFi shield are you talking about?

jonyjakee

Quote
Which WiFi shield are you talking about?


wi-shield 2.0 is what i am using.

PaulS

Quote
wi-shield 2.0 is what i am using.

31 posts and you still can't provide a link? I'm beginning to get the impression that you don't really want help.

jonyjakee

hi pauls, i apalogise for my poor english. i am not getting you many times. i think this is the link what you expect.

http://asynclabs.com/store?page=shop.product_details&product_id=26&vmcchk=1 :smiley-roll:

Go Up