Issue with ethercard library and PROGMEM

Hi,

I’ve been trying the examples included in ethercard library and I’ve discover something strange:

In the original code there is this line:

const char website[] PROGMEM = "www.google.com";

If I let that PROGMEM there I get this:

[webClient]
IP:  192.168.1.136
GW:  192.168.1.1
DNS: 87.216.1.65
DNS failed
SRV: 0.0.0.0

<<< REQ 
<<< REQ 
<<< REQ 
<<< REQ 
<<< REQ 
<<< REQ
...

But if I remove the PROGMEM it works (more or less xD):

[webClient]
IP:  192.168.1.136
GW:  192.168.1.1
DNS: 87.216.1.65
SRV: 173.194.41.20

<<< REQ >>>
HTTP/1.0 400 Bad Request
Content-Type: text/html; charset=UTF-8
Content-Length: 1419
Date: Sat, 24 May 2014 22:17:12 GMT
Server: GFE/2.0

<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 4...

Btw, I don’t know what I could do wrong if I’m calling the function browseURL in this way:

ether.browseUrl(PSTR("/search?q="), "arduino", website, my_callback);

Anyone got the same?

Anyone got the same?

No, but posting ALL of your code is a good idea. There may be something else that is the real cause of the issue you are having.

Ok Here it is: https://github.com/jcw/ethercard/blob/master/examples/webClient/webClient.ino

I've only replaced the last line:

ether.browseUrl(PSTR("/foo/"), "bar", website, my_callback);

with this one:

ether.browseUrl(PSTR("/search?q="), "arduino", website, my_callback);

I have the same issue, did you solve it ?

axwell: I have the same issue, did you solve it ?

Not yet :(

btw, I use an Arduino Nano.