Web client / 2.4G Wifi module


#1

Hi,

I would like to access internet through my mbot using the Wireless Module 2.4G. :slight_smile:

I’ve been using this arduino code (I’ve already upload some arduino code directly into the mCore and made it work)

#include < SPI.h> #include < WiFi.h>

//SSID of your network
char ssid[] = "yourNetwork"; int status = WL_IDLE_STATUS; // the Wifi radio's status

void setup() { // initialize serial: Serial.begin(9600);

// scan for existing networks: Serial.println("Scanning available networks..."); scanNetworks();

// attempt to connect using WEP encryption: /* Serial.println("Attempting to connect to open network..."); status = WiFi.begin(ssid);

Serial.print("SSID: "); Serial.println(ssid);*/

}

void loop () {}

void scanNetworks() { // scan for nearby networks: Serial.println("** Scan Networks **"); byte numSsid = WiFi.scanNetworks();

// print the list of networks seen: Serial.print("SSID List:"); Serial.println(numSsid);

// print the network number and name for each network found: for (int thisNet = 0; thisNet<numSsid; thisNet++) { Serial.print(thisNet); Serial.print(") Network: "); Serial.println(WiFi.SSID(thisNet)); } }

The serial monitor output of this code is :
Scanning available networks... ** Scan Networks ** SSID List:0


Do you know if the 2.4G wireless serial is somehow locked and must be connected to the usb key ?

Can I manage to access any wifi (knowing their SSID) by using arduino and my mCore hardware ?

My robot (2.4G version):
http://store.makeblock.com/product/mbot-robot-kit

Regards,


#2

From past conversations with @tec_support, the WiFi module appears to be using the point-to-point version of the protocol and is locked to the dongle. I have to defer to @tec_support about whether or not you can connect to an external network with the mBot via the WiFi dongle, but my experience so far has been that you cannot. :frowning:


#3

Hi,

I keep trying to connect the mBot to an external network, that’s why I bought this Wifi shield.

I am connecting the wifi shield to the 6pins (5V MOSI GND RST SCK MISO) of the mCore.

However when Im uploading a simple arduino code :

#include < SPI.h>
#include < WiFi.h>

void setup() {
// initialize serial and wait for the port to open:
SPI.begin();
Serial.begin(9600);
while(!Serial) ;

// attempt to connect using WEP encryption:
Serial.println(“Initializing Wifi…”);
printMacAddress();
}

void loop() {
delay(10000);
// scan for existing networks:
Serial.println(“Scanning available networks…”);
//listNetworks();
}

void printMacAddress() {
// the MAC address of your Wifi shield
byte mac[6];

// print your MAC address:
WiFi.macAddress(mac);
Serial.print(“MAC: “);
Serial.print(mac[5],HEX);
Serial.print(”:”);
Serial.print(mac[4],HEX);
Serial.print(":");
Serial.print(mac[3],HEX);
Serial.print(":");
Serial.print(mac[2],HEX);
Serial.print(":");
Serial.print(mac[1],HEX);
Serial.print(":");
Serial.println(mac[0],HEX);
}

The only result that I get is MAC : 0:0:0:0:0:0
Or with another code : “Wifi shield not present”

I think that I will try to update the firmware and maybe my 6 connections pins aren’t enough to connect the wifi shield with the mBot ?


#4

I’d copy @tec_support on this. It’s a topic that seems to be coming up more and more.


#5

Hi BrbBack,

The 2.4G wifi module is designed for mBots to easily establish a wireless connection between the software mBlock and mBot. It doesn’t support connecting mBot to Internet.

From the description of the wifi shield, it looks like you can do that since mCore is base on arduino uno, While since we don’t have such wifi shield and haven’t done any research on this part, I am afraid we don’t have enough ability to support on such project. Hope you can figure it out.


#6