I am trying to connect usb ethernet huawei device to connect to the internet. i am using board viola with imx7 1GB. but since the device is not detecting as ethernet. dmesg and lsusb logs are shown below
[ 812.736875] usb 2-1: new high-speed USB device number 7 using ci_hdrc
[ 812.789604] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 812.792852] scsi host0: usb-storage 2-1:1.0
[ 813.809405] scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
colibri-imx7-06448499:~$ lsusb
Bus 002 Device 007: ID 12d1:1f01 Huawei Technologies Co., Ltd. E353/E3131 (Mass storage mode)
ifconfig logs are below
colibri-imx7-06448499:~$ ifconfig
docker0 Link encap:Ethernet HWaddr 02:42:f9:b2:46:10
inet addr:172.17.0.1 Bcast:172.17.255.255 Mask:255.255.0.0
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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth0 Link encap:Ethernet HWaddr 00:14:2d:62:65:73
inet addr:10.42.0.181 Bcast:10.42.0.255 Mask:255.255.255.0
inet6 addr: fe80::f5ff:dfad:de91:39d7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6191 errors:0 dropped:0 overruns:0 frame:0
TX packets:5528 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:517025 (504.9 KiB) TX bytes:2432911 (2.3 MiB)
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:183 errors:0 dropped:0 overruns:0 frame:0
TX packets:183 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20006 (19.5 KiB) TX bytes:20006 (19.5 KiB)
Greetings @kishanjoshi,
Can you please state what exact Huawei device you’re trying to use?
Probably what’s going on is that you need to add a driver to the Kernel for this device.
Best Regards,
Jeremias
Hi
i already enabled kernel drivers but the problem is that this dongle E353 required usb_modeswitch. but when i added IMAGE_INSTALL_append = " usb_modeswitch usb_switch-data" in the local.conf it is showing me error below.
ERROR: usb
-modeswitch-2.5.2-r0 do_package: QA Issue: usb-modeswitch:
Files/directories were installed but not shipped in any package:
/lib
/lib/udev
/lib/udev/usb_modeswitch
Please set FILES such that these items are packaged. Alternatively if they
are unneeded, avoid installing them or delete them within do_install.
usb-modeswitch: 3 installed and not shipped files. [installed-vs-shipped]
ERROR: usb-modeswitch-2.5.2-r0
do_package: Fatal QA errors found, failing task. ERROR: Logfile of
failure stored in: /home/build/yocto/build-colibri-imx7/tmp-torizon/work/armv7at2hf-neon-tdx-linux-gnueabi/usb-modeswitch/2.5.2-r0/temp/log.do_package.12896
ERROR: Task (/home/build/yocto/build-colibri-imx7/conf/../../layers/meta-openembedded/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.2.bb:do_package) failed with exit code '1
Hi
Which image did you build?
Which repo branch are you using?
Have you done any other changes to local.conf or other files?
If yes, can you share the changes?
Best regards,
Jaski
Hi @kishanjoshi,
Regarding your yocto build it seems the main issue is that for the usb_modeswitch package the added files were packaged but not shipped. Which is a nuanced difference in yocto land.
According to the usb_modeswitch recipe in yocto it tries to install files in /lib/udev
but I believe this path doesn’t exist in the Torizon file system as we have udev configurations in /etc/udev
. The fix would be to modify the usb_modeswitch recipe to install files to /etc/udev
instead.
Though could you also attach the log file referenced by your build error just so I can see if I’m missing anything.
Best Regards,
Jeremias
This is exactly what is happening. You can simulate logs by following above mentioned tutorial.
And then i used
MACHINE=colibri-imx7 source setup-enviornment
And then i got error.
I just added usb-modeswitch in local.conf by following tutorial and gt error.
Can you guide me how can i edit usb-modeswitch recipe
HI @kishanjoshi
Could you provide the error log asked by @jeremias.tx?
Thanks and best regards,
Jaski
error: logs
and attached files for logs
ERROR: usb-modeswitch-2.5.2-r0 do_package: QA Issue: usb-modeswitch: Files/directories were installed but not shipped in any package:
/lib
/lib/udev
/lib/udev/usb_modeswitch
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
usb-modeswitch: 3 installed and not shipped files. [installed-vs-shipped]
ERROR: usb-modeswitch-2.5.2-r0 do_package: Fatal QA errors found, failing task.
ERROR: Logfile of failure stored in: /home/build/yocto/build-colibri-imx7/tmp-torizon/work/armv7at2hf-neon-tdx-linux-gnueabi/usb-modeswitch/2.5.2-r0/temp/log.do_package.8597
ERROR: Task (/home/build/yocto/build-colibri-imx7/conf/…/…/layers/meta-openembedded/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.2.bb:do_package) failed with exit code ‘1’
link text
Hi @kishanjoshi,
After some investigation I found the cause of the build error.
First of all I was mistaken earlier when I said Torizon doesn’t have a /lib/udev
directory, it does but due to OSTree we use a usrmerge method that places the real /lib/udev
under /usr
.
This conflicts with usb-modeswitch
which uses an installation script that installs under /lib
when it should really be installing under /usr/lib
.
Anyways here are the changes I made to the meta-openembedded
layer in the yocto build:
diff --git a/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch-data_20170806.bb b/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch-data_20170806.bb
index 6abd941..d5dd659 100644
--- a/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch-data_20170806.bb
+++ b/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch-data_20170806.bb
@@ -11,7 +11,7 @@ SRC_URI[md5sum] = "fb50d15b52e909d742dd16f0a9882316"
SRC_URI[sha256sum] = "ce413ef2a50e648e9c81bc3ea6110e7324a8bf981034fc9ec4467d3562563c2c"
do_install() {
- oe_runmake install DESTDIR=${D}
+ oe_runmake install DESTDIR=${D} RULESDIR=${D}${nonarch_base_libdir}/udev/rules.d
}
RDEPENDS_${PN} = "usb-modeswitch (>= 2.4.0)"
diff --git a/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.2.bb b/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.2.bb
index 33e40b3..5e33caf 100644
--- a/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.2.bb
+++ b/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.2.bb
@@ -19,7 +19,7 @@ RDEPENDS_${PN} = "tcl"
RRECOMMENDS_${PN} = "usb-modeswitch-data"
do_install() {
- oe_runmake DESTDIR=${D} install
+ oe_runmake DESTDIR=${D} UDEVDIR=${D}${nonarch_base_libdir}/udev install
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}/${systemd_unitdir}/system
install -m 644 ${S}/usb_modeswitch@.service ${D}/${systemd_unitdir}/system
I tested these changes in my personal build without error so let me know if this still doesn’t work.
Best Regards,
Jeremias
Can you guide me how can i apply this changes ? To the file ?
Hi
You need to find the file meta-oe/recipes-support/usb-modeswitch/usb-modeswitch-data_20170806.bb
and edit/change it accoring to the information above. This git diff
output shows exactly what was changed. The sign -, which line was deleted and + which line was added. These signs are not part of the changes to do and should not be added to the file.
Best regards,
Jaski
can i use git am apply command to it ?
Yes git apply can be used to apply the output of a git diff as a patch.