Xport Direct and communicating through web, telnet and other methods
metron9
Posts: 1,100
I finally connected an xport direct from Lantronix up that had been sitting in my drawer for 2 years.
I understand how to connect using a telnet program. Using a BS2 I just did a serial output loop with some text.
Link to pictures http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=93325
How do i connect to this through the web from outside my lan? Do I need to set up a service provider?
For interactive programming monitoring etc..., what programming language should I use to interface with it? Java? or C#? Other interactive telnet solutions?
Can one xport direct telnet to another xport direct to communicate between devices?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
I understand how to connect using a telnet program. Using a BS2 I just did a serial output loop with some text.
Link to pictures http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=93325
How do i connect to this through the web from outside my lan? Do I need to set up a service provider?
For interactive programming monitoring etc..., what programming language should I use to interface with it? Java? or C#? Other interactive telnet solutions?
Can one xport direct telnet to another xport direct to communicate between devices?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Comments
I'm not sure of the step after that. We had people logging in using a simple terminal program like Hyperterminal. However, it is more complex to do the connection in the other direction.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
i can connect to the xport direct internally using the attached hyperterminal ip address 192.168.1.11 and using port 10001
I have port forwarding set in my linksys router port 10001 start end 10001 TCP IP 192.168.1.11
I will leave the device running, can anyone attach to it using hyperterminal or a telnet program?
Do you need the routers external IP 64.122.59.80
So you connect to the external router address and specify port 10001 and then that links you to the xportdirect device?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
115. Hello lantronix Xport Direct World! 116. Hello lantronix Xport Direct World! 117. Hello lantronix Xport Direct World! 118. Hello lantronix Xport Direct World! 119. Hello lantronix Xport Direct World! 120. Hello lantronix Xport Direct World! 121. Hello lantronix Xport Direct World! 122. Hello lantronix Xport Direct World! 123. Hello lantronix Xport Direct World! 124. Hello lantronix Xport Direct World! 125. Hello lantronix Xport Direct World! 126. Hello lantronix Xport Direct World! 127. Hello lantronix Xport Direct World! 128. Hello lantronix Xport Direct World! 129. Hello lantronix Xport Direct World! 130. Hello lantronix Xport Direct World! 131. Hello lantronix Xport Direct World! 132. Hello lantronix Xport Direct World! 133. Hello lantronix Xport Direct World! 134. Hello lantronix Xport Direct World! 135. Hello lantronix Xport Direct World! 136. Hello lantronix Xport Direct World! 137. Hello lantronix Xport Direct World! 138. Hello lantronix Xport Direct World! 139. Hello lantronix Xport Direct World! 140. Hello lantronix Xport Direct World! 141. Hello lantronix Xport Direct World! 142. Hello lantronix Xport Direct World! 143. Hello lantronix Xport Direct World! 144. Hello lantronix Xport Direct World! 145. Hello lantronix Xport Direct World! 146. Hello lantronix Xport Direct World! 147. Hello lantronix Xport Direct World! 148. Hello lantronix Xport Direct World! 149. Hello lantronix Xport Direct World! 150. Hello lantronix Xport Direct World! 151. Hello lantronix Xport Direct World! 152. Hello lantronix Xport Direct World! 153. Hello lantronix Xport Direct World! 154. Hello lantronix Xport Direct World! 155. Hello lantronix Xport Direct World! 156. Hello lantronix Xport Direct World! 157. Hello lantronix Xport Direct World! 158. Hello lantronix Xport Direct World! 159. Hello lantronix Xport Direct World! 160. Hello lantronix Xport Direct World! 161. Hello lantronix Xport Direct World! 162. Hello lantronix Xport Direct World! 163. Hello lantronix Xport Dire2. Hello lantronix Xport Direct World! 3. Hello lantronix Xport Direct World! 4. Hello lantronix Xport Direct World! 5. Hello lantronix Xport Direct World! 6. Hello lantronix Xport Direct World! 7. Hello lantronix Xport Direct World! 8. Hello lantronix Xport Direct World! 9. Hello lantronix Xport Direct World! 10. Hello lantronix Xport Direct World!
using the address http://64.122.59.80:10001
you use the :xxxx after the ip address to specify what port to connect to.
Post Edited (kf4ixm) : 5/9/2010 11:11:35 PM GMT
Now i have signed up at DYN.COM and the port address has a name xporthome.ath.cx but putting a colon and port does not work. I can't find a place to put a specific port number to use the DYN server name service.
Very cool though so far. I plan to write a full application server to allow full avr control via the network, I will interface this to a stamp as well since the stamp does not have interrupts the avr will buffer the data and allow the stamp to request data at it's pace.
Not sure now if the xport allows only one attachment or more than one. What happens if one is connected and another tries to connect, Perhaps the port increments to 10002 and then 10003 as users access, not sure....
Hyperterminal shows the line feeds and Carrage returns, not sure what to send if it's a browser page.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Post Edited (metron9) : 5/9/2010 11:32:21 PM GMT
In simple terms, the devices have addresses 192.168.1.10:3001 and 109.168.1.11:3001 etc
You might have lots of those on your local network.
Then there is your router and that probably has a dynamic IP address. I know that dyndns is a critical part of the system. This links external requests to your computer to each of those internal IP addresses. But for the life of me I can't remember how it links to each one, especially when you have multiple devices on your local network. I'm going through some old emails trying to find the day I worked this out last year. I am hoping that it was some setting that came up in the dyndns setup.
The devices we had used different IP addresses but the port number was fixed at 3001. But I think that got attached to a different port number going out onto the internet.
Addit: I just tested Teraterm and logged in and it works fine. Getting that Hello message back over and over. So it looks like you have a lot working already.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Post Edited (Dr_Acula) : 5/10/2010 12:19:31 AM GMT
I just installed tera term and used the DYN address xporthome.ath.cx and put the port address 10001 as did Dr Acula
I installed an led on the OUTPUT pin of the xport and when I type on the keyboard the led flickers so the PC is sending data.
If the stamp stops sending data however the typing I do does not seem to get to the device (led does not flicker) it seems to still be connected as i again put the serial wire back on the stamp and the data flows to the PC and when I type there is led flickering.
Perhaps there is a necessary data byte to be sent to keep the connection alive or something.
My goal now is to have the device echo what you type via the web. I am reprogramming the stamp to do this, I will post when ready in a few minutes.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Connect and type on your keyboard, it will echo the ascii codes you type
Oh, I have the stamp sending debug codes to my monitor so i can see if you type anything
Hmmm, just made a twitter gizmo i think...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Post Edited (metron9) : 5/10/2010 1:20:32 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Next step i will make a password code, and read up on resetting. I will check back in a few.
I changed my debug output to see the letters so you could write a message when you connect i will post the , ohhh you are typing now.
Here is the screenshot
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Post Edited (metron9) : 5/10/2010 2:23:06 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Yes the stamp is reading serial input, when i program up the AVR it will have full interrupt background receive and transmit. It is only at 9600 baud now and that can go faster as well.
Now the next step is finding a way to automate or program a telnet connection so one can monitor a device output and perform tasks, like read a sensor and take action like emailing you or sending you a text message "Your house is 40 degrees the heater must be off!" or whatever.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Looking at ways of linking two devices with a serial tunnel. This is the UDS10, and for the N8VEM we were using the MSS100 and you are using a more recent device, but they are all from the same company so should work in similar ways.
So now you need a 'terminal' program in your favourite language.
Hmm, I used something like that over on the propeller group. Maybe it might be useful to you?
This is vb.net code and I needed to talk to a program that only would talk via TCP/IP. It was on the same machine, but the nice thing about Telnet etc is that it doesn't really care if it is a local or remote machine. So you can send and receive bytes
'http://dimac.net/default3.asp?M=FreeDownloads/Menu.asp&P=FreeDownloads/FreeDownloadsstart.asp
' Get the free download called w3sockets half way down the page
' put the sockets.dll file in c:\windows\system32
' run the SocketReg program
'Your application needs to be aware of the socket.dll file, I accomplished this as follows:
'1. Click on the 'Project' menu and select 'Add reference...'
'2. Click on the 'Browse' tab
'3. Navigate to where you have socket.dll installed on the HD
'4. Select this file and click 'OK'
Private WithEvents w3sock As Socket.TCP ' at beginning of frmMain
start it with
w3sock = New Socket.TCP
This is a cut and paste from some code
w3sock.TimeOut = 5000 ' long enough to do a compile for a big program?
w3sock.DoTelnetEmulation = True
w3sock.TelnetEmulation = "TTY"
w3sock.Host = "Localhost:23"
w3sock.Open()
w3sock.WaitFor(">")
w3sock.SendText("D:" + vbCrLf) ' change to drive D where sbasic is
Sleep(200)
w3sock.WaitFor(">")
w3sock.SendText("R " + Filename1 + ".BAS" + vbCrLf) ' copy to the simh from pc directory
Sleep(200)
w3sock.WaitFor(">")
w3sock.SendText("SBASIC " + Filename1 + vbCrLf) ' run sbasic
Sleep(100) ' will take longer than this
w3sock.WaitFor("D>") ' wait for the D> prompt to come back
w3sock.Close() ' close the socket
In your case you would use your dyndns address instead of Localhost, and port 10001 instead of port 23
I found adding in little delays made things work a lot easier.
You should be able to rewrite this to talk to your chip from anywhere in the world. Just need a simple sort of protocol.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
http://www.lantronix.com/device-network ... ector.html
Dr. Acula
It still seems complicated as they have various versions, sdk's etc.. download and get it ready,
I will hook the device up tonight and see if you can get it working from your end.
Someone could perhaps take the debug output or serial data from the stamp and redirect it to a redirected port to communicate through the web via basic stamps for example.
I know some of you folks have made VB programs to communicate with a stamp through USB and or serial ports. Just add the redirector and you have a solution to read and write to an xport direct from your microcontroller connected to a PC.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
http://pcmicro.com/netserial/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
http://advanced-com-port-redirector.software.informer.com/4.0/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Here is the link, so far I made a program i can open the connection, put test in a bos, hit the send key, and then press a close connection box. The stamp reads the data and outputs on debug screen.
I think i am going to buy this program, forum has lot's of action and my questions were answered very fast.
http://forums.realsoftware.com/viewtopic.php?f=10&t=33733&p=187529#p187529
Very soon i will be building things like this me thinks.
http://www.controlanything.com/Relay/Device/NWR165PROXR
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
I'm working on a wireless mesh at the moment. Code is almost written, and the aim is to have data packets that can go via many different paths so it doesn't matter if certain nodes are down. It would be interesting to see if such a mesh could interface with your system.
How much are the modules, and are there cheaper ways of doing things? I think there are some solutions with the propeller that can talk to the internet, though I'm not entirely sure how they work.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Lantronix.com has tons of web enabled devices Mouser is a distributor, between 40 and 60 bucks each. There are so many listed on mouser it makes my head spin why there are so many different kinds though.
I have an old xport direct that has been replaced with xport direct+ they added the + sign.
The xport pro has internal web page you can upload web pages, it is a tiny web server. You could access with any browser a page that would allow you to control anything you want. i will have to order one of these to try it out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Post Edited (metron9) : 5/11/2010 1:56:48 PM GMT
This is kind of a side-note to your current thread. I have to say, after looking at your picture above I am surprised the device responds at all. My XPORT has been sitting in a drawer for probably as long as yours, however my memories were that it consumes a lot of current and the 9V battery you have shouldn't be able to power it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·
Yes, 220ma makes a bit of heat on that regulator lm317T 1.5Amp
Then I have a 3.0V zener diode clamp on the input line to keep the 5V of the stamp pin under 3.3VDC. The receive is connected directly so the stamp sees 3.3 as a high from the xport.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Post Edited (metron9) : 5/11/2010 9:57:12 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·
Some input there from a number of people getting these links working. We never quite got it working but it was getting close.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller