So, I think the ethernet shields that came out are an insanely cool idea. I ordered one right when they came out and I just got it yesterday (Saturday).
For a while, I could not get the assembled and jumper-wired Lantronix shield to respond to any input regardless of what I put to it. Running the example yielded a timeout error.
I did a little more research, in my "Making Things Talk" book, and on page 122 he mentions that the "ConnectMode" from the telnet setup needs to be D4, so it accepts incoming connections.
This got it talking, sort of. In the meantime, I removed the shield completely from the Arduino in order to talk to it directly from my Keyspan serial adapter with HyperTerminal. So, I essentially built a loopback where I telnet to the serial bridge port (10001), type things in, and they should be echoed out the serial, which is wired back through my Keyspan. And, vice versa, where typing in Hyperterminal should be echoed in the telnet window.
Now matter what combination of baud rate, settings, parity, stop bits, I try, in between the serial and the telnet connections it converts to gibberish. I can send characters in either direction, but when it shows up on the other side it's complete garbage, including non-standard ascii characters and other weirdness. (Although the smiley face characters certainly are reassuring!)
I checked troubleshooting tips on the Lantronix website, and they suggested tie-ing the TX and RX lines of the module together so you can loop back characters. When I do this, and telnet to the serial bridge port, it works perfectly, and says "CI192.168.0.102," which corresponds to the IP of the computer I'm using to connect. So, essentially, the Lantonix can understand "itself" when it sends or receives characters, but no other method I try when using the Arduino or the serial adapter of my computer works.
I thought this may be related to hardware handshaking, since most of the time when I try to connect I've been using no flow control. My final experiment, which hasn't really worked, was to take the CTS line and RTS line from the Xport and connect them into the DB9 for my serial adapter, to RTS and CTS respectively (so they are crossed from one side to the other). When I turn on hardware flow control (CTS/RTS) on both sides I simply can't send anything in between Hyperterminal and Telnet. Perhaps I'm doing something wrong there?
I'm using the Lantronix Xport Direct Plus, even tried upgrading its firmware to the latest version 6.5.0.9. If anyone has any ideas I'd be happy to try them out! Thanks in advance.
David
Lantronix Ethernet Shield
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
its probably some wonky configuration thing
one thing is some of my examples use not-9600 baud. try modifying them so they're 9600 whcih is the xport default.
second, theres a demo in the afsoftwareserial file that will just pipe one terminal to another. make sure its 9600 baud and upload it to your arduino, you should be able to use the arduino serial port monitor and poke at it
one thing is some of my examples use not-9600 baud. try modifying them so they're 9600 whcih is the xport default.
second, theres a demo in the afsoftwareserial file that will just pipe one terminal to another. make sure its 9600 baud and upload it to your arduino, you should be able to use the arduino serial port monitor and poke at it
-
- Posts: 20
- Joined: Tue Jun 19, 2007 9:37 pm
I'll give it a shot
I have tried modifying the AFSoftSerial setup call in the examples to 9600, and changing the Xport config to 9600, but I have not tried to tunnel the serial through the Arduino board itself. That way I can confirm the results I got from my Keyspan USB->Serial adapter.
Have the boards been tested with the Xport Direct Plus? I bought it thinking that as a development example I would want the full feature set, possibly reducing the feature set in the future as a way of saving costs. Perhaps something about the Plus model is different from the ones you've tried?
It's definitely a wonky configuration thing. I'll see if I can get anywhere with the alternate serial tunneling method and see what I can do. Thanks!
Have the boards been tested with the Xport Direct Plus? I bought it thinking that as a development example I would want the full feature set, possibly reducing the feature set in the future as a way of saving costs. Perhaps something about the Plus model is different from the ones you've tried?
It's definitely a wonky configuration thing. I'll see if I can get anywhere with the alternate serial tunneling method and see what I can do. Thanks!
-
- Posts: 20
- Joined: Tue Jun 19, 2007 9:37 pm
Comp type
I'm using a Thinkpad Z61t, with Arduino 0010, Windows XP.
The thing that's especially weird about this is that for most of the testing I did yesterday I took the Arduino completely out of the equation and just used the plain serial tunnelling capabilities by telneting to port 10001 on one side and connecting via my virtual Com port on the other side, with my Keyspan adapter. (http://www.keyspan.com/products/usa19hs/)
As Tom Igoe mentions in his book, it should just spit whatever you put in on one side out the other side. With no Arduino software anywhere in that chain it seems like that shouldn't be affecting my results.
The nice thing about the keyspan adapter is the monitoring capabilities, ie, you can listen in on the transactions in hex or ascii without interfering with your terminal application. So, I can see that my serial port is sending out a 0x0D for enter, but when it shows up in the telnet window it's something different. Strange.
David
The thing that's especially weird about this is that for most of the testing I did yesterday I took the Arduino completely out of the equation and just used the plain serial tunnelling capabilities by telneting to port 10001 on one side and connecting via my virtual Com port on the other side, with my Keyspan adapter. (http://www.keyspan.com/products/usa19hs/)
As Tom Igoe mentions in his book, it should just spit whatever you put in on one side out the other side. With no Arduino software anywhere in that chain it seems like that shouldn't be affecting my results.
The nice thing about the keyspan adapter is the monitoring capabilities, ie, you can listen in on the transactions in hex or ascii without interfering with your terminal application. So, I can see that my serial port is sending out a 0x0D for enter, but when it shows up in the telnet window it's something different. Strange.
David
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
-
- Posts: 20
- Joined: Tue Jun 19, 2007 9:37 pm
Clarification
So one of the cool things about the lantronix is that you can use it as a bridge between a telnet prompt and a serial port.
Essentially, I open up two terminal windows, one to 192.168.0.1:10001 (goes into the Lantronix), and the other to COM6, which is my serial adapter. This is different from the telnet port where you do setup/configuration, which is on port 9999.
I've run the TX, RX, and GND lines from your shield to a DB9, where my keyspan is plugged in. So, the whole chain looks like this:
telnet window -> lantronix port 10001 -> serial input/ouput of lantronix -> DB9 -> keyspan -> serial terminal window.
Of course, the other direction works as well. What you type on one end comes out the other end. IE hit enter in your telnet window and you'll see an enter on the serial side. When I couldn't get the sketch to work, I wanted to go back to the basics, and just get this connection working before trying to automate the reads and writes with the arduino.
So, the problem is, when I have this chain setup, enter on one side comes out as gibberish on the other side, and vice versa. Normal characters sometimes come out looking like extended ASCII, etc.
Does this clear things up at all?
Essentially, I open up two terminal windows, one to 192.168.0.1:10001 (goes into the Lantronix), and the other to COM6, which is my serial adapter. This is different from the telnet port where you do setup/configuration, which is on port 9999.
I've run the TX, RX, and GND lines from your shield to a DB9, where my keyspan is plugged in. So, the whole chain looks like this:
telnet window -> lantronix port 10001 -> serial input/ouput of lantronix -> DB9 -> keyspan -> serial terminal window.
Of course, the other direction works as well. What you type on one end comes out the other end. IE hit enter in your telnet window and you'll see an enter on the serial side. When I couldn't get the sketch to work, I wanted to go back to the basics, and just get this connection working before trying to automate the reads and writes with the arduino.
So, the problem is, when I have this chain setup, enter on one side comes out as gibberish on the other side, and vice versa. Normal characters sometimes come out looking like extended ASCII, etc.
Does this clear things up at all?
-
- Posts: 20
- Joined: Tue Jun 19, 2007 9:37 pm
-
- Posts: 20
- Joined: Tue Jun 19, 2007 9:37 pm
Ooops! Forked the thread
Accidentally forked this thread. My questions and feedback are continued here:
http://forums.ladyada.net/viewtopic.php?t=5329
http://forums.ladyada.net/viewtopic.php?t=5329
-
- Posts: 1
- Joined: Fri Feb 27, 2009 1:26 am
Re: Lantronix Ethernet Shield
I think I'm missing something. How do people solve the DB9/TTL discrepancy?
Please be positive and constructive with your questions and comments.