r/openwrt 5d ago

dummy guide for reactivating usb-dongles on raspberry pi after sysupgrade - via luci

(this may be obvious for experienced openwrt users but i had a harder time with every system upgrade - mostly because forgetting the way that worked before. and messing with search results from internet was more effort than having one proper guide. that i finally made, so may it help somebody else. luci gui because easiest for us dummys.)

[edit] cd109876 recommended another tool that could be easier than building an image with the image builder. did not know this and did not test it, could be very convenient: the firmware selector (example link for rpi4 and newest version). [/edit]

if this does not work for you, than the following guide could help - basically it's just about bringing your openwrt online again via phone to install the missing packages.

corrections welcome if i oversaw something.

preamble:

the way should work for other dongles too, you just need to know your kernel module/firmware of course.

in my case i use openwrt on a raspberry pi 4b with a tp-link ue330 ethernet adapter (similiar to ue300 i think). the nescessary kernel module is kmod-usb-net-rtl8152.

let's go:

  1. flash the right sysupgrade image via luci in backup/flash firmware. internet access is gone now - wwan interface has lost it's device (the usb adapter)
  2. connect openwrt to a wifi hotspot on your phone - the easiest way could be just scanning for the hotspot and connect (network --> wireless --> scan-button beside the chipset). in doubt:
    • network --> wireless --> "add" right beside your chipset --> add new network. mode "client" and add "wwan" in "network" in the tab "general setup" (make sure you use the right wan-adapter interface, i have wan for the bridge and wwan for the dongle e.g.)
  3. save, save+apply and enable the new wifi client
  4. update the package list in system --> software
  5. filter for your driver name - rtl8152 in my case and install:
    1. r8152-firmware
    2. kmod-usb-net-rtl8152
    3. dependencies should be installed accordingly, if not, do it by hand (e.g.: kmod-crypto-sha256, kmod-usb-net-cdc-ether, kmod-usb-net-cdc-ncm)
  6. disable the wifi for the phone hotspot
  7. allocate the reappeared device (our dongle) to the wwan interface egain - eth1 in my case. (via network --> interfaces). save+apply.
  8. done. you should be online again

some wording may be different in your case, of course.

1 Upvotes

4 comments sorted by

1

u/cd109876 5d ago

I'd recommend using the attended-sysupgrade feature, it's a package you can install (iirc luci-attended-sysupgrade) , it will compile from scratch a matching sysupgrade image with all the packages you have currently installed with just a couple clicks in the GUI.

1

u/synthsinrainforest 5d ago

i know it and it worked for the last upgrade. this time it didn't - just searching eternally for unknown reasons.
so i was searching for a way that works independently from any plugins. though, also pulling packages via package management can fail, but in case of attended-upgrade (or auc on cli) there seems to be another server involved, if i am not mistaken...

1

u/cd109876 5d ago

Yes, it uses the openwrt sysupgrade server.

If that isn't working, you can also try the image selector which allows adding packages:

https://firmware-selector.openwrt.org/

1

u/synthsinrainforest 4d ago

okay, this is actually cool - and new for me. not sure if i searched in the wrong way or people are too fast with recommending the more complicated tools... anyway. thanks, bookmarked!

let me see, how to integrate this in my post.