Ethernet interfering with Xbee
#1
Posted 23 October 2012 - 12:57 PM
I would like to use the netduino as a http server that can request data from sensors connected to Xbee's.
Set up details:
Netduino sending data connected to XBee via XBee Shield. This required that I connect the ICSP header to the Netduino.
The receiving Xbee is connected to a PC via an Xbee USB adapter.
The code on the Netduino for send the data looks like:
SerialPort port = new SerialPort("COM1", 9600);
port.ReadTimeout = 0;
port.Open();
while(true){ //Write H, sleep, write L, sleep }
Is the noise I see because the Ethernet connection is sharing serial connection with the Xbee?
Any assistance would be greatly appreciated.
#2
Posted 23 October 2012 - 04:54 PM
What are you using for an Ethernet connection? If you're using a Netduino Plus, the network feature should be completely separate.Is the noise I see because the Ethernet connection is sharing serial connection with the Xbee?
The XBee interface that you're using...does it implement flow control? Are you losing data bytes--or are the data bytes being corrupted?
Chris
#3
Posted 23 October 2012 - 11:39 PM
I am using an Netduino Plus and its onboard Ethernet connection.What are you using for an Ethernet connection? If you're using a Netduino Plus, the network feature should be completely separate.
Currently I have the Xbee's connected in AT mode. When I watch the normal data come through I see a value a pause (where dots are shown) and then the next value. Even when the Ethernet is not connects values are dropped, but at least 4 in 5 come through . When the Ethernet is connected I see much more data some gaps but mostly its random noiseThe XBee interface that you're using...does it implement flow control? Are you losing data bytes--or are the data bytes being corrupted?
I'm not sure about the flow control question, could you please give more detail?
#4
Posted 24 October 2012 - 01:26 AM
If you're using XBee, you'll generally want to use flow control to make sure that wireless data is not lost as the available bandwidth fluctuates. With wireless, bandwidth changes as RF noise comes and goes.I'm not sure about the flow control question, could you please give more detail?
If you're communicating via the ICSP header, that means you're using SPI. Which is interfacing to another chip. I'd take a look at the SPI data (either debugging via Visual Studio or via a logic analyzer) to see what the data looks like. This will help you isolate whether the data loss is in NETMF, in the XBee shield, or at the target device...which information you can then use to resolve the issue.
Chris
#5
Posted 24 October 2012 - 01:56 AM
As yet I have not considered this in my project. Is this something you would normally do to the serial data. Like numbering the packets to ensure the all arrive?If you're using XBee, you'll generally want to use flow control to make sure that wireless data is not lost as the available bandwidth fluctuates. With wireless, bandwidth changes as RF noise comes and goes.
Is there some documentation that describes how to debug the SPI data via visual studio?If you're communicating via the ICSP header, that means you're using SPI. Which is interfacing to another chip. I'd take a look at the SPI data (either debugging via Visual Studio or via a logic analyzer) to see what the data looks like.
When using a Netduino does writing debug.print message interfere with any of the other serial ports?
#6
Posted 24 October 2012 - 01:07 PM
I plan to hook a logic analyzer over the weekend. For now I have simplified the code to this:
SerialPort port = new SerialPort("COM1", 9600); byte[] bytes = Encoding.UTF8.GetBytes("Simple Test"); port.Open(); while (true) { port.Write(bytes, 0, bytes.Length); port.Flush(); Thread.Sleep(1000); }
Now normally in the receiving Xbee I see this, As you can see there is a bit of noise:
............Simple Test........................................ ............................................................Simple Test..... ............................................................................ ....................Simphe st............................................... .......................................................Sim`la Test.......... ............................................................................ ..............Simple Test................................................... ................................................Simple
When I plugin the network cable in to the Netduino Plus it changes to this:
......p.....................8..........8......8...x................... ..8....................x.................0......Ad.........8................ ...p>.p....................8....................................S.........08 .............`................x..x.x...........8.x...p.......8..8........... ...............................8......0.......X.......8.p...............h@.. ..................x.......................................x..........
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users