# How to connect Ethernet card on mangOH red

**URL:** https://mangoh.discourse.group/t/how-to-connect-ethernet-card-on-mangoh-red/9489
**Category:** Uncategorized
**Created:** [July 19, 2021, 7:58am UTC](https://mangoh.discourse.group/t/how-to-connect-ethernet-card-on-mangoh-red/9489 "2021-07-19T07:58:40Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![yushimizu](https://avatars.discourse-cdn.com/v4/letter/y/45deac/32.png) [@yushimizu](https://mangoh.discourse.group/u/yushimizu)
#### Post date: [July 19, 2021, 7:58am UTC](https://mangoh.discourse.group/t/how-to-connect-ethernet-card-on-mangoh-red/9489/1 "2021-07-19T07:58:40Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)
#### Post date: [July 19, 2021, 8:07am UTC](https://mangoh.discourse.group/t/how-to-connect-ethernet-card-on-mangoh-red/9489/2 "2021-07-19T08:07:49Z")

</div>

you can see here:

> [@Setting up MangOH Red as Router to Cellular Gateway](https://mangoh.discourse.group/t/setting-up-mangoh-red-as-router-to-cellular-gateway/1241):
>
> 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. 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.

---

<div class="post-metadata">

### Author: ![yushimizu](https://avatars.discourse-cdn.com/v4/letter/y/45deac/32.png) [@yushimizu](https://mangoh.discourse.group/u/yushimizu)
#### Post date: [July 20, 2021, 12:33am UTC](https://mangoh.discourse.group/t/how-to-connect-ethernet-card-on-mangoh-red/9489/3 "2021-07-20T00:33:59Z")

</div>

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](http://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](mailto: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](mailto: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)

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)
#### Post date: [July 20, 2021, 2:43am UTC](https://mangoh.discourse.group/t/how-to-connect-ethernet-card-on-mangoh-red/9489/4 "2021-07-20T02:43:07Z")

</div>

I can see eth0 after setting GPIO2:

```auto
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

```

---

<div class="post-metadata">

### Author: ![yushimizu](https://avatars.discourse-cdn.com/v4/letter/y/45deac/32.png) [@yushimizu](https://mangoh.discourse.group/u/yushimizu)
#### Post date: [July 20, 2021, 3:04am UTC](https://mangoh.discourse.group/t/how-to-connect-ethernet-card-on-mangoh-red/9489/5 "2021-07-20T03:04:34Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)
#### Post date: [July 20, 2021, 3:11am UTC](https://mangoh.discourse.group/t/how-to-connect-ethernet-card-on-mangoh-red/9489/6 "2021-07-20T03:11:10Z")

</div>

have you enabled HSICENABLE flag in AT!CUSTOM?

---

<div class="post-metadata">

### Author: ![yushimizu](https://avatars.discourse-cdn.com/v4/letter/y/45deac/32.png) [@yushimizu](https://mangoh.discourse.group/u/yushimizu)
#### Post date: [July 20, 2021, 4:04am UTC](https://mangoh.discourse.group/t/how-to-connect-ethernet-card-on-mangoh-red/9489/7 "2021-07-20T04:04:38Z")

</div>

I have not enabled it.  
Can you please tell me how to enable it?

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)
#### Post date: [July 20, 2021, 4:25am UTC](https://mangoh.discourse.group/t/how-to-connect-ethernet-card-on-mangoh-red/9489/8 "2021-07-20T04:25:39Z")

</div>

You can see here

> [@Does the WP7605 support HSIC interface?](https://mangoh.discourse.group/t/does-the-wp7605-support-hsic-interface/9225/2):
>
> you need to check if HSICENABLE is enabled in at!custom? If no, do the followings at!entercnd=“A710” at!custom=“HSICENABLE”,1 reboot the device

---

<div class="post-metadata">

### Author: ![yushimizu](https://avatars.discourse-cdn.com/v4/letter/y/45deac/32.png) [@yushimizu](https://mangoh.discourse.group/u/yushimizu)
#### Post date: [July 20, 2021, 4:56am UTC](https://mangoh.discourse.group/t/how-to-connect-ethernet-card-on-mangoh-red/9489/9 "2021-07-20T04:56:16Z")

</div>

Thanks to your advice, I can enable eth0.  
Thank you very much for your help.
