Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   SSH to cRIO (http://www.chiefdelphi.com/forums/showthread.php?t=98297)

arthurlockman 16-11-2011 16:53

SSH to cRIO
 
Hi Everyone,
Is it possible to connect to the cRIO through SSH? I know that on the Windows side it has a NetConsole that lets you communicate with the cRIO through the terminal. Can you connect to it in a similar manner with SSH and Terminal (or Prompt on iOS)? If anyone knows how to do that, I would really appreciate the help.
Thanks!
-Arthur

Joe Ross 16-11-2011 17:20

Re: SSH to cRIO
 
netconsole sends/receives on UDP port 6666. You just need a program that supports that, such as netcat.

~Cory~ 16-11-2011 17:24

Re: SSH to cRIO
 
What are you trying to do? FTP and netconsole should be able to handle most tasks...

arthurlockman 31-01-2012 18:18

Re: SSH to cRIO
 
I want to be able to monitor the console without using the netconsole app, essentially.

jhersh 31-01-2012 18:54

Re: SSH to cRIO
 
Quote:

Originally Posted by arthurlockman (Post 1117304)
I want to be able to monitor the console without using the netconsole app, essentially.

Perhaps if you share your reason for not using the application provided we can suggest possible solutions for your use-case.

msulaimain 31-01-2012 20:11

Re: SSH to cRIO
 
FileZilla is always an option if your wanting to transfer files and stuff to your cRio or if you want to transfer a .out file to the ni-rt folder if your handy dandy button in WindRiver isn't uploading code for some reason.

andreboos 31-01-2012 21:51

Re: SSH to cRIO
 
I use a modified version of Dustin Spicuzza's cross-platform netconsole:

Code:

#!/usr/bin/env python2

import socket
import select
from sys import stdout as stdout

UDP_PORT=6666

sock = socket.socket( socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP )

sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
sock.bind( ('',UDP_PORT) )
sock.setblocking(0)

while True:
    result = select.select( [sock], [], [] )
    msg = result[0][0].recv( 8196 )
    for c in msg:
        stdout.write(c)


arthurlockman 07-02-2012 19:57

Re: SSH to cRIO
 
Quote:

Originally Posted by jhersh (Post 1117326)
Perhaps if you share your reason for not using the application provided we can suggest possible solutions for your use-case.

My reason? My main computer is a mac. If I didn't have to fire up windows just to watch the netconsole, I'd be happy.

jhersh 08-02-2012 00:11

Re: SSH to cRIO
 
Quote:

Originally Posted by arthurlockman (Post 1121952)
My reason? My main computer is a mac. If I didn't have to fire up windows just to watch the netconsole, I'd be happy.

Have you tried netcat or ncb? How about the python above?

arthurlockman 08-02-2012 10:20

Re: SSH to cRIO
 
Quote:

Originally Posted by jhersh (Post 1122192)
Have you tried netcat or ncb? How about the python above?

The python seems to work fine for me. Thanks guys.


All times are GMT -5. The time now is 23:28.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi