emcrsh/ruby

More
01 May 2014 19:09 #46510 by gillinderglass
emcrsh/ruby was created by gillinderglass
I am trying to use emcrsh and ruby.

I changed DISPLAY=mini to DISPLAY=emcrsh in my hal file.


This is my ruby code

require 'net/telnet'
localhost = Net::Telnet::new( "Host" => "localhost",
"Timeout" => 0,
"Port" => 5007)

This is my error
No connection could be made because the target machine
actively refused it. -connect(2) (Errno::ECCONNREFUSED)
from C:/Ruby193/lib/ruby/1.9.1/net/telnet.rb.351:in 'open'
from C:/Ruby193/lib/ruby/1.9.1/net/telnet.rb.351:in 'block in initialize'

from C:/Ruby193/lib/ruby/1.9.1/timeout.rb.55:in 'timeout'
from C:/Ruby193/lib/ruby/1.9.1/timeout.rb.100:in 'timeout'

from C:/Ruby193/lib/ruby/1.9.1/net/telnet.rb.350:in 'initialize'

I would appreciate any suggestions.

Thanks,
Bart

Please Log in or Create an account to join the conversation.

More
01 May 2014 23:51 #46517 by ArcEye
Replied by ArcEye on topic emcrsh/ruby
Hi

I know nothing about ruby, but if I were trying the same I would take 3 steps back and test from there

Start LCNC using Axis display and from another desktop use telnet and linuxcncrsh to communicate and make moves you can see in Axis

Then do the same thing remotely from another box,
then do it with DISPLAY=linuxcncrsh and ensure that linuxcncrsh is running and you can communicate with it
then try it from ruby

If you do not get the handshake protocol right with linuxcncrsh, you will not connect, it is quite arcane in some respects.
Check the docs.

( Have no idea if Timeout => 0 is correct for that function )

regards
The following user(s) said Thank You: gillinderglass

Please Log in or Create an account to join the conversation.

More
02 May 2014 00:35 - 02 May 2014 01:10 #46519 by gillinderglass
Replied by gillinderglass on topic emcrsh/ruby
Thank you for your response.

There was no handshaking.

There was nothing i could use in www.linuxcnc.rog/docs/2.4/html/man/man1/emcrsh.1.html.
Do you know where I could find instructions?

ethtool eth0 gives
Settings for eth0
Cannot get device settings: Operation not permitted
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x00000000 (0)
Cannot get link status: Operation not permitted

Do I need to re-install the port? I have instructions for that but I have yet to figure them out.

Regards,
Bart
Last edit: 02 May 2014 01:10 by gillinderglass. Reason: new info

Please Log in or Create an account to join the conversation.

More
02 May 2014 00:51 #46521 by cncbasher
Replied by cncbasher on topic emcrsh/ruby
you do not say which version OS you are using , have you checked first that remote connections are allowed by the OS ?
as it's usual to default to be not allowed

Please Log in or Create an account to join the conversation.

More
02 May 2014 00:57 #46522 by ArcEye
Replied by ArcEye on topic emcrsh/ruby
Hi

linuxcnc.org/docs/html/man/man1/linuxcncrsh.1.html

But also search under emcrsh / linuxcncrsh on this forum with my forum name in member name field (go back a couple of years)

There is quite a long thread covering the password login and instruction sequence to avoid a lock up (that is what I meant by handshake, not the literal serial protocol)

I have used it with no problem plenty of times but it takes some getting used to

regards

Please Log in or Create an account to join the conversation.

More
02 May 2014 01:55 #46523 by gillinderglass
Replied by gillinderglass on topic emcrsh/ruby
The operating system is Ubuntu 8.04.04. I don't know whether remote connections are allowed.

Please Log in or Create an account to join the conversation.

Time to create page: 0.132 seconds
Powered by Kunena Forum