Pages: [1]   Go Down
Author Topic: Arduino UNO + SD wireless shield  (Read 253 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

First of all im really new to Arduino and electronics in general.

Somebody got me and Arduino UNO and the SD wireless shield for christmas.

My problem is when i run the code that detects if the SD wireless shield
is present or not, it always return not present.

I have been able to write to the SD port using a SD card i have.
Also i have been able to get power through the Shield to power an LED.

But i get no power light or any light on the shield its self.

Will the shield only show as present if i have a wifi module plugged into
the correct position?

Thanks in advance

Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 549
Posts: 46088
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
and the SD wireless shield
A link would be useful.

Quote
Will the shield only show as present if i have a wifi module plugged into
the correct position?
The code you didn't post is not checking for the presence of the shield. Likely it is trying to, and failing to, talk to the WiFi module. If there is no WiFi module generating the correct response, then the error message appears. Of course, it really would be useful to see the code you are talking about.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi PaulS,

Well as we are on this Arduino site I believe it would you knew i would be talking about the shield
you get from this site. But just in case you didnt get that here is a link just for you

http://arduino.cc/en/Main/ArduinoWirelessShield

as for code,

the line, WiFi.status() always returns shield not present.
it always equals false.

So what I was just trying to workout is, will it only show the Wifi.status() == true
if i have for example and Xbee in the socket?

Thanks again
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

WiFi,status() will return "shield not present" if no wifi device is plugged into the socket. It uses SPI communication with the device to determine the status.

This is in WiFi.cpp
Code:
uint8_t WiFiClass::status()
{
    return WiFiDrv::getConnectionStatus();
}
It calls this in /utility/wifi_drv.cpp
Code:
uint8_t WiFiDrv::getConnectionStatus()
{
WAIT_FOR_SLAVE_SELECT();

    // Send Command
    SpiDrv::sendCmd(GET_CONN_STATUS_CMD, PARAM_NUMS_0);

    //Wait the reply elaboration
    SpiDrv::waitForSlaveReady();

    // Wait for reply
    uint8_t _data = -1;
    uint8_t _dataLen = 0;
    SpiDrv::waitResponseCmd(GET_CONN_STATUS_CMD, PARAM_NUMS_1, &_data, &_dataLen);

    SpiDrv::spiSlaveDeselect();

    return _data;
}
And that calls this in /utility/spi_drv.cpp
Code:
void SpiDrv::sendCmd(uint8_t cmd, uint8_t numParam)
{
    // Send Spi START CMD
    spiTransfer(START_CMD);

    //waitForSlaveSign();
    //wait the interrupt trigger on slave
    delayMicroseconds(SPI_START_CMD_DELAY);

    // Send Spi C + cmd
    spiTransfer(cmd & ~(REPLY_FLAG));

    // Send Spi totLen
    //spiTransfer(totLen);

    // Send Spi numParam
    spiTransfer(numParam);

    // If numParam == 0 send END CMD
    if (numParam == 0)
        spiTransfer(END_CMD);

}
And that calls this in spi_drv.cpp. This is the SPI transfer.
Code:
char SpiDrv::spiTransfer(volatile char data)
{
    SPDR = data;                    // Start the transmission
    while (!(SPSR & (1<<SPIF)))     // Wait the end of the transmission
    {
    };
    char result = SPDR;
    DELAY_TRANSFER();

    return result;                    // return the received byte
}
I think that covers it.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi SurferTim,

Thank you for answering,
You have explained what i needed to know
So thank you.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How did his reply help you?  I have been running into the same Wifi shield not present problem and nothing has gotten me any closer to when I started. Arduino Uno R3, Wireless SD and Xbee Module.  Tried IDE's 1.0.5 to 1.5.5, tried AD adapter power vs just USB, tried USB and Micro Serial Select, everything. 

Not real impressed with Arduino so far.  Unless I get a solution in the next day, I'm taking it all back and trying a Yun.
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 549
Posts: 46088
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Unless I get a solution in the next day, I'm taking it all back and trying a Yun.
A Yun doesn't have wireless capabilities built in, so you still need a shield.

Post links to your hardware. While we know what the UNO is, you seem to expect us to know whether the Wireless SD shield is the official one, or not, and you seem to expect us to know which XBees you have and how you have configured them. Define what the other XBee is connected to.

Are the XBees really XBees? Or is the XBee a WiFi device?

Post your code.

Describe, in as much detail as you can, what is, and what is not, working and how you know that something is, or is not, working.

Without doing this, I don't think you'll be happy with the even-more-complex Yun, either.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How did his reply help you?  I have been running into the same Wifi shield not present problem and nothing has gotten me any closer to when I started. Arduino Uno R3, Wireless SD and Xbee Module.  Tried IDE's 1.0.5 to 1.5.5, tried AD adapter power vs just USB, tried USB and Micro Serial Select, everything. 

Not real impressed with Arduino so far.  Unless I get a solution in the next day, I'm taking it all back and trying a Yun.
That library is only for the WiFi shield, not for XBee. It should return "shield not present" because there is no wifi shield connected.

The Yun has built-in wifi, depending on the country you live in. That may be your best bet.

Logged

Pages: [1]   Go Up
Jump to: