lordmundi / shuttleCP

ShuttleCP: Jog Dial for ChiliPeppr and bCNC
GNU General Public License v3.0
6 stars 5 forks source link

Timed out waiting for connection to become ready #8

Closed JonHylands closed 9 years ago

JonHylands commented 9 years ago

I just bought a Shuttle, plugged it in to my Raspberry pi 2, and am trying to get it to work. I'm running ChiliPeppr on my desktop, talking through the serial port JSON server on the PI, which has an Arduino Uno running GRBL talking to my Sherline CNC mill (through a Xylotex 3-axis stepper board).

Here's a screenshot showing 2 ssh connections to the pi, along with ChiliPeppr running. I can jog the mill using ChiliPeppr.

shuttlecp-timedout

(if that doesn't work, you can get it here: https://www.dropbox.com/s/53xlb5eau65ffzz/ShuttleCP-TimedOut.png?dl=0)

ShuttleCP is failing to connect to the serial port json server. The PI is on my local network using a wifi dongle. I followed the instructions in the README in terms of installing and configuring everything needed.

Any ideas?

lordmundi commented 9 years ago

hmm... everything looks right... it appears that SPJS is running on port 8989 but for some reason, when shuttleCP tried to connect to localhost:8989, it isn't connecting.

Perhaps the name resolution for localhost is doing something funny. Try changing SPJS_HOST to 192.168.1.204 instead of localhost and then recompile and see if that makes a difference.

FG

On Fri, Oct 30, 2015 at 3:09 PM, Jon Hylands notifications@github.com wrote:

I just bought a Shuttle, plugged it in to my Raspberry pi 2, and am trying to get it to work. I'm running ChiliPeppr on my desktop, talking through the serial port JSON server on the PI, which has an Arduino Uno running GRBL talking to my Sherline CNC mill (through a Xylotex 3-axis stepper board).

Here's a screenshot showing 2 ssh connections to the pi, along with ChiliPeppr running. I can jog the mill using ChiliPeppr.

[image: shuttlecp-timedout] https://cloud.githubusercontent.com/assets/3494559/10856811/83d144a8-7f20-11e5-85fb-92cff98592c0.png

(if that doesn't work, you can get it here: https://www.dropbox.com/s/53xlb5eau65ffzz/ShuttleCP-TimedOut.png?dl=0)

ShuttleCP is failing to connect to the serial port json server. The PI is on my local network using a wifi dongle. I followed the instructions in the README in terms of installing and configuring everything needed.

Any ideas?

— Reply to this email directly or view it on GitHub https://github.com/lordmundi/shuttleCP/issues/8.

JonHylands commented 9 years ago

That didn't seem to help.

shuttlecp-directaddressfail

I tried this from my desktop: ws://192.168.1.204/ws

According to John Lauer's github page, that should work, but it doesn't, although its strange that ChiliPeppr works fine with it.

JonHylands commented 9 years ago

Here's another interesting tidbit - I can ping the pi from my laptop, but not from itself...

jon@jon-ThinkPad-T440s:~$ ping 192.168.1.204 PING 192.168.1.204 (192.168.1.204) 56(84) bytes of data. 64 bytes from 192.168.1.204: icmp_seq=1 ttl=64 time=83.3 ms 64 bytes from 192.168.1.204: icmp_seq=2 ttl=64 time=1.05 ms 64 bytes from 192.168.1.204: icmp_seq=3 ttl=64 time=1.08 ms 64 bytes from 192.168.1.204: icmp_seq=4 ttl=64 time=1.23 ms 64 bytes from 192.168.1.204: icmp_seq=5 ttl=64 time=1.26 ms 64 bytes from 192.168.1.204: icmp_seq=6 ttl=64 time=1.00 ms ^C --- 192.168.1.204 ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 5006ms rtt min/avg/max/mdev = 1.004/14.837/83.385/30.655 ms

pi@raspberrypi ~/shuttleCP $ ping localhost PING localhost (127.0.0.1) 56(84) bytes of data. ^C --- localhost ping statistics --- 28 packets transmitted, 0 received, 100% packet loss, time 27004ms

pi@raspberrypi ~/shuttleCP $ ping 192.168.1.204 PING 192.168.1.204 (192.168.1.204) 56(84) bytes of data. ^C --- 192.168.1.204 ping statistics --- 95 packets transmitted, 0 received, 100% packet loss, time 94005ms

JonHylands commented 9 years ago

Sorry for these multiple responses - I can however, from my desktop, connect via this url using my browser:

http://192.168.1.204:8989/

However, I installed Links on the pi, and attempting to connect to the same URL times out. Seems like there might be something wrong with the networking on my pi. I'll investigate further, and report back here.

lordmundi commented 9 years ago

Try running ifconfig on the pi and posting it here.

Also, see if a service like iptables is running. If so, stop that service and try again.

FG Sent from my Android phone On Oct 31, 2015 7:43 AM, "Jon Hylands" notifications@github.com wrote:

Sorry for these multiple responses - I can however, from my desktop, connect via this url using my browser:

http://192.168.1.204:8989/

However, I installed Links on the pi, and attempting to connect to the same URL times out. Seems like there might be something wrong with the networking on my pi. I'll investigate further, and report back here.

— Reply to this email directly or view it on GitHub https://github.com/lordmundi/shuttleCP/issues/8#issuecomment-152733326.

JonHylands commented 9 years ago

pi@raspberrypi ~/shuttleCP $ ifconfig eth0 Link encap:Ethernet HWaddr b8:27:eb:ff:d2:23 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 00:0f:60:04:31:18 inet addr:192.168.1.204 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:38316 errors:0 dropped:0 overruns:0 frame:0 TX packets:15881 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:11492759 (10.9 MiB) TX bytes:2460522 (2.3 MiB)

pi@raspberrypi ~/shuttleCP $ service iptables status iptables: unrecognized service

lordmundi commented 9 years ago

Well, those look normal. Bit you're right, this must be a networking problem. Not sure why you can't ping yourself at localhost or the IP.

I noticed there isn't a loopback device in the ifconfig list. I'm not next to a computer to check the output, but isn't the "lo" device usually in that output? Could that be the issue?

FG Sent from my Android phone On Oct 31, 2015 8:52 AM, "Jon Hylands" notifications@github.com wrote:

pi@raspberrypi ~/shuttleCP $ ifconfig eth0 Link encap:Ethernet HWaddr b8:27:eb:ff:d2:23 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 00:0f:60:04:31:18 inet addr:192.168.1.204 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:38316 errors:0 dropped:0 overruns:0 frame:0 TX packets:15881 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:11492759 (10.9 MiB) TX bytes:2460522 (2.3 MiB)

pi@raspberrypi ~/shuttleCP $ service iptables status iptables: unrecognized service

— Reply to this email directly or view it on GitHub https://github.com/lordmundi/shuttleCP/issues/8#issuecomment-152738279.

JonHylands commented 9 years ago

pi@raspberrypi ~/shuttleCP $ ifconfig lo lo Link encap:Local Loopback LOOPBACK MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

It shows up if I ask specifically for it, but it doesn't appear to be bound to 127.0.0.1 like it should.

lordmundi commented 9 years ago

That's odd. Try bringing the device down and back up.

FG Sent from my Android phone On Oct 31, 2015 9:54 AM, "Jon Hylands" notifications@github.com wrote:

pi@raspberrypi ~/shuttleCP $ ifconfig lo lo Link encap:Local Loopback LOOPBACK MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

It shows up if I ask specifically for it, but it doesn't appear to be bound to 127.0.0.1 like it should.

— Reply to this email directly or view it on GitHub https://github.com/lordmundi/shuttleCP/issues/8#issuecomment-152741050.

JonHylands commented 9 years ago

okay, so now its working - I ran:

sudo ifup lo

Thanks for your help! Feel free to close.

lordmundi commented 9 years ago

Close issue 8

FG Sent from my Android phone On Oct 31, 2015 10:06 AM, "Jon Hylands" notifications@github.com wrote:

okay, so now its working - I ran:

sudo ifup lo

Thanks for your help! Feel free to close.

— Reply to this email directly or view it on GitHub https://github.com/lordmundi/shuttleCP/issues/8#issuecomment-152741508.

lordmundi commented 9 years ago

Darn, thought that would work.