Wifly rn-xv + XBee shield
#1
Posted 17 February 2012 - 01:36 PM
#2
Posted 17 February 2012 - 02:35 PM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#3
Posted 17 February 2012 - 03:26 PM
#4
Posted 17 February 2012 - 03:39 PM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#5
Posted 21 February 2012 - 02:59 PM
#6
Posted 21 February 2012 - 03:28 PM
Was your board damaged? I just told you my experience, not to actually solder a thing. Not sure which contact you just made?I soldered a wire but unfortunately that's not the solution, because now the Din led of the XBee shield lights, but nothing it's received or written on the Wifly.
It sounds like your shield is broken in some way though. Lets test some stuff first.
- First, stack your Netduino, XBee Shield and Wifly module. Don't put power on it just yet.
- Now measure the resistance between Netduino pin D0 and pin 2 (DOUT) of the wifly module. This should be close to 0.
- Do the same for pin D1 on the Netduino and pin 3 (DIN) on the wifly. Should also be close to 0.
- Now measure the resistance between Ground on the Netduino and pin 10 (Gnd) on the wifly. Should be close to 0.
- Next, the resistance between pins D0 and D1 should be infinite.
- Now power on your Netduino
- Measure the voltage between pins 1 and 10 on the Wifly module. Should be approx. 3.3V
Just to be sure everything is working fine.
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#7
Posted 21 February 2012 - 03:43 PM
#8
Posted 22 March 2012 - 01:26 PM
#9
Posted 22 March 2012 - 01:47 PM
Ohh that's interesting, do you have a direct link to the issue? Perhaps others could experience the same thing.So again, sorry for my late replay and thank you Stefan for all the help you provide me.
Thanks for posting!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#10
Posted 22 March 2012 - 02:46 PM
#11
Posted 11 June 2012 - 05:52 PM
#12
Posted 11 June 2012 - 05:57 PM
Depends on the type.Hi Stefan,
i'm just finished doing the retrofit to the sparkfun sheild, and am about to light it up.
one question i had was how to deal with a proxy server. do you know how i can set that up?
thanks
Many proxy servers would work like this:
HTTP_Client WebSession = new HTTP_Client(new IntegratedSocket("proxyhost", 8080)); // Requests the latest source HTTP_Client.HTTP_Response Response = WebSession.Get("http://www.netmftoolbox.com/helloworld/");
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#13
Posted 22 June 2012 - 12:53 PM
Hi Stefan,HI fritzE and welcome to the forums
Depends on the type.
Many proxy servers would work like this:
HTTP_Client WebSession = new HTTP_Client(new IntegratedSocket("proxyhost", 8080)); // Requests the latest source HTTP_Client.HTTP_Response Response = WebSession.Get("http://www.netmftoolbox.com/helloworld/");
that works. Thanks. I cat do a HTTP put to cosm. i tried your http_client class to get from cosm, and got some funny behaviors. Looks like the connection is retrying a couple of times. the symptom is that the cookies gets scrogged because it is taking the first header info, not the latest which is corect. here is a trace of the ResponseData in _doRequest:
HTTP/1.1 200 OK
Date: Fri, 22 Jun 2012 12:42:55 GMT
Content-Type: text/plain; charset=utf-8
Connection: close
Last-Modified: Thu, 21 Jun 2012 02:14:12 GMT
X-Runtime: 65
X-Pachube-Logging-Key: logging.pxLV3knPodCwvjx73Nis
Content-Length: 408
X-PachubeRequestId: d4537ff8cf384d60c00283b4fee6c080492e0222
Set-Cookie: _pachcore_app_session=BAh7BjoPc2Vzc2lvbl9pZCIlZjBjNmFkZDU4ZTFmZWJlNWEHTTP/1.1 200 OK
Date: Fri, 22 Jun 2012 12:42:55 GMT
Content-Type: text/plain; charset=utf-8
Connection: close
Last-Modified: Thu, 21 Jun 2012 02:14:12 GMT
X-Runtime: 65
X-Pachube-Logging-Key: logging.pxLV3knPodCwvjx73Nis
Content-Length: 408
X-PachubeRequestId: d4537ff8cf384d60c00283b4fee6c080492e0222
Set-Cookie: _pachcore_app_session=BAh7BjoPc2Vzc2lvbl9pZCIlZjBjNmFkZDU4ZTFmZWJlNWE5YmEzNWJiNmExZDUxN2M%3D--596913f0ea16c484f53571bc02d23b6083b62416; domain=.cosm.com; path=/; expires=Fri, 06-Jul-2012 12HTTP/1.1 200 OK
Date: Fri, 22 Jun 2012 12:42:55 GMT
Content-Type: text/plain; charset=utf-8
Connection: close
Last-Modified: Thu, 21 Jun 2012 02:14:12 GMT
X-Runtime: 65
X-Pachube-Logging-Key: logging.pxLV3knPodCwvjx73Nis
Content-Length: 408
X-PachubeRequestId: d4537ff8cf384d60c00283b4fee6c080492e0222
Set-Cookie: _pachcore_app_session=BAh7BjoPc2Vzc2lvbl9pZCIlZjBjNmFkZDU4ZTFmZWJlNWE5YmEzNWJiNmExZDUxN2M%3D--596913f0ea16c484f53571bc02d23b6083b62416; domain=.cosm.com; path=/; expires=Fri, 06-Jul-2012 12:42:52 GMT; HttpOnly
Age: 3
Cache-Control: max-age=86400
Vary: Accept-Encoding
30,2012-06-21T01:03:54.979682Z,38
60,2012-06-21T01:03:54.979682Z,90
90,2012-06-21T01:03:54.979682Z,6
120,2012-06-21T01:03:54.979682Z,61
150,2012-06-21T01:03:54.979682Z,53
GO,2012-06-21T01:03:54.979682Z,1
30,2012-06-21T02:14:12.401906Z,58
60,2012-06-21T02:14:12.401906Z,91
90,2012-06-21T02:14:12.401906Z,69
120,2012-06-21T02:14:12.401906Z,75
150,2012-06-21T02:14:12.401906Z,93
GO,2012-06-21T02:14:12.401906Z,0
ANy ideas?? Thanks.
#14
Posted 22 June 2012 - 02:18 PM
This seemed to have fixed it:Hi Stefan,
that works. Thanks. I cat do a HTTP put to cosm. i tried your http_client class to get from cosm, and got some funny behaviors. Looks like the connection is retrying a couple of times. the symptom is that the cookies gets scrogged because it is taking the first header info, not the latest which is corect. here is a trace of the ResponseData in _doRequest:
HTTP/1.1 200 OK
Date: Fri, 22 Jun 2012 12:42:55 GMT
Content-Type: text/plain; charset=utf-8
Connection: close
Last-Modified: Thu, 21 Jun 2012 02:14:12 GMT
X-Runtime: 65
X-Pachube-Logging-Key: logging.pxLV3knPodCwvjx73Nis
Content-Length: 408
X-PachubeRequestId: d4537ff8cf384d60c00283b4fee6c080492e0222
Set-Cookie: _pachcore_app_session=BAh7BjoPc2Vzc2lvbl9pZCIlZjBjNmFkZDU4ZTFmZWJlNWEHTTP/1.1 200 OK
Date: Fri, 22 Jun 2012 12:42:55 GMT
Content-Type: text/plain; charset=utf-8
Connection: close
Last-Modified: Thu, 21 Jun 2012 02:14:12 GMT
X-Runtime: 65
X-Pachube-Logging-Key: logging.pxLV3knPodCwvjx73Nis
Content-Length: 408
X-PachubeRequestId: d4537ff8cf384d60c00283b4fee6c080492e0222
Set-Cookie: _pachcore_app_session=BAh7BjoPc2Vzc2lvbl9pZCIlZjBjNmFkZDU4ZTFmZWJlNWE5YmEzNWJiNmExZDUxN2M%3D--596913f0ea16c484f53571bc02d23b6083b62416; domain=.cosm.com; path=/; expires=Fri, 06-Jul-2012 12HTTP/1.1 200 OK
Date: Fri, 22 Jun 2012 12:42:55 GMT
Content-Type: text/plain; charset=utf-8
Connection: close
Last-Modified: Thu, 21 Jun 2012 02:14:12 GMT
X-Runtime: 65
X-Pachube-Logging-Key: logging.pxLV3knPodCwvjx73Nis
Content-Length: 408
X-PachubeRequestId: d4537ff8cf384d60c00283b4fee6c080492e0222
Set-Cookie: _pachcore_app_session=BAh7BjoPc2Vzc2lvbl9pZCIlZjBjNmFkZDU4ZTFmZWJlNWE5YmEzNWJiNmExZDUxN2M%3D--596913f0ea16c484f53571bc02d23b6083b62416; domain=.cosm.com; path=/; expires=Fri, 06-Jul-2012 12:42:52 GMT; HttpOnly
Age: 3
Cache-Control: max-age=86400
Vary: Accept-Encoding
30,2012-06-21T01:03:54.979682Z,38
60,2012-06-21T01:03:54.979682Z,90
90,2012-06-21T01:03:54.979682Z,6
120,2012-06-21T01:03:54.979682Z,61
150,2012-06-21T01:03:54.979682Z,53
GO,2012-06-21T01:03:54.979682Z,1
30,2012-06-21T02:14:12.401906Z,58
60,2012-06-21T02:14:12.401906Z,91
90,2012-06-21T02:14:12.401906Z,69
120,2012-06-21T02:14:12.401906Z,75
150,2012-06-21T02:14:12.401906Z,93
GO,2012-06-21T02:14:12.401906Z,0
ANy ideas?? Thanks.
private HTTP_Response _DoRequest(string RequestData) { // Opens the connection this._Socket.Connect(); // Sends out the request this._Socket.Send(RequestData); // Fetches the returned data string ResponseData = ""; string tmp = ""; while (this._Socket.IsConnected || this._Socket.BytesAvailable > 0) { tmp = this._Socket.Receive(); if (tmp.IndexOf("HTTP/1.1 200 OK") >= 0) { Debug.Print("found OK HEADER at " + tmp.IndexOf("HTTP/1.1 200 OK") + ", resetting input string"); ResponseData = tmp; } else ResponseData += tmp; } // Closes the connection this._Socket.Close(); // Parses the response data HTTP_Response RetVal = new HTTP_Response(ResponseData); // Parses cookies and such this._ParseHeaders(RetVal.GetAllHeaders()); return RetVal; }
Edited by Stefan, 22 June 2012 - 02:48 PM.
Added [code] tags
#15
Posted 22 June 2012 - 02:41 PM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#16
Posted 22 June 2012 - 02:45 PM
in this case:
else if (_SerialPort_EndStreamCheck == this._SocketCloseString) { this._Mode = Modes.Idle; _DebugPrint('D', "2 Left streaming mode"); NewBuffer = ""; } this._SerialPort_StreamBuffer = NewBuffer;when the new $$$ is sent, the response has an extra <2.32>... any ideas here? see below:
I: 2.401906Z,93\nG
I: O,2012-06-21
I: T02:14:12.40
I: 1906Z,0*CLOS
I: *
D: 2 Left streaming mode
30,2012-06-21T01:03:54.979682Z,38
60,2012-06-21T01:03:54.979682Z,90
90,2012-06-21T01:03:54.979682Z,6
120,2012-06-21T01:03:54.979682Z,61
150,2012-06-21T01:03:54.979682Z,53
GO,2012-06-21T01:03:54.979682Z,1
30,2012-06-21T02:14:12.401906Z,58
60,2012-06-21T02:14:12.401906Z,91
90,2012-06-21T02:14:12.401906Z,69
120,2012-06-21T02:14:12.401906Z,75
150,2012-06-21T02:14:12.401906Z,93
GO,2012-06-21T02:14:12.401906Z,0*CLOS
O: $$$
I: <2.32> CMD\r\n
Thanks!
Edited by Stefan, 22 June 2012 - 02:48 PM.
Added [code] tags
#17
Posted 22 June 2012 - 02:51 PM
The closing of a stream was somewhat buggy. Not sure if you noticed this comment?
// The closing string (default: "*CLOS*") is many times sent in multiple packets. // This causes annoying issues of connections not shutting down well. // This fixes that issue, but it's possible the last few bytes of the stream contain something like "*CL" or something.
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#18
Posted 22 June 2012 - 03:53 PM
Yes, I did. the reason i brought it up is that the WiFly is hanging after i get that response. my guess was that it wasn't finding CMD in response to $$$, but didn't get that far. I'm trying to do 100 loops of HTTP Get from Cosm. it gets to 10-15 before failing....The <2.32> is the prompt of the wifly module. It's not really ment to be just a wifi module, it's ment as a serial to wifi socket bridge. I just abuse it to be able to do other stuff.
The closing of a stream was somewhat buggy. Not sure if you noticed this comment?// The closing string (default: "*CLOS*") is many times sent in multiple packets. // This causes annoying issues of connections not shutting down well. // This fixes that issue, but it's possible the last few bytes of the stream contain something like "*CL" or something.
#19
Posted 22 June 2012 - 04:30 PM
Very interesting! As I said, I'm short in time currently, and the toolbox is 'just a hobby project', so it doesn't have high priority for now. But as soon as I have some free time, I'll look into it.Yes, I did. the reason i brought it up is that the WiFly is hanging after i get that response. my guess was that it wasn't finding CMD in response to $$$, but didn't get that far. I'm trying to do 100 loops of HTTP Get from Cosm. it gets to 10-15 before failing....
If you find a solution, please let me know, I'll add it in and give you proper credits for it of course!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#20
Posted 22 June 2012 - 11:51 PM
Though I feel like I'm masking symptoms, this seems to correct that particular problem:Very interesting! As I said, I'm short in time currently, and the toolbox is 'just a hobby project', so it doesn't have high priority for now. But as soon as I have some free time, I'll look into it.
If you find a solution, please let me know, I'll add it in and give you proper credits for it of course!
private void _SerialPort_LineReceived(string Text) { _DebugPrint('I', Text + "\r\n"); // Did we enter command mode? if (Text == "CMD" && this._Mode == Modes.Idle) { this._Mode = Modes.CommandMode; _DebugPrint('D', "Successfully enterred the command mode"); return; } else { if (Text.IndexOf("CMD") >= 0) { Debug.Print("FOUND CMD IN STRING: " + Text); this._Mode = Modes.CommandMode; _DebugPrint('D', "Pretending to Successfully enterred the command mode"); return; } }There are couple other issues... I'll post when i have more to say about..
thx
Edited by Stefan, 23 June 2012 - 08:07 AM.
Added [code] tags
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users