Closed jmr13031 closed 11 years ago
Ok, It looks like where you do a void write you need to replace it with a size_t write. Also it looks like the .print(var,BYTE); needs to be replace with a .write(var); BYTE is not supported in 1.0.
I got the WiFly_Webserver running on my 1.0 wifly board. How does one go about sending the changes to the group? ;-)
The usual process is to fork WiFly-Shield, make your changes to your fork, and then make a pull request. The pull request indicates that you want the maintainer of the WiFly-Shield to review your code and merge your branch from your fork into this fork. Btw, it's good practice to make a branch in your fork and have the changes for just this issue in that branch. Then issue the pull request for this branch into the parent's master and I think you can reference this issue in the pull request. Makes sense?
@genetikayos, Seeing that I am new to making changes to a git repo. I have cloned the tree, but I am confused on if I do a branch at this point. Guess it's time to "RTFM" ;-)
I suggest that, instead of cloning this project's tree, you first do project fork in github and then git clone your new fork. That will allow you to upload branches to your own fork and make a pull request from your fork to the parent project.
You know, on second thought, if your changes aren't extensive, just post a patch. The process I was suggesting is really more if you decide to be a regular contributor and contribute extensive changes over time. If your changes are simple, a patch is easy.
I have the patch file, but I seem to be running into a timing issue in the SpiUartDevice::available() function. Under Arduino 0.22 it works fine on my boards. But when I load it under Arduino 1.0 I never see the OPEN. When I put a Serial.print(readRegister(RXLVL)); above the return. I seems to start to work. I am going to hold on the patch file until I dig a little deeper. Time to read the data sheet on the uart.....
On a side note, the shield will not work on a MEGA due to pin changes (newbie issue on my part).
"On the Arduino Duemilanove and other ATmega168 / 328-based boards, the SPI bus uses pins 10 (SS), 11 (MOSI), 12 (MISO), and 13 (SCK). On the Arduino Mega, this is 50 (MISO), 51 (MOSI), 52 (SCK), and 53 (SS)." -James
Any news about this? I'm trying to convert my current project to 1.0 and everything except the wifly library works fine. I would be really great if you update the library to 1.0 compatibility.
+1 on this
Yet another +1
Been away from my arduino for a while. I will try to put together a patch. I hear your +1's ;-) -James
I will send you beer :)
Yeah, I've been away from this and busy with life for a long while, too.
Ok, Here is the "VERY" early version of my patch. Please try it out and let me know issues that you are having....... Tried to push the patch but the git server declined me so sorry for the long post..... James
new file mode 100644 @@ -0,0 +1,272 @@ +From 1113203d3be429524e6390c0cb381191184a2b1f Mon Sep 17 00:00:00 2001 +From: unknown jmr13031@gmail.com +Date: Wed, 21 Dec 2011 09:10:49 -0500 +Subject: [PATCH] Changes for the Arduino 1.0 library interface changes.
+- ++#if ARDUINO >= 100 ++size_t Client::write(byte value) { ++#else
+- ++#if ARDUINO >= 100 ++size_t Client::write(const char *str) { ++#else
+- ++#if ARDUINO >= 100 ++size_t Client::write(const uint8_t *buffer, size_t size) { ++#else
+diff --git a/src/WiFly/Client.h b/src/WiFly/Client.h +index 898532e..d164054 100644 +--- a/src/WiFly/Client.h ++++ b/src/WiFly/Client.h +@@ -18,9 +18,15 @@ class Client : public Print {
++#if ARDUINO >= 100 ++ size_t write(byte value); ++ size_t write(const char str); ++ size_t write(const uint8_t buffer, size_t size); ++#else
+@@ -188,8 +188,11 @@ int SpiUartDevice::read() {
+- ++#if ARDUINO >= 100 ++size_t SpiUartDevice::write(byte value) { ++#else
+- ++#if ARDUINO >= 100 ++size_t SpiUartDevice::write(const char *str) { ++#else
++#if ARDUINO >= 100 ++size_t SpiUartDevice::write(const uint8_t *buffer, size_t size) { ++#else
+diff --git a/src/WiFly/SpiUart.h b/src/WiFly/SpiUart.h +index f00388a..91678f2 100644 +--- a/src/WiFly/SpiUart.h ++++ b/src/WiFly/SpiUart.h +@@ -59,6 +59,15 @@ class SpiUartDevice : public SpiDevice, public Print {
+@@ -66,7 +75,8 @@ class SpiUartDevice : public SpiDevice, public Print {
+- void flush(); ++#endif ++ void flush();
++#if ARDUINO >= 100
++#include
++#endif
+diff --git a/src/WiFly/examples/tools/HardwareFactoryReset/HardwareFactoryReset.pde b/src/WiFly/examples/tools/HardwareFactoryReset/HardwareFactoryReset.pde +index f9a8797..a9dbfeb 100644 +--- a/src/WiFly/examples/tools/HardwareFactoryReset/HardwareFactoryReset.pde ++++ b/src/WiFly/examples/tools/HardwareFactoryReset/HardwareFactoryReset.pde +@@ -54,7 +54,11 @@ void readResponse(int timeOut = 0 /* millisecond */) {
My system is using a version 1 of the shield. I seem to be getting a problem where the SPI_UART is hanging on the incoming serial stream from the shield. Let me know if people are seeing something like this with the newer versions of the shield. The odd part is works under the old Arudion IDE. I hope it is not something with the compiler....... Oh well, Time to RTFM....... ;-) James
Ok, It looks like a timing issue going on. To get the webserver example to work. I had to change the function available() in SpiUart.cpp and add delay(2); It now seems to work ok on my system.
James
delay(2); return (readRegister(RXLVL));
Just did a fork of the git repo, you can find my changes under the jmr13031 fork....... -James
I submitted a pull request that will resolve this issue. Its currently pending.
@jmr13031 : Your fork is working for me, thanks!
jmr13031 fork is working for me too! many thanks. sparkfun needs to pull this...
I appreciate that. I've tried contacting them, but its been a bit hard, but if you let their customer service know, that would probably help.
Bob Breznak 617 863 0262
On Wednesday, May 16, 2012 at 8:43 PM, daneo wrote:
jmr13031 fork is working for me too! many thanks. sparkfun needs to pull this...
Reply to this email directly or view it on GitHub: https://github.com/sparkfun/WiFly-Shield/issues/7#issuecomment-5755831
I will give them a call.... -James On Jun 18, 2012 5:32 AM, "Bob Breznak" < reply@reply.github.com> wrote:
I appreciate that. I've tried contacting them, but its been a bit hard, but if you let their customer service know, that would probably help.
Bob Breznak 617 863 0262
On Wednesday, May 16, 2012 at 8:43 PM, daneo wrote:
jmr13031 fork is working for me too! many thanks. sparkfun needs to pull this...
Reply to this email directly or view it on GitHub: https://github.com/sparkfun/WiFly-Shield/issues/7#issuecomment-5755831
Reply to this email directly or view it on GitHub: https://github.com/sparkfun/WiFly-Shield/issues/7#issuecomment-6391638
Maybe you (@jmr13031) should do a pull-request from your commit? 311156a2ea1226562875e28b40a3d164caa45ada
Just signed up! Hope you don't mind the questions. As I have nothing else to give for a first timer. I have the mega 1280, wifly 2.23 version and hope to connect to cosm. I have make huge progress, but totally need your help. I am using Arduino 1.0.1 but can use anything to get the wifly to work if you know what i mean. Hope you can all help. SO far it just fails to connect using the wifi _SPI library. I am over the most noobie issues such as the pin config and ssid, pphrase. Basically, i am looking for a mentor. Any help would be appreciated. Especially a tutorial.
I'm out of town. I'll try to take a look into this near the end of the week.
Sent from my iPhone
On Sep 17, 2012, at 12:25 AM, techdetect notifications@github.com wrote:
Just signed up! Hope you don't mind the questions. As I have nothing else to give for a first timer. I have the mega 1280, wifly 2.23 version and hope to connect to cosm. I have make huge progress, but totally need your help. I am using Arduino 1.0.1 but can use anything to get the wifly to work if you know what i mean. Hope you can all help. SO far it just fails to connect using the wifi _SPI library. I am over the most noobie issues such as the pin config and ssid, pphrase. Basically, i am looking for a mentor. Any help would be appreciated. Especially a tutorial.
— Reply to this email directly or view it on GitHubhttps://github.com/sparkfun/WiFly-Shield/issues/7#issuecomment-8604129.
Thanks for your reply.
Tonight i used arduino IDE 23 with mega 1280. I followed mgisolutions.blogspot.com/2012/05/arduino-wifly-shield-tutorial.html. I did the "send the following commands..." section and instead of using my home router ssid, i used the my_adhoc_network. I was able to see that on my internet connection display, yeah... prior to that i did the get everything and copied the ip address of the wifly. followed everything from there on. Uploaded the IDE code (compiled correctly Yeah) and tried to open a browser to get the LED on. NO go here. Some of my issues may be that i only have tx/rx pins, 10-13 pins vin pin and grd pin connected to the arduino and shield. I know that i am suppose to have the shield ontop without 10-13 conected but that was from an earlier tutorial. I am stuck at changing the ip address of my computer and net mask so that i can connect to the web server the wifly is at. Have some suggestions. I feel that i have broken some ground here on my problem. Thanks for your reply so quickly before. I hope your travel goes well. Take care. Tried to go with IDE 1.0 as well from the site. Maybe i am missing something on the webclient/webserver, it hangs on connecting.? Maybe i need to reset the wifly to factory and start over. Thanks again. Keep up the good work. Techdetect..
----- Original Message ----- From: "Bob Breznak" notifications@github.com To: "sparkfun/WiFly-Shield" WiFly-Shield@noreply.github.com Cc: "techdetect" williams_1114_eb@comcast.net Sent: Monday, September 17, 2012 6:58:18 AM Subject: Re: [WiFly-Shield] does not compile under arduino 1.0 IDE (#7)
I'm out of town. I'll try to take a look into this near the end of the week.
Sent from my iPhone
On Sep 17, 2012, at 12:25 AM, techdetect notifications@github.com wrote:
Just signed up! Hope you don't mind the questions. As I have nothing else to give for a first timer. I have the mega 1280, wifly 2.23 version and hope to connect to cosm. I have make huge progress, but totally need your help. I am using Arduino 1.0.1 but can use anything to get the wifly to work if you know what i mean. Hope you can all help. SO far it just fails to connect using the wifi _SPI library. I am over the most noobie issues such as the pin config and ssid, pphrase. Basically, i am looking for a mentor. Any help would be appreciated. Especially a tutorial.
— Reply to this email directly or view it on GitHubhttps://github.com/sparkfun/WiFly-Shield/issues/7#issuecomment-8604129.
— Reply to this email directly or view it on GitHub .
I'm closing this particular issue as the library has been updated to compile under 1.0+. If you have any additional updates for the library, either submit a pull request or please open a new issue. Thanks all!
WProgram.h needs to be arduino.h in the 1.0 IDE, Needs something like this in _Spi.h ...
if defined(ARDUINO) && ARDUINO >= 100
include "Arduino.h"
else
include "WProgram.h"
endif
And for some reason, the overloads of "write" function are not working....
In file included from C:\arduino-1.0\libraries\WiFly/WiFly.h:4, from WiFly_WebServer.cpp:9: C:\arduino-1.0\libraries\WiFly/SpiUart.h:62: error: conflicting return type specified for 'virtual void SpiUartDevice::write(byte)' C:\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)' In file included from C:\arduino-1.0\libraries\WiFly/WiFly.h:8, from WiFly_WebServer.cpp:9: C:\arduino-1.0\libraries\WiFly/Client.h:21: error: conflicting return type specified for 'virtual void Client::write(byte)' C:\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)' C:\arduino-1.0\libraries\WiFly/Client.h:23: error: conflicting return type specified for 'virtual void Client::write(const uint8t, size_t)' C:\arduino-1.0\hardware\arduino\cores\arduino/Print.h:50: error: overriding 'virtual size_t Print::write(const uint8t, size_t)'