I have a Linux PC (Ubuntu 20.04 LTS) and WP7605 (devkit) connected with USB cable, and I am building an environment where I can connect to the internet from my Linux PC via CDC-ECM.
I referred to the following URL, but when I run ping 8.8.8.8 from Linux PC, it loses all packets.
The one difference from the above URL is that “iptables --flush” will not allow SSH connection from Linux PC to WP7605, so I skip this process only.
(Connecting to internet ... as modem or as ecm? - #6 by jyijyi - WP Series - Sierra Wireless Forum)
Currently, a good result include the following
- I have confirmed that I can access WP7605 from a Linux PC via SSH 192.168.2.2 and ping 8.8.8.8 and ping www.google.com pass on that terminal
However, after configuring the “PC side:” in the URL above, all packets are lost when ping 8.8.8.8 is run.
Is there anything else I need to configure in order to get a successful USB CDC-ECM connection on the WP7605?
By the way, I am also thinking that there is no such thing as usb0 in the first place.
The reason is that when I ran “ifconfig -a” on both the Linux PC and on the WP7605, it did not find usb0.
For this reason, we also checked the environment in which the usb0 was replaced as follows, but the ping did not pass.
For “Fx30 side:”, usb0 was replaced with ecm0.
For the “PC side:”, usb0 was replaced with an I/F starting with enxXXXX.
As a result of “ifconfig -a”, 192.168.2.2 was assigned to ecm0 on WP7605, and 192.168.2.3 was assigned to enxXXXX on the Linux PC, so this setting was used.
In summary, the command executed to replace usb0 is as follows:
WP7605 side: (accessed from Linux PC via SSH 192.168.2.2)
echo > /etc/resolv.conf
cm data connect &
iptables -t nat -A POSTROUTING --out-interface rmnet0 -j MASQUERADE
iptables -A FORWARD -o ecm0 -i rmnet0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i ecm0 -o rmnet0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
cat /etc/resolv.conf
nameserver 110.163.0.5
nameserver 110.163.0.6
PC side: (Linux PC terminal)
sudo route add default gw 192.168.2.2 enxXXXX
sudo echo -e “nameserver 110.163.0.5\nnameserver 110.163.0.6” | sudo tee /etc/resolv.conf
Is there any mistake in this configuration?
Also, please let me know if there are any other settings that need to be made.