nilust asked: Thanks a lot for all the efforts! I see a line of code about connecting to pachube in webclientgetpost, i am actually trying to send the data from my temperature and humidity sensor to pachube using wifly gsx breakout, but i have no idea how to do so as i am new to arduino and wifly. Any ideas how i can modify the code of webclientgetpost to get it done? Thanks a lot
Oops - you caught a leftover from a project that did exactly that (and some more). Good spotting!
Pachube wants an HTML PUT message.
Send a command to get a connection:
open api.pachube.com 80
then a header with a body length
PUT /v2/feeds/<your feed#>.csv HTTP/1.1\r\n
Host: api.pachube.com \r\nX-PachubeApiKey: <your key> \r\nContent-Length: <needs length of body>
and finally the body:
0, <temp>\r\n
1,<humidity>\r\n
Alternatively, for the conspiracy-minded, its a … clue (yeah!) to … um … a thing (yup, really)! That leads to … another clue! With a secret society, known only as the Arduiniati … And if you run it backwards, it … wait - there’s someone at the doo…
9:59 pm • 12 January 2012
classyfied-arduino asked: Hello! First of all, thanks for the Library, it has been a big help in my project. It all works fine, but I have an space problem. I have an rfid reader with arduino (from libelium) and my intention is to send all the information readed via wifi. The problem is that I get out of sram... I have tried to optimize my code but there is no way to make it work. Only the call: WiFly(ARDUINO_RX_PIN ,ARDUINO_TX_PIN); consumes 400 bytes that are not freed anymore. Is there anyway to make WiFly lighter?
<wince> yes, there are some memory-hungry parts to the whole animal. Some are under direct control and have flexibility, others not so much.
An upcoming version of this library may be slightly lighter on ram consumption; it is a few weeks away. Say posted for a teaser.
Some items that you may or may not have tried:
- move as many strings etc as possible out of ram into program space. More could be done in WiFlySerial I’ll admit.
- re-use buffers aggressively
- Store as little as necessary.
- investigate some of the less-readable but memory-saving coding techniques out there (maybe not Obfuscating C).
- C strings not C++ (same for all coding).
- be less fancy, but stick to core needed functionality only.
… how big is your gap?
Cheers,
7:24 pm • 4 January 2012
Java UDP?
A question came up about a java server class for UDP sockets in place of nc.
Fortunately there are many examples available:
Look at www.cs.uic.edu/~troy/spring05/cs450/sockets/socket.html
or just google ‘java udp socket example’.
Cheers,
8:52 pm • 29 December 2011
nc options for UDP Sample
Here’s a mnemonic: Yes, the UDP Sample wants some love from nc to demonstrate Arduino UDP signals. Give it “nc -luv” so nc listens (-l) for UDP (-u) verbosely (-v).
No, I’m not the first with this one. Bonus points to the finder of the first such reference to nc’s options.
Cheers,
8:49 pm • 29 December 2011
bitbass asked: I got it working! See here: or not...I'd point you to my blog post but I can't put in links. Google "RN-XV arduino" and it's already the 5th link.
Glad to hear it is going!
(If I’m interpreting bitbass’ site correctly, it was about spaces and $ in the WPA2 password … the RN131 normally expects spaces to be encoded as $’s. There are native RN131 commands to support a workaround but the library could be better at handling it. An item for the next version… )
Cheers,
11:42 am • 10 December 2011
bitbass asked: Ok, I moved the freememory files over from the WebTime sketch and now the tester works. However, I'm getting AUTH-ERR as the response. Double checked the SSID and the key and they are correct. It shows the mode as WPA2 but is there something I need to force to make it WPA2-PSK?
Hi bitbass,
The software was developed on a mixed-mode WPA/WPA2 wlan…with ‘set wlan auth 3’ … you might want mode 4 if you’re on pure WPA2.
Do check the RN131 manual regarding spaces and $ in passwords; these need to be managed with more care.. see page 19 on the topic. Either way - let me know how it goes!
9:19 pm • 9 December 2011
Socket layer approaching done…
Passed basic testing, wants some cleanup and support of ad-hoc networks, but otherwise ‘functions’.
A ‘Processing’-like layer is next, to align the WiFly’s interface with common Arduino approaches and to make for an easy transition from Ethernet projects.
Cheers,
12:53 pm • 24 September 2011
WiFly HTTP Client Example available…
Hi all,
Some adventurous developers have encountered challenges when trying to get the WiFly to read web pages; not all of what is required appears in the formal manual.
To aid those intrepid spirits, a functioning http client example has been formed and posted to SourceForge. With typical originality it is named WebClientGetPost.
It demonstrates parameterized GET and POST actions. A pair of .php server-side scripts go with it for the demo to work against.
It is packaged within the .zip and in its own file folders.
Constructive comments are welcome.
Enjoy!
9:45 pm • 24 August 2011 • 6 notes
Almost there…
… the oft-requested http client example is nearly done.
A few interruptions including injuries, flu, summer, hikes, camping, boating and a blown UNO board.
the GET example now works (hint: the WiFly manual is incorrect), doing a PUT and retrieval example in as well.
The “Pg 40” approach will wait until the above are completed.
Cheers,
8:45 pm • 20 August 2011 • 1 note
Http client coming soon
Hi all,
Two recent requests have come forth for an http client demo…
I’ll clean up some highly-experimental snippets and post in the coming week or so.
… Sunshine and warmth finally arrived in this vicinity and have impacted code-development time.
(No, I don’t take the laptop to the beach; sand gets into the keyboard).
Cheers,
10:44 am • 6 August 2011 • 1 note