Show Posts
Pages: [1] 2 3 ... 413
1  Using Arduino / Storage / Re: SD Storage problem with UNO+wifi shield on: Today at 07:39:27 am
You are probably running out of SRAM. Either reduce the amount of SRAM you are using, or get an Arduino with more SRAM, like a Mega.

The easiest way to reduce the amount of SRAM is using the F() function to keep static strings in program memory.

But without seeing your code, I am just guessing.
2  Using Arduino / Programming Questions / Re: Arduino WiFi Sheild- Unable to connect on: Today at 06:49:19 am
The SSID and the password are right and it connects to wifi also the green led is continuously on, wifi shield is connected.
The same code was working fine before firmware update, after update it is not working with the same code.
Can i get the firmware which is originally programmed in this wifi shield.
If it was working before the upgrade, and isn't now, you must be programming with an IDE (or wifi library) prior to v1.0.4. To use the wifi shield after the upgrade, I recommend IDE v1.0.5 or higher. Using IDE v1.0.5, the wifi shield would not have connected to any server until you upgraded the firmware.

This is presuming you are meaning "unable to connect" is unable to connect to a server, not the wireless network, right?

edit: Try this code. Does it display the firmware version you expect? It should show 1.1.0.
Code:
#include <WiFi.h>
#include <SPI.h>

void setup() {
  Serial.begin(9600);

  // disable SD SPI
  pinMode(4,OUTPUT);
  digitalWrite(4,HIGH);

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while(true);
  }

  // check firmware version
  Serial.print(F("Firmware version: "));
  Serial.println(WiFi.firmwareVersion());.
}

void loop() {
}
3  Using Arduino / Networking, Protocols, and Devices / Re: Wifi shield inexplicable delay (1.6 seconds per packet) on: Today at 01:52:08 am
It is a known problem, and not the only one.
http://forum.arduino.cc/index.php?topic=210164.msg1543210#msg1543210

Here is a post from December 2013 that has a list of the problems and the related reports to the Arduino crew about the wifi shield. AFAIK, none have been fixed.
http://forum.arduino.cc/index.php?topic=207128.msg1523429#msg1523429
4  Using Arduino / Networking, Protocols, and Devices / Re: SMS message truncating at 'W' when sending SMS through SIM900 GSM shield!! on: Today at 01:40:37 am
How are you sending the terminating zero byte? Are you certain it is not the readString function causing the problem with the lower case w? Add a Serial.println() call just before sending the SMS to insure you are sending the entire string.
Code:
  if(Serial.available())
  {
    String s=recieveSerialValue();
// add this
    Serial.println(s);
    sendSMS(s);
  }

I don't recall any AT commands that use a lower case w, especially as a message terminator. Most AT commands are preceded with AT or an ampersand.

5  Using Arduino / Programming Questions / Re: SD Storage problem with UNO+wifi shield on: Today at 01:16:12 am
Without seeing your code, it sounds like you have run out of SRAM. If you try to use more SRAM than you have available, it will wrap around into areas of SRAM used by the serial buffer.

6  Using Arduino / Programming Questions / Re: Arduino WiFi Sheild- Unable to connect on: September 29, 2014, 04:54:11 pm
Insure the ssid and pass phrase is correct. They are case sensitive.
7  Using Arduino / Networking, Protocols, and Devices / Re: Expected outcome of WebClient Example? on: September 29, 2014, 03:25:39 pm
Except for the "Failed to configure Ethernet using DHCP" message, it worked fine. I got the same result using that code, but I didn't get the dhcp fail message.

If you have a SD card in the shield's slot, that can cause the DHCP function to fail.
8  Using Arduino / Programming Questions / Re: Arduino WiFi Sheild- Unable to connect on: September 29, 2014, 11:08:29 am
If it says please update the firmware then you didn't update it
9  Using Arduino / Networking, Protocols, and Devices / Re: SMS message truncating at 'W' when sending SMS through SIM900 GSM shield!! on: September 29, 2014, 07:40:27 am
I counted how many characters are not printed, and it coincidentally ends up being 12 characters. Maybe these lines of code have something to do with it?
Code:
 char txtMsg[msg1.length()-12];
  msg1.substring(13).toCharArray(txtMsg,msg1.length()-12);

