EM7455 exposing LAN interface

// this requires access to adb or
// IF you can do it through qmicli, dont know, havent tried it, if you can do it, leave a comment on howto
// linux device is EM7455, linux host is Debian11
// on host do:
adb shell
//on device do:
/ # ls -lisa /sys/class/android_usb/android0/|grep ‘f_’
13739 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_accessory
13582 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_acm
13459 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_audio
13762 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_audio_source
13547 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_ccid
13505 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_diag
13678 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_ecm
13446 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_ecm_qc
13409 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_ffs
13494 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_gps
13703 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_mass_storage
13594 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_mtp
13691 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_ncm
13617 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_ptp
13517 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_qdss
13481 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_rmnet
13470 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_rmnet_smd
13628 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_rndis
13647 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_rndis_qc
13531 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_serial
13774 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_uasp
13728 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_ubist
13421 0 drwxr-xr-x 3 root root 0 Jan 1 1970 f_usb_mbim
13401 0 -rw-r–r-- 1 root root 4096 Dec 30 17:47 self_powered
/ #
these above are the gadgets you can use.

/ # ls -lisa /usr/bin/usb/compositions/
total 116
361 4 drwxr-xr-x 1 root root 4096 Dec 27 14:41 .
359 4 drwxr-xr-x 1 root root 4096 Apr 28 2017 …
382 2 -rwxr-xr-x 1 root root 2440 Apr 28 2017 901D
374 4 -rwxr-xr-x 1 root root 4106 Apr 28 2017 9021
370 4 -rwxr-xr-x 1 root root 4283 Apr 28 2017 9022
373 3 -rwxr-xr-x 1 root root 3576 Apr 28 2017 9024
369 4 -rwxr-xr-x 1 root root 4428 Apr 28 2017 9025
385 4 -rwxr-xr-x 1 root root 3621 Apr 28 2017 902B
363 4 -rwxr-xr-x 1 root root 3791 Apr 28 2017 902D
372 5 -rwxr-xr-x 1 root root 4615 Apr 28 2017 9049
377 3 -rwxr-xr-x 1 root root 2960 Apr 28 2017 904A
371 4 -rwxr-xr-x 1 root root 4434 Apr 28 2017 9056
366 3 -rwxr-xr-x 1 root root 3464 Apr 28 2017 9057
378 4 -rwxr-xr-x 1 root root 3834 Apr 28 2017 9059
387 4 -rwxr-xr-x 1 root root 3736 Apr 28 2017 905B
383 3 -rwxr-xr-x 1 root root 3113 Apr 28 2017 9060
384 4 -rwxr-xr-x 1 root root 4204 Apr 28 2017 9063
376 6 -rwxr-xr-x 1 root root 5682 Apr 28 2017 9064
362 5 -rwxr-xr-x 1 root root 4977 Apr 28 2017 9067
1291 6 -rwxr-xr-x 1 root root 5836 Dec 26 16:22 9079
375 4 -rwxr-xr-x 1 root root 4013 Apr 28 2017 9084
386 4 -rwxr-xr-x 1 root root 4152 Apr 28 2017 9085
389 2 -rwxr-xr-x 1 root root 2497 Apr 28 2017 90A1
388 3 -rwxr-xr-x 1 root root 3141 Apr 28 2017 90A9
367 3 -rwxr-xr-x 1 root root 2873 Apr 28 2017 90AD
380 2 -rwxr-xr-x 1 root root 2247 Apr 28 2017 90B1
381 3 -rwxr-xr-x 1 root root 2593 Apr 28 2017 90B9
368 2 -rwxr-xr-x 1 root root 2252 Apr 28 2017 F000
379 0 -rwxr-xr-x 1 root root 127 Apr 28 2017 empty
390 0 -rwxr-xr-x 1 root root 2 Apr 28 2017 hsic_next
365 0 -rwxr-xr-x 1 root root 5 Apr 28 2017 hsusb_next
364 4 -rwxr-xr-x 1 root root 3884 Apr 28 2017 sierra
/ #
the above are different compositions you can switch your device to,
NOTE: the compositions are not sierra specific, but are specific to Qualcomm MDM9x15, MDM9x25, MBM9x35 devices
to switch cmposition use:
/ # usb_composition
boot hsusb composition: sierra
boot hsic composition: empty
Choose Composition by Pid:
901D - DIAG + ADB
9021 - DIAG + QMI_RMNET (Android)
9022 - DIAG + ADB + QMI_RMNET (Android)
9024 - RNDIS + ADB [Android]
9025 - DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage (Android)
902B - RNDIS + ADB + Mass Storage
902D - RNDIS + DIAG + ADB [Android]
9049 - DIAG + ADB + DUN + RMNET + Mass Storage + QDSS [Android]
904A - DIAG + QDSS [Android]
9056 - DIAG + ADB + SERIAL + RMNET + Mass Storage + Audio [Android]
9057 - RNDIS : ECM
9059 - DIAG+ADB+RNDIS : ECM
905B - MBIM
9060 - DIAG + QDSS + ADB
9063 - RNDIS : ECM : MBIM
9064 - DIAG + ADB + MODEM + QMI_RMNET : ECM : MBIM
9067 - Mass storage + QMI_RMNET : Mass Storage + MBIM
9079 - DIAG + ADB + MODEM + QMI_RMNET : ECM : MBIM
9084 - DIAG + QDSS + ADB + RMNET
9085 - DIAG+ADB+MBIM+GNSS
90A1 - DIAG + ADB + (multiplexed) QMI_RMNET (Android)
90A9 - DIAG + ADB + MODEM + NMEA + QDSS (bulk in) + RMNET : ECM : MBIM
90AD - DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage + DPL
90B1 - ECM
90B9 - DIAG + DUN + RMNET1 + RMNET2 + ADB [MDM.LE]
F000 - Mass Storage
empty - it is used to allow either hsic or hsusb to have no composition at all(must reboot to take effect).
hsic_next -
hsusb_next -
sierra - DIAG + ADB + NMEA + MODEM + QMI_RMNET
Pid number :
custom composition can be added, or existing modified.

// use hash to comment out
// to expose private LAN, copy/paste or make one, in the same directory,
echo 0 > /sys/class/android_usb/android$num/enable
// echo 9079 > /sys/class/android_usb/android$num/idProduct
// echo 1199 > /sys/class/android_usb/android$num/idVendor
// echo 239 > /sys/class/android_usb/android$num/bDeviceClass
// echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
// echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smdnmea,smd > /sys/class/android_usb/android0/f_serial/transports
echo QTI,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo ccid > /sys/class/android_usb/android0/f_ccid/transports
echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_ecm_qc/ecm_transports
echo diag,ffs,serial,ecm_qc,ccid > /sys/class/android_usb/android$num/functions
// echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_ecm_qc/ecm_transports
// echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_usb_mbim/mbim_transports
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
sleep $delay
echo 1 > /sys/class/android_usb/android$num/enable

ecm is going to create ecm0 on device side, on host side its going to create usb0 (thats what it is for me, although, i still want eth0, not usb0).
driver on host side is cdc_ether

rest is DYO,
peace:)
p.s. in usb_compositions use: n,n,y,y
if you screw it up, reboot, its non-presistent.

Hi there! I was able to enable RDINS/ECM interface on my EM7455 following this material, thanks for the effort ! What I am struggling right now is to be able to get and assign WAN IP on rmnet_data0 as you mentioned in the other post. I also tried to assign the +CGPADDR=1 address manually on rmnet_data0 but no connectivity is received. How did you establish WWAN connectivity directly in the the modem? Once that’s done I can see that I can setup NAT inside the modem easily. Thank you!