I want to use an Ethernet card in my mangoh red to communicate via LAN cable.
I tried the following method and it says the device does not exist.
root@swi-mdm9x28-wp:~# echo 2 > /sys/class/gpio/export
root@swi-mdm9x28-wp:~# echo out > /sys/class/gpio/gpio2/direction
root@swi-mdm9x28-wp:~# echo 1 > /sys/class/gpio/gpio2/value
root@swi-mdm9x28-wp:~# ifup eth0
ifconfig: SIOCGIFFLAGS: No such device
ifconfig: SIOCSIFADDR: No such device
route: SIOCADDRT: No such device
root@swi-mdm9x28-wp:~# ifconfig
bridge0 Link encap:Ethernet HWaddr C2:85:B0:FF:AF:29
inet addr:192.168.225.1 Bcast:192.168.225.255 Mask:255.255.255.0
inet6 addr: fe80::c085:b0ff:fefc:ac26%1198202748/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:76 (76.0 B)
ecm0 Link encap:Ethernet HWaddr 62:78:1F:77:18:ED
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::6078:1fff:fe77:18ed%1198202748/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:279 errors:0 dropped:0 overruns:0 frame:0
TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:51648 (50.4 KiB) TX bytes:11678 (11.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1%1198202748/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:76 (76.0 B) TX bytes:76 (76.0 B)
rmnet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING MTU:2000 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)
Then I added the following line to /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
broadcast 192.168.1.255
After rebooting, eth0 does not exist in the ifconfig.
How can I get the Ethernet card to work?
jyijyi
July 19, 2021, 8:07am
2
you can see here:
Objective: Configure a MangOH to route cellular internet data to/from other network interfaces. For example the image below shows how we will route traffic to/from the ethernet IoT slot to/from the cellular gateway.
[IMG_2399]
Solution: To configure the MangOH to route data to/from network interfaces to/from the public cellular interface execute the following steps:
A. For wired interfaces, i.e. eth0 run the following steps:
Download the cfg_gateway.sh script to the MangOH device (als…
In the script “cfg_gateway.sh”, you might need to add “iptables -I INPUT -j ACCEPT” after "iptables --flush " , otherewise you cannot SSH via USB ECM or ethernet.
Thanks for the reply.
Just to be sure, I tried again and got the same result as the last time I ran it.
The following is the result of trying cfg_gateway.sh.
I think the problem is that ETH0 is not showing up in the ifconfig. How can I get the ethernet card made by talon to be recognized?
The only update I have done to the manogoh red I am using now is the wp7605 update, is it possible that I am missing something that I need to install? Please let me know if there is something I am missing.
Translated with www.DeepL.com/Translator (free version)
mangoh@mangoh-vm:~/Desktop$ cd myworkspace/
mangoh@mangoh-vm:~/Desktop/myworkspace$ ls -la
合計 84
drwxrwxr-x 8 mangoh mangoh 4096 7月 13 10:48 .
drwxr-xr-x 3 mangoh mangoh 4096 7月 9 10:02 …
drwxrwxr-x 3 mangoh mangoh 4096 7月 12 17:07 _build_wakeup_app
-rw-rw-rw- 1 mangoh mangoh 8466 7月 13 10:48 cfg_gateway.sh
-rw-rw-rw- 1 mangoh mangoh 8450 7月 12 16:42 cfg_gateway_mineo.sh
drwxrwxr-x 7 mangoh mangoh 4096 7月 12 16:26 helloIPC
drwxrwxr-x 4 mangoh mangoh 4096 7月 9 10:39 helloWorld
drwxrwxr-x 6 mangoh mangoh 4096 7月 9 17:03 leaf-data
-rw-rw-r-- 1 mangoh mangoh 512 7月 9 17:03 leaf-workspace.json
drwxrwxr-x 13 mangoh mangoh 4096 7月 9 15:30 mangOH
-rw-rw-rw- 1 mangoh mangoh 838 7月 12 17:15 rj45.sh
drwx------ 4 mangoh mangoh 4096 7月 12 17:15 wakeup_app
-rw-rw-r-- 1 mangoh mangoh 16543 7月 12 17:07 wakeup_app.wp76xx.update
mangoh@mangoh-vm:~/Desktop/myworkspace$ scp ./cfg_gateway.sh root@192.168.2.2 :/tmp/.
cfg_gateway.sh 100% 8466 928.5KB/s 00:00
mangoh@mangoh-vm:~/Desktop/myworkspace$ ssh root@192.168.2.2
root@swi-mdm9x28-wp:~# cd /tmp/
root@swi-mdm9x28-wp:/tmp# ls -la
drwxr-xr-x 5 root root 240 Jan 6 00:07 .
drwxr-xr-x 22 root root 307 Oct 23 2018 …
-rw-r–r-- 1 root root 8466 Jan 6 00:07 cfg_gateway.sh
-rw-r–r-- 1 root root 237 Jan 6 00:00 hosts
-rw-r–r-- 1 root root 13274 Jan 6 00:00 ld.so.cache
-rw-r–r-- 1 root root 28 Jan 6 00:00 ld.so.conf
drwx-----x 2 root root 120 Jan 6 00:00 legato
drwx------ 2 root root 80 Jan 6 00:00 pkgdwl
drw-r–r-- 2 root root 60 Jan 6 00:00 psm_socket
srwx------ 1 root root 0 Jan 6 00:00 sock0
srwxr-xr-x 1 root root 0 Jan 6 00:00 thermal_engi_ipc
-rw-r–r-- 1 root root 450 Jan 6 00:07 tmpfdbtable.txt
root@swi-mdm9x28-wp:/tmp# ./cfg_gateway.sh
-sh: ./cfg_gateway.sh: Permission denied
root@swi-mdm9x28-wp:/tmp# chmod +x cfg_gateway.sh
root@swi-mdm9x28-wp:/tmp# ./cfg_gateway.sh
MangOH gateway configuration
Enter WAN (cellular) interface (default: rmnet_data0):
WAN interface rmnet_data0
Enter LAN interface (default: eth0):
LAN interface eth0
Enter LAN IP (default: 192.168.20.1):
IP address (192.168.20.1)
Enter LAN Net Mask (default: 255.255.255.0):
net mask (255.255.255.0)
Bring up LAN interface eth0
ifconfig: SIOCGIFFLAGS: No such device
ifconfig: SIOCSIFADDR: No such device
route: SIOCADDRT: No such device
Bring up LAN interface eth0 failed
root@swi-mdm9x28-wp:/tmp# ifconfig
bridge0 Link encap:Ethernet HWaddr 6A:EC:54:02:3D:D6
inet addr:192.168.225.1 Bcast:192.168.225.255 Mask:255.255.255.0
inet6 addr: fe80::68ec:54ff:feff:3ad3%1198202748/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:76 (76.0 B)
ecm0 Link encap:Ethernet HWaddr EA:19:42:22:C0:BA
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::e819:42ff:fe22:c0ba%1198202748/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:364 errors:0 dropped:0 overruns:0 frame:0
TX packets:162 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:81100 (79.1 KiB) TX bytes:20328 (19.8 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1%1198202748/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:76 (76.0 B) TX bytes:76 (76.0 B)
rmnet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING MTU:2000 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)
jyijyi
July 20, 2021, 2:43am
4
I can see eth0 after setting GPIO2:
root@swi-mdm9x28-wp:~# ifconfig eth0
ifconfig: eth0: error fetching interface information: Device not found
root@swi-mdm9x28-wp:~# echo 2 > /sys/class/gpio/export
root@swi-mdm9x28-wp:~# echo out > /sys/class/gpio/gpio2/direction
root@swi-mdm9x28-wp:~# echo 1 > /sys/class/gpio/gpio2/value
root@swi-mdm9x28-wp:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr FE:82:5E:5C:6A:9D
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)
root@swi-mdm9x28-wp:~# cm info
Device: WP7609
IMEI: 359782080100399
IMEISV: E
FSN: WA803370010610
Firmware Version: SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
Bootloader Version: SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
MCU Version: 002.015
PRI Part Number (PN): 9908102
PRI Revision: 001.000
Carrier PRI Name: GENERIC
Carrier PRI Revision: 002.095_000
SKU: 1103843
Last Reset Cause: Reset, User Requested
Resets Count: Expected: 133 Unexpected: 242
The following is the result.
root@swi-mdm9x28-wp:/# ifconfig eth0
ifconfig: eth0: error fetching interface information: Device not found
root@swi-mdm9x28-wp:/# echo 2 > /sys/class/gpio/export
root@swi-mdm9x28-wp:/# echo out > /sys/class/gpio/gpio2/direction
root@swi-mdm9x28-wp:/# echo 1 > /sys/class/gpio/gpio2/value
root@swi-mdm9x28-wp:/# ifconfig
bridge0 Link encap:Ethernet HWaddr 6A:EC:54:02:3D:D6
inet addr:192.168.225.1 Bcast:192.168.225.255 Mask:255.255.255.0
inet6 addr: fe80::68ec:54ff:feff:3ad3%1198202748/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:76 (76.0 B)
ecm0 Link encap:Ethernet HWaddr EA:19:42:22:C0:BA
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::e819:42ff:fe22:c0ba%1198202748/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2932 errors:0 dropped:0 overruns:0 frame:0
TX packets:731 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:625647 (610.9 KiB) TX bytes:63570 (62.0 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1%1198202748/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:76 (76.0 B) TX bytes:76 (76.0 B)
rmnet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING MTU:2000 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)
root@swi-mdm9x28-wp:/# ifconfig eth0
ifconfig: eth0: error fetching interface information: Device not found
jyijyi
July 20, 2021, 3:11am
6
have you enabled HSICENABLE flag in AT!CUSTOM?
I have not enabled it.
Can you please tell me how to enable it?
Thanks to your advice, I can enable eth0.
Thank you very much for your help.