Hi José,
According to step 1 and 2 I’m tring to ping the two board. I’m not quite sure which ip address should I ping for the client and server side, because the address for two board is default 192.168.2.2,so I test a lot.
The following is the code from client side.
I use mangOH1 board as client side and mangOH2 board as server side. At first establish the connection and mangOH1 get a IP address from mangOH2:
root@swi-mdm9x15:~# /sbin/udhcpc -R -b -i wlan0
udhcpc (v1.22.1) started
Sending discover…
Sending select for 192.168.10.78…
Lease of 192.168.10.78 obtained, lease time 86400
/etc/udhcpc.d/50default: Adding DNS 192.168.10.1
ping mangoh io successfully:
root@swi-mdm9x15:~# ping mangoh.io
PING mangoh.io (185.31.17.133): 56 data bytes
64 bytes from 185.31.17.133: seq=0 ttl=51 time=24.019 ms
64 bytes from 185.31.17.133: seq=1 ttl=51 time=35.403 ms
I use the USB0 port im Laptop to connect the mangOH board,check the configuration:
root@swi-mdm9x15:~# ifconfig usb0
usb0 Link encap:Ethernet HWaddr C6:46:2D:C7:9D:3E
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::c446:2dff:fec7:9d3e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2974 errors:0 dropped:0 overruns:0 frame:0
TX packets:1195 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:330953 (323.1 KiB) TX bytes:222604 (217.3 KiB)
It shows the inet addr ist 192.168.2.2 so I try to ping this address successfully:
root@swi-mdm9x15:~# ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 56 data bytes
64 bytes from 192.168.2.2: seq=0 ttl=64 time=0.611 ms
64 bytes from 192.168.2.2: seq=1 ttl=64 time=0.366 ms
From the server side I got the following code.
The select ip address from DHCP by client side is 192.168.10.78,so I try to ping the client side using this address successfully:
PING 192.168.10.78 (192.168.10.78): 56 data bytes
64 bytes from 192.168.10.78: seq=0 ttl=64 time=130.841 ms
64 bytes from 192.168.10.78: seq=1 ttl=64 time=150.862 ms
64 bytes from 192.168.10.78: seq=2 ttl=64 time=174.272 ms
I also use the USB0 port in second Laptop to connect the mangOH board,check the configuration:
root@swi-mdm9x15:~# ifconfig usb0
usb0 Link encap:Ethernet HWaddr FA:01:53:CD:F1:53
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::f801:53ff:fecd:f153/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5277 errors:0 dropped:0 overruns:0 frame:0
TX packets:4043 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:448058 (437.5 KiB) TX bytes:1117101 (1.0 MiB)
It shows the inet addr ist also 192.168.2.2 so I try to ping this address successfully:
root@swi-mdm9x15:~# ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 56 data bytes
64 bytes from 192.168.2.2: seq=0 ttl=64 time=0.763 ms
64 bytes from 192.168.2.2: seq=1 ttl=64 time=0.519 ms
I also check the connected network with this device:
root@swi-mdm9x15:~# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:1534 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5037 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN
tcp 0 128 192.168.2.2:22 192.168.2.3:49218 ESTABLISHED
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 :::53 :::* LISTEN
udp 0 0 0.0.0.0:1534 0.0.0.0:*
udp 0 0 0.0.0.0:53 0.0.0.0:*
udp 0 0 0.0.0.0:67 0.0.0.0:*
udp 0 0 :::53 :::*
target=“1”>
It seems that I can ping from both side, then I try the step 3 by client side,but the same problem comes back:
root@swi-mdm9x15:~# nc -l 1234 > filename.out
nc: bad address ‘-l’
Can u tell me which ip address should I ping and if my steps are right?
Regards,
Genfory