How to use Ethernet IOT Card on MangOH green?

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 ?

Thanks in advance.

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

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

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 ?

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

I have this problem ? how can i fix it ?

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

i have this answer when i use the command.

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


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

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

I don’t see such issue:

root@swi-mdm9x28-wp:~# microcom /dev/ttyAT
+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

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

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?

It is controlling different gpio

Gpio2 vs gpio7

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

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?

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?

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:

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

Have you connected a PC to that ethernet port

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

Thank you very much for your availability.