# How to use Ethernet IOT Card on MangOH green?

**URL:** https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076
**Category:** mangOH Green
**Created:** [August 4, 2022, 8:38am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076 "2022-08-04T08:38:58Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![antoniobuono](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@antoniobuono](https://mangoh.discourse.group/u/antoniobuono)
#### Post date: [August 4, 2022, 8:38am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/1 "2022-08-04T08:38:58Z")

</div>

Hi all, I’m using the mangoh green with ethernet IOT card. In my project the ethernet card must be connected to slot 1. Are there any configurations to be made such as enabling the pins etc? Or just follow the script used in the following guide [Setting up MangOH Red as Router to Cellular Gateway](https://mangoh.discourse.group/t/setting-up-mangoh-red-as-router-to-cellular-gateway/1241) ?

Thanks in advance.

---

<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: [August 4, 2022, 8:43am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/2 "2022-08-04T08:43:39Z")

</div>

probably you need to type the following to have the eth1.

```auto
echo 2 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio2/direction
echo 1 > /sys/class/gpio/gpio2/value

```

> [@Unable to use USB to Ethernet IOT card](https://mangoh.discourse.group/t/unable-to-use-usb-to-ethernet-iot-card/1793):
>
> Hi, I had mangoH red with wp7608 and the board is mounted with ethernet IOT module . The RJ45 connectore of the IOT module is connected to local lan for testing. But I see nothing happens Is there any applicatoin or usecase / service that I can use to explore this IOT module. Thanking in advance. Thanks, Siva

---

<div class="post-metadata">

### Author: ![antoniobuono](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@antoniobuono](https://mangoh.discourse.group/u/antoniobuono)
#### Post date: [August 4, 2022, 8:58am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/3 "2022-08-04T08:58:13Z")

</div>

Thank you jyijyi.  
If i want to use slot 2, I have to execute the same commands? or do I have to change something, like the number of gpio ?

---

<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: [August 4, 2022, 9:01am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/4 "2022-08-04T09:01:03Z")

</div>

maybe you try the slot 1 and see it the eth1 can be seen first

---

<div class="post-metadata">

### Author: ![antoniobuono](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@antoniobuono](https://mangoh.discourse.group/u/antoniobuono)
#### Post date: [August 4, 2022, 9:09am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/5 "2022-08-04T09:09:42Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/1/19a21ddb83f5ad74eb306848c0c00387cf89783e.png)  
I have this problem ? how can i fix 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: [August 4, 2022, 9:10am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/6 "2022-08-04T09:10:19Z")

</div>

you need to check AT+wiocfg? and see if GPIO2 can be used in the linux console

---

<div class="post-metadata">

### Author: ![antoniobuono](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@antoniobuono](https://mangoh.discourse.group/u/antoniobuono)
#### Post date: [August 4, 2022, 9:28am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/7 "2022-08-04T09:28:20Z")

</div>

i have this answer when i use the command.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/9/96e4de36d643570bd22f625a48b6b299f69207ec.png)

Previously, however, I used slot 1 for the can and I used the following script without having errors:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/b/bee4e7b026d4cbcd76ea50f8a842f3af2dc03bde.png).

---

<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: [August 4, 2022, 9:29am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/8 "2022-08-04T09:29:58Z")

</div>

you should type this in “microcom /dev/ttyAT”

---

<div class="post-metadata">

### Author: ![antoniobuono](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@antoniobuono](https://mangoh.discourse.group/u/antoniobuono)
#### Post date: [August 4, 2022, 9:34am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/9 "2022-08-04T09:34:01Z")

</div>

Sorry jyijyi for my lack of practicality with linux, I’m a beginner.  
I follow your tips and this is the response:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/7/73d328d834d92fb31223b232dd0ad035bb6a438a.png)

---

<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: [August 4, 2022, 9:57am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/10 "2022-08-04T09:57:30Z")

</div>

I don’t see such issue:

