# Ethernet device deregistered when the legato framework starts up

**URL:** https://mangoh.discourse.group/t/ethernet-device-deregistered-when-the-legato-framework-starts-up/10320
**Category:** mangOH Yellow
**Created:** [August 9, 2023, 4:00pm UTC](https://mangoh.discourse.group/t/ethernet-device-deregistered-when-the-legato-framework-starts-up/10320 "2023-08-09T16:00:47Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![philipboucherat](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@philipboucherat](https://mangoh.discourse.group/u/philipboucherat)
#### Post date: [August 9, 2023, 4:00pm UTC](https://mangoh.discourse.group/t/ethernet-device-deregistered-when-the-legato-framework-starts-up/10320/1 "2023-08-09T16:00:47Z")

</div>

I’m using a mangOH Yellow board with WP7607 module and a Talon ethernet daughter board. When the mangOH boots, if I disable the legato startup, the ethernet port is registered as eth0, it gets an IP address via dhcp etc., and it works fine. But then if I start legato, the eth0 device gets deregistered. Same on both R16 and R17 software. I’m not sure why this is happening, and is there anything I can do to stop it?

Here is dmesg before starting legato, and you can see eth0 comes up :

dmesg:  
[25.945887] QTI:start  
[26.007291] done  
[26.037476] LE\_KPI: end initscript /etc/rcS.d/S99start\_qti\_le  
[26.076692] QCMAP:Start DHCP server  
[26.083355] QCMAP:DHCP server started  
[26.209007] USB QCMAP NL IOCTL Snd GETNEIGH Succ  
[30.991475] gpio\_check\_and\_wake: wake-n\_gpio26 STATE=WAKEUP  
[30.999032] swimcu\_calibrate\_event\_handle: MCU calibrate completed with remaining time 0  
[30.999059] swimcu\_lpo\_calibrate\_calc: MCU time=30000 vs MDM time=30143  
[30.999087] gpio\_check\_and\_wake: wake-n\_gpio26 STATE=SLEEP  
[34.640533] apr\_register: Modem is not Up  
[34.640582] adm\_memory\_map\_regions: Unable to register ADM  
[34.643541] adm\_map\_cal\_data: map did not work! cal\_type 0 ret -19  
[34.648924] map\_memory: map\_cal failed, cal type 10, ret = -19!  
[34.656013] adm\_alloc\_cal: cal\_utils\_alloc\_block failed, ret = -19, cal type = 10!  
[34.660982] call\_allocs: alloc failed!  
[90.345424] IPv6: ADDRCONF(NETDEV\_CHANGE): eth0: link becomes ready  
[90.348464] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1  
[90.405774] QTI:ETH mode  
[90.414648] QTI:LINK\_UP message posted  
[90.851589] nf\_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based firewall rule not found. Use the iptables CT target to attach helpers in.  
[105.966379] 50default (1730) used greatest stack depth: 4492 bytes left  
[116.223420] QTI:LINK\_UP Processed

And this is dmesg later when legato is started, and eth0 gets deregistered :

[116.223420] QTI:LINK\_UP Processed \<======= Last dmesg before running legato startup script.  
[857.392959] sps:BAM 0x07884000 (va:0xdbae92bb) enabled: ver:0x18, number of pipes:24  
[863.755213] gpio\_map\_name\_to\_num: find GPIO 76  
[863.761450] gpio\_map\_name\_to\_num: find GPIO 38  
[864.005398] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -71  
[864.005413] smsc95xx 1-1.1:1.0 eth0: Error reading MII\_ACCESS  
[864.005422] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx\_mdio\_read  
[864.005430] smsc95xx 1-1.1:1.0 eth0: Failed to read MII\_BMSR  
[864.018932] usb 1-1.1: USB disconnect, device number 3  
[864.021475] smsc95xx 1-1.1:1.0 eth0: unregister ‘smsc95xx’ usb-7c00000.hsic\_host-1.1, smsc95xx USB 2.0 Ethernet  
[864.021597] smsc95xx 1-1.1:1.0 eth0: usbnet\_stop  
[864.023418] [RMNET:HI] rmnet\_config\_notify\_cb(): Kernel is trying to unregister eth0  
[864.040379] [RMNET:HI] rmnet\_config\_notify\_cb(): Kernel is trying to unregister eth0  
[864.141753] USB QCMAP NL IOCTL Snd GETNEIGH Succ  
[864.146045] QTI:LINK\_DOWN message posted  
[864.149874] QTI:LINK\_DOWN Processed  
[864.280252] usb 1-1.1: new high-speed USB device number 6 using msm\_hsic\_host  
[864.391486] usb 1-1.1: New USB device found, idVendor=0424, idProduct=9e00  
[864.391500] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0  
[864.394993] smsc95xx v1.0.6  
[864.491114] smsc95xx 1-1.1:1.0 eth0: register ‘smsc95xx’ at usb-7c00000.hsic\_host-1.1, smsc95xx USB 2.0 Ethernet, 0a:5d:07:9a:d4:31  
[864.501575] mdm9607-asoc-snd soc:sound-wm8944: Defering mdm\_asoc\_machine\_probe, q6\_state 0  
[864.650932] smsc95xx 1-1.1:1.0 eth0: usbnet\_open  
[864.651654] IPv6: ADDRCONF(NETDEV\_UP): eth0: link is not ready  
[864.664363] USB QCMAP NL IOCTL Snd GETNEIGH Succ  
[866.185309] IPv6: ADDRCONF(NETDEV\_CHANGE): eth0: link becomes ready  
[866.187313] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1  
[866.239710] QTI:ETH mode  
[866.244728] QTI:LINK\_UP Processed  
[866.249149] QTI:LINK\_UP message posted  
[869.445782] gpio\_map\_name\_to\_num: find GPIO 76  
[869.447878] gpio\_map\_name\_to\_num: find GPIO 38  
[869.650924] usb 1-1.1: USB disconnect, device number 6  
[869.653446] smsc95xx 1-1.1:1.0 eth0: unregister ‘smsc95xx’ usb-7c00000.hsic\_host-1.1, smsc95xx USB 2.0 Ethernet  
[869.653562] smsc95xx 1-1.1:1.0 eth0: usbnet\_stop  
[869.654989] [RMNET:HI] rmnet\_config\_notify\_cb(): Kernel is trying to unregister eth0  
[869.670397] [RMNET:HI] rmnet\_config\_notify\_cb(): Kernel is trying to unregister eth0  
[869.763373] USB QCMAP NL IOCTL Snd GETNEIGH Succ  
[869.782761] QTI:LINK\_DOWN message posted  
[869.786633] QTI:LINK\_DOWN Processed

---

<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 10, 2023, 1:18am UTC](https://mangoh.discourse.group/t/ethernet-device-deregistered-when-the-legato-framework-starts-up/10320/2 "2023-08-10T01:18:48Z")

</div>

how about using the default setting to enable legato framework at power on?

---

<div class="post-metadata">

### Author: ![philipboucherat](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@philipboucherat](https://mangoh.discourse.group/u/philipboucherat)
#### Post date: [August 10, 2023, 8:40am UTC](https://mangoh.discourse.group/t/ethernet-device-deregistered-when-the-legato-framework-starts-up/10320/3 "2023-08-10T08:40:24Z")

</div>

Same thing happens when you start the framework at power on.

---

<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 10, 2023, 8:47am UTC](https://mangoh.discourse.group/t/ethernet-device-deregistered-when-the-legato-framework-starts-up/10320/4 "2023-08-10T08:47:12Z")

</div>

I don’t see problem with WP76 R16 with mangoh red board, please note that you need to change the state of GPIO2 to initilize the eth0 interface:

> [@WP7702 how to enable ethernet IoT card?](https://mangoh.discourse.group/t/wp7702-how-to-enable-ethernet-iot-card/5001/2):
>
> please see here: You might also add the following to start the card: echo 2 \> /sys/class/gpio/export echo out \> /sys/class/gpio/gpio2/direction echo 1 \> /sys/class/gpio/gpio2/value

```auto

root@fx30:~# ifconfig eth0
ifconfig: eth0: error fetching interface information: Device not found

root@fx30:~# echo 2 > /sys/class/gpio/export
root@fx30:~# echo out > /sys/class/gpio/gpio2/direction
root@fx30:~# echo 1 > /sys/class/gpio/gpio2/value
root@fx30:~#
root@fx30:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 6A:EF:D0:EE:03:36
          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@fx30:~# cm info
Device: WP7609
IMEI: 359782080112345
IMEISV: E
FSN: WA803370312345
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_003
SKU: 1103843
Last Reset Cause: Power Down
Resets Count: Expected: 122 Unexpected: 0
root@fx30:~# legato version
19.11.2_4ad011d85a76309438be40fc19e7153a

```

---

<div class="post-metadata">

### Author: ![philipboucherat](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@philipboucherat](https://mangoh.discourse.group/u/philipboucherat)
#### Post date: [August 10, 2023, 9:14am UTC](https://mangoh.discourse.group/t/ethernet-device-deregistered-when-the-legato-framework-starts-up/10320/5 "2023-08-10T09:14:04Z")

</div>

Ah, thanks, that works so I can get eth0 back now. So before starting the legato framework, eth0 works ok, then on starting the legato framework it gets deregistered - I still don’t know why. But if I set the GPIO pin I can get it back with ‘ifconfig eth0 up’ :

root@swi-mdm9x28-wp:~# echo 2 \> /sys/class/gpio/export  
[2114.032751] gpio\_map\_name\_to\_num: find GPIO 38  
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:~# [2167.040380] usb 1-1.1: new high-speed USB device number 7 using msm\_hsic\_host  
[2167.152106] usb 1-1.1: New USB device found, idVendor=0424, idProduct=9e00  
[2167.152166] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0  
[2167.165804] smsc95xx v1.0.6  
[2167.269648] smsc95xx 1-1.1:1.0 eth0: register ‘smsc95xx’ at usb-7c00000.hsic\_host-1.1, smsc95xx USB 2.0 Ethernet, 46:aa:14:8a:e1:65  
[2167.278006] mdm9607-asoc-snd soc:sound-wm8944: Defering mdm\_asoc\_machine\_probe, q6\_state 0

root@swi-mdm9x28-wp:~# ifconfig  
ecm0 Link encap:Ethernet HWaddr 16:EA:A5:7C:D6:8C  
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0  
inet6 addr: fe80::14ea:a5ff:fe7c:d68c/64 Scope:Link  
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1  
RX packets:0 errors:0 dropped:0 overruns:0 frame:0  
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:1000  
RX bytes:0 (0.0 B) TX bytes:1146 (1.1 KiB)

lo Link encap:Local Loopback  
inet addr:127.0.0.1 Mask:255.0.0.0  
inet6 addr: ::1/128 Scope:Host  
UP LOOPBACK RUNNING MTU:65536 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)

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:~# lsusb -t  
/: Bus 01.Port 1: Dev 1, Class=root\_hub, Driver=msm\_hsic\_host/1p, 480M  
|\_\_ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/3p, 480M  
|\_\_ Port 1: Dev 7, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M  
|\_\_ Port 2: Dev 4, If 0, Class=Vendor Specific Class, Driver=ftdi\_sio, 12M  
|\_\_ Port 3: Dev 5, If 0, Class=Vendor Specific Class, Driver=, 12M

root@swi-mdm9x28-wp:~# ifconfig eth0 up  
[2226.299249] smsc95xx 1-1.1:1.0 eth0: usbnet\_open  
root@swi-mdm9x28-wp:~# [2227.941263] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1

root@swi-mdm9x28-wp:~# ifconfig  
ecm0 Link encap:Ethernet HWaddr 16:EA:A5:7C:D6:8C  
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0  
inet6 addr: fe80::14ea:a5ff:fe7c:d68c/64 Scope:Link  
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1  
RX packets:0 errors:0 dropped:0 overruns:0 frame:0  
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:1000  
RX bytes:0 (0.0 B) TX bytes:1146 (1.1 KiB)

eth0 Link encap:Ethernet HWaddr 46:AA:14:8A:E1:65  
inet addr:10.42.0.46 Bcast:10.42.0.255 Mask:255.255.255.0  
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1  
RX packets:16 errors:0 dropped:0 overruns:0 frame:0  
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:1000  
RX bytes:2432 (2.3 KiB) TX bytes:3480 (3.3 KiB)

lo Link encap:Local Loopback  
inet addr:127.0.0.1 Mask:255.0.0.0  
inet6 addr: ::1/128 Scope:Host  
UP LOOPBACK RUNNING MTU:65536 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)

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:~#

Do you have any idea why eth0 might be being deregistered in the first place?

---

<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 10, 2023, 9:16am UTC](https://mangoh.discourse.group/t/ethernet-device-deregistered-when-the-legato-framework-starts-up/10320/6 "2023-08-10T09:16:11Z")

</div>

maybe the legato framework will change the GPIO2 state.  
You can double check

---

<div class="post-metadata">

### Author: ![philipboucherat](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@philipboucherat](https://mangoh.discourse.group/u/philipboucherat)
#### Post date: [August 10, 2023, 10:22am UTC](https://mangoh.discourse.group/t/ethernet-device-deregistered-when-the-legato-framework-starts-up/10320/7 "2023-08-10T10:22:48Z")

</div>

Yes, seems like legato framework is setting GPIO2 to 0. Anyway, thanks for your help.
