1 |
Hmmm, sent this on thursday, but seems it never made it to the |
2 |
list, so i'm resending it, sorry if it arrives twice ;) |
3 |
|
4 |
yoyo |
5 |
|
6 |
|
7 |
On Thu, Jun 16, 2011 at 12:48:51AM +0300, elmar bucher wrote: |
8 |
> Hi Yoyo, |
9 |
> |
10 |
> At least a step I cam further... |
11 |
> |
12 |
> > Why not connect it through the usb? It might be slower than wifi, but |
13 |
> > much more stable and predictable... It's on wiki: |
14 |
> > http://wiki.openmoko.org/wiki/USB_Networking |
15 |
> |
16 |
> I followed the USB Networking instruction. |
17 |
> elm@firebolt:~$ sudo ip address add 192.168.0.200/24 dev eth1 |
18 |
> elm@firebolt:~$ sudo ip link set dev eth1 up |
19 |
> elm@firebolt:~$ sudo route add -host 192.168.0.202 dev eth1 |
20 |
|
21 |
|
22 |
is the last line needed because neo uses the same subnet as your |
23 |
regular network? |
24 |
If so, i would try to move neo to some other subnet, just to be sure the |
25 |
prob. isn't there.... ie change 192.168.0.. to say 192.168.47... in |
26 |
/etc/network/interfaces and reboot/restart eth0 |
27 |
|
28 |
|
29 |
> |
30 |
> *** form the desktop ping and ssh to the phone works YEAH!*** |
31 |
> elm@firebolt:~$ ping 192.168.0.202 |
32 |
> PING 192.168.0.202 (192.168.0.202) 56(84) bytes of data. |
33 |
> 64 bytes from 192.168.0.202: icmp_seq=1 ttl=64 time=1.15 ms |
34 |
> 64 bytes from 192.168.0.202: icmp_seq=2 ttl=64 time=1.20 ms |
35 |
> 64 bytes from 192.168.0.202: icmp_seq=3 ttl=64 time=1.26 ms |
36 |
> 64 bytes from 192.168.0.202: icmp_seq=4 ttl=64 time=1.57 ms |
37 |
> 64 bytes from 192.168.0.202: icmp_seq=5 ttl=64 time=1.62 ms |
38 |
> |
39 |
> --- 192.168.0.202 ping statistics --- |
40 |
> 5 packets transmitted, 5 received, 0% packet loss, time 3997ms |
41 |
> rtt min/avg/max/mdev = 1.150/1.365/1.627/0.197 ms |
42 |
> |
43 |
> elm@firebolt:~$ ssh root@192.168.0.202 |
44 |
> root@192.168.0.202's password: |
45 |
> Last login: Tue Jan 4 12:33:47 2000 from 192.168.0.200 |
46 |
> root@om-gta02 ~ # |
47 |
> |
48 |
> |
49 |
> *** form the phone ping to the phone works too (even the time looks |
50 |
> freaking fast), but ssh to the desktop does not work, even I'm sure |
51 |
> the firewall is down *** |
52 |
> root@om-gta02 ~ # ping 192.168.0.200 |
53 |
> PING 192.168.0.200 (192.168.0.200): 56 data bytes |
54 |
> 64 bytes from 192.168.0.200: seq=0 ttl=64 time=0.000 ms |
55 |
> 64 bytes from 192.168.0.200: seq=1 ttl=64 time=0.000 ms |
56 |
> 64 bytes from 192.168.0.200: seq=2 ttl=64 time=0.000 ms |
57 |
> 64 bytes from 192.168.0.200: seq=3 ttl=64 time=0.000 ms |
58 |
> 64 bytes from 192.168.0.200: seq=4 ttl=64 time=0.000 ms |
59 |
> ^C |
60 |
> --- 192.168.0.200 ping statistics --- |
61 |
> 5 packets transmitted, 5 packets received, 0% packet loss |
62 |
> round-trip min/avg/max = 0.000/0.000/0.000 ms |
63 |
> root@om-gta02 ~ # |
64 |
|
65 |
thats really weird ;) |
66 |
|
67 |
root@om-gta02 ~ # ping 192.168.0.202 |
68 |
PING 192.168.0.202 (192.168.0.202): 56 data bytes |
69 |
64 bytes from 192.168.0.202: seq=0 ttl=64 time=0.907 ms |
70 |
64 bytes from 192.168.0.202: seq=1 ttl=64 time=0.538 ms |
71 |
64 bytes from 192.168.0.202: seq=2 ttl=64 time=0.448 ms |
72 |
64 bytes from 192.168.0.202: seq=3 ttl=64 time=0.448 ms |
73 |
|
74 |
event PCs aren't that fast (cca 0.040ms on mydesktop ;) |
75 |
|
76 |
|
77 |
> |
78 |
> root@om-gta02 ~ # ssh elm@192.168.0.200 |
79 |
> ssh: connect to host 192.168.0.200 port 22: Connection refused |
80 |
> |
81 |
hmm, i'd double check that your ssh is really running, that your |
82 |
firewall is correct ;) and that sshd is listenning on all |
83 |
addresses/interfaces (ie 0.0.0.0) and not only your interface/address you use |
84 |
for your local network... |
85 |
|
86 |
tabletka ~ # netstat -lpn | grep :22 |
87 |
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2985/sshd |
88 |
tcp6 0 0 :::22 :::* LISTEN 2985/sshd |
89 |
|
90 |
|
91 |
it's pretty weird that desktop -> moko connection works and reverse not, |
92 |
as even for the first one, packets have to be routed from moko to |
93 |
desktop... unless there's some firewall stuff that allows only outgoing |
94 |
connections on the desktop or something like that... |
95 |
|
96 |
> |
97 |
> |
98 |
> >> > # ip addr |
99 |
> >> quite some output |
100 |
> >> 1: lo (loopback at inet 127.0.0.1/8) |
101 |
> >> 2: usb0 [...] inet 192.168.0.202/24 brd 192.168.0.255 |
102 |
> >> 3: eth0 [...] inet 192.168.0.42/24 brd 192.168.0.255 |
103 |
> > |
104 |
> > hmm, your wifi uses the same subnet as the usbconnection. |
105 |
> |
106 |
> surprisingly this have change: |
107 |
> root@om-gta02 ~ # ip addre |
108 |
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN |
109 |
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 |
110 |
> inet 127.0.0.1/8 scope host lo |
111 |
> inet6 ::1/128 scope host |
112 |
> valid_lft forever preferred_lft forever |
113 |
> 2: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast |
114 |
> state UP qlen 1000 |
115 |
> link/ether 00:1f:11:01:a9:a5 brd ff:ff:ff:ff:ff:ff |
116 |
> inet 192.168.0.202/24 brd 192.168.0.255 scope global usb0 |
117 |
> inet6 fe80::21f:11ff:fe01:a9a5/64 scope link |
118 |
> valid_lft forever preferred_lft forever |
119 |
|
120 |
you didn't start wifi, so it isn't turned on and the interface isn't even there... |
121 |
|
122 |
|
123 |
> |
124 |
> > What does |
125 |
> > route -n |
126 |
> root@om-gta02 ~ # route -n |
127 |
> Kernel IP routing table |
128 |
> Destination Gateway Genmask Flags Metric Ref Use Iface |
129 |
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0 |
130 |
> 0.0.0.0 192.168.0.200 0.0.0.0 UG 8 0 0 usb0 |
131 |
> |
132 |
> |
133 |
> > but if you have working connection from desktop to neo, you just need to run |
134 |
> > iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE echo 1 >/proc/sys/net/ipv4/ip_forward |
135 |
> > |
136 |
> > on the desktop, shr should be by default set up for the usb connection, |
137 |
> > unless you start up some wifi connection app which would mess it up, |
138 |
> > however this is what it looks like here (on the moko, wifi turned off): |
139 |
> |
140 |
> Do I still have to run |
141 |
> iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE echo 1 |
142 |
> >/proc/sys/net/ipv4/ip_forward ? |
143 |
|
144 |
heh, some formatting issue, they should be 2 commands... |
145 |
but anyway... you need them to make your desktop act as gateway/NAT for |
146 |
the neo, ie to forward packets to the outside network and back.... |
147 |
but they are not needed for the simple neo <-> desktop connection |
148 |
|
149 |
> |
150 |
> Still wonder if the problem is in the shr installation. I just flashed |
151 |
> freerunner whit shr, to be able to install gentoo. I never properly |
152 |
> used it to phone or something. The pre-flashed os (om2008?) have not |
153 |
> even had a command line. But there the phone was working. That I |
154 |
> tested. |
155 |
|
156 |
i have a bit more than half a year old shr, never had a problem with the |
157 |
usb connection... |
158 |
|
159 |
bye |
160 |
|
161 |
yoyo |
162 |
|
163 |
> |
164 |
> Well, that's it for today. |
165 |
> Thanks! And good night. |
166 |
> |
167 |
> So long, Elmar |
168 |
> |