root@swi-mdm9x28-wp:~# microcom /dev/ttyAT  
at+wiocfg?  
+WIOCFG: 2,16,0,0,1,0,0  
+WIOCFG: 4,3,0,0,1,0,0  
+WIOCFG: 6,8,0,0,1,0,0  
+WIOCFG: 7,16,0,0,1,0,0  
+WIOCFG: 8,16,0,0,1,0,0  
+WIOCFG: 13,16,0,0,1,0,0  
+WIOCFG: 21,16,0,0,1,0,0  
+WIOCFG: 22,16,0,0,1,0,0  
+WIOCFG: 23,16,0,0,1,0,0  
+WIOCFG: 24,16,0,0,1,0,0  
+WIOCFG: 25,16,0,0,1,0,0  
+WIOCFG: 28,16,0,0,1,0,0  
+WIOCFG: 29,16,0,0,1,0,0  
+WIOCFG: 30,16,0,0,1,0,0  
+WIOCFG: 31,16,0,0,1,0,0  
+WIOCFG: 32,16,0,0,1,0,0  
+WIOCFG: 33,16,0,0,1,0,0  
+WIOCFG: 35,16,0,0,1,0,0  
+WIOCFG: 42,16,0,0,1,0,0

OK  
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

---

<div class="post-metadata">

### Author: ![antoniobuono](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@antoniobuono](https://mangoh.discourse.group/u/antoniobuono)
#### Post date: [August 4, 2022, 10:52am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/11 "2022-08-04T10:52:55Z")

</div>

I still have the same problem : “sh: write error: Device or resource busy” .  
However, I noticed that in the CAN script I don’t have echo 2 but echo7, with also a route and a reset of SPI. Why are there these differences?

---

<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: [August 4, 2022, 11:15am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/12 "2022-08-04T11:15:54Z")

</div>

It is controlling different gpio

Gpio2 vs gpio7

Maybe you load the official fw and stop running the CAN script

---

<div class="post-metadata">

### Author: ![antoniobuono](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@antoniobuono](https://mangoh.discourse.group/u/antoniobuono)
#### Post date: [August 30, 2022, 9:59am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/13 "2022-08-30T09:59:39Z")

</div>

hello jyijyi, sorry if I answer you late but I was on vacation. I removed the can module and the problem still exists on echo2 (“sh: write error: Device or resource busy”), the others don’t give me problems. Any solutions I can try?

---

<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: [August 30, 2022, 10:15am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/14 "2022-08-30T10:15:38Z")

</div>

which modules are you using?  
WP76? WP77?

BTW, have you tried the onboard ethernet port in mangoh green board?  
Why do you need two ethernet ports?

---

<div class="post-metadata">

### Author: ![antoniobuono](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@antoniobuono](https://mangoh.discourse.group/u/antoniobuono)
#### Post date: [August 30, 2022, 10:43am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/15 "2022-08-30T10:43:50Z")

</div>

i am using a wp76xx module. By doing a power cycle, I was able to fix the problem on echo2. But now a new problem has emerged when configuring the cfg\_gateway. I have a DHCP problem, as in the picture:

 ![DHCP error](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/2/2119c4c49132543987c56f7fd607048dc257b918.png)

As regards the ethernet module, I am using it to be able to communicate with a gateway that will interface with the can.

---

<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: [August 30, 2022, 11:41am UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/16 "2022-08-30T11:41:04Z")

</div>

Have you connected a PC to that ethernet port

---

<div class="post-metadata">

### Author: ![antoniobuono](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@antoniobuono](https://mangoh.discourse.group/u/antoniobuono)
#### Post date: [August 30, 2022, 12:32pm UTC](https://mangoh.discourse.group/t/how-to-use-ethernet-iot-card-on-mangoh-green/10076/17 "2022-08-30T12:32:50Z")

</div>

I was able to solve the problem using the “cfg\_gateway” file you put in the topic : [Setting up MangOH Red as Router to Cellular Gateway](https://mangoh.discourse.group/t/setting-up-mangoh-red-as-router-to-cellular-gateway/1241)

Thank you very much for your availability.