edit: Remember to add one character (byte) to the array to allow for the zero terminator.  smiley-wink
Code:
 char txtMsg[msg1.length()+1];
  msg1.substring(13).toCharArray(txtMsg,msg1.length());

edit2: ...and the Serial.read() call may not return all the characters sent. Here is the complete code you posted with the comment at the Serial.read() call. You should wait for a terminator character (like a line feed) before sending the SMS.
Code:
#include <SPI.h>
#include <GSM.h>

#define PINNUMBER ""

// initialize the library instance
GSM gsmAccess;
GSM_SMS sms;

void setup()
{
  Serial.begin(9600);
  boolean notConnected = true;
  sendDataToDisplay("Initializing GSM");
  // Start GSM shield
  // If your SIM has PIN, pass it as a parameter of begin() in quotes
  while(notConnected)
  {
    if((gsmAccess.begin(PINNUMBER)==GSM_READY))
    {
      notConnected = false;
    }
  }
  sendDataToDisplay("GSM Connected");
}

void loop()
{
// this may not get all the characters sent over the serial port before calling sendSMS()
  if(Serial.available())
  {
    String s=recieveSerialValue();
    sendSMS(s);
  }
  else
  {
    recieveSMS();
  }
  delay(2000);
}
String recieveSerialValue()
{
  String m="";
  if (Serial.available() > 0)
  {
    m=Serial.readString();
  }
  return m;
}
void recieveSMS()
{
  char senderNumber[20];
  String message="";
  char c;
  // If there are any SMSs available()  
  if (sms.available())
  {
    sms.remoteNumber(senderNumber, 20);
    // Read message bytes
    while(c=sms.read())
    {
      message+=c;
    }
    sms.flush();
    message=String("1")+senderNumber+String("@")+message;
    Serial.println(message);
  }
}

void sendSMS(String msg1)
{
  char remoteNum[11];  
  //char messageBody[msg1.length()-12]
  msg1.substring(3,13).toCharArray(remoteNum,11);
  char txtMsg[msg1.length()-12];
  msg1.substring(13).toCharArray(txtMsg,msg1.length()-12);
  sendDataToDisplay(txtMsg);
  sms.beginSMS(remoteNum);
  sms.print(txtMsg);
  sms.endSMS();
  sendDataToDisplay("sms sent to " + String(remoteNum));
}

void sendDataToDisplay(String data)
{
  data='0'+data;
  Serial.println(data);
}
10  Using Arduino / Programming Questions / Re: How to parse a char array? on: September 28, 2014, 04:17:13 pm
sscanf also works.
11  Using Arduino / Programming Questions / Re: Wifi led controlling program mistake on: September 28, 2014, 09:30:42 am
The wifi shield server library is a bit unstable. This should display the request.
Code:
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(ch);
12  Using Arduino / Programming Questions / Re: Wifi led controlling program mistake on: September 28, 2014, 06:06:12 am
Take a look at this thread:
http://forum.arduino.cc/index.php?topic=267339.msg1886703
If you have questions after reading that, post them here.

FYI, the wifi shield server library is still a bit unstable.
13  Using Arduino / Programming Questions / Re: "error: 'byte' has not been declared" when in header, not elsewhere on: September 28, 2014, 05:40:46 am
You can take the advice PaulS offered, or use uint8_t instead of byte.

If inside a library, you will either have to include Arduino.h, or stdint.h to use the aliases like uint8_t.
That has not been my experience, but i could be wrong. One of those could have been included in an included file.

edit: Arduino.h has the byte data type as an alias for uint8_t. If the OP had included that file, then byte would have been declared.
14  Using Arduino / Programming Questions / Re: "error: 'byte' has not been declared" when in header, not elsewhere on: September 27, 2014, 08:33:55 pm
You can take the advice PaulS offered, or use uint8_t instead of byte.
15  Using Arduino / Programming Questions / Re: Problem with variable size sent by GET to arduino. on: September 27, 2014, 06:34:59 am
Please post code when you have a problem like that.

You could be overflowing an array or running out of SRAM. If that is a String data type, I presume running out of SRAM.
Pages: [1] 2 3 ... 413