Marc's Public Blog - Linux Hacking


All | Aquariums | Arduino | Btrfs | Cars | Cats | Clubbing | Computers | Diving | Dreamstate | Edc | Electronics | Exercising | Festivals | Flying | Halloween | Hbot | Hiking | Linux | Linuxha | Monuments | Museums | Oshkosh | Outings | Public | Rc | Sciencemuseums | Solar | Tfsf | Trips



>>> Back to post index <<<

2024/11/11 Adding USB-Serial and USB-Storage to Ubiquity Edgerouter 4
π 2024-11-11 01:01 in Computers, Linux
So, after using WNDR routers that allowed various linux fimrware replacements, the last one I had was just struggling running a name server and other things I needed due to old hardware and lack of horsepwoer and RAM.

After asking around, I was told to try the Ubiquity Edgerouter 4, which is indeed a nice little router and comes with linux out of the box. The best thing is it's designed to give you full access so you can install your own linux software. Well done!


But, for some strange reason, the then wonderful people at ubiquity did not figure out that it was useful to plug a serial port adapter to monitor or connect to another device, or even to use/need external USB storage. It is of course linux, you can build your own kernel and modules, but doing it for another architecture requires cross compilers and a non trivial setup that would likely have taken me days to setup.

This is where Nils Andreas Svee (Lockhair) comes in, and as part of his CAKE project to improve networking on that device (requiring a new kernel), he built a full compiler suite for that kernel, and very nicely added USB serial modules to his build for me a few years back for the ER1.x firmware.

Fast forward a few years, and the original 1.10.11 was based on Debian 7 (Wheezy) which became totally obsolete. Getting updated packages for that ancient distro became difficult, so I figured I should upgrade to 2.x.
After doing so ( EdgeRouter ER-4/ER-6P/ER-12/ER-12P: Firmware v2.0.9-hotfix.7 31 Jul 2023 from https://ui.com/download/releases/firmware ), I of course realized it was a new kernel that needed new modules.

But then I realized that during that time Ubiquity turned evil and stopped releasing GPL required code, including the kernel, which in turn caused Lochnair to stop being able to maintain his project: https://community.ui.com/questions/CAKE-thread-gone/27de66b2-9ac2-4fcb-93f7-d02cd5785b4c

I had a glimmer of hope that the new binary kernels were close enough to the last officially released kernel source, and asked him if he could build the extra missing modules: https://github.com/Lochnair/kernel_e300/issues/2 . He super nicely agreed and they worked!

Thanks to him, I now have have a fully upgraded and featured linux route with usb-serial support and usb-storage support.

You can get the modules here: 4.9.79-UBNT Serial and USB-Storage Modules << DOWNLOAD ME

  • lib/modules/4.9.79-UBNT/kernel/drivers/usb/misc/ezusb.ko
  • lib/modules/4.9.79-UBNT/kernel/drivers/usb/storage/uas.ko
  • lib/modules/4.9.79-UBNT/kernel/drivers/usb/class/cdc-wdm.ko
  • lib/modules/4.9.79-UBNT/kernel/drivers/usb/serial/pl2303.ko
  • lib/modules/4.9.79-UBNT/kernel/drivers/usb/serial/ftdi_sio.ko
  • lib/modules/4.9.79-UBNT/kernel/drivers/usb/serial/usbserial.ko
  • lib/modules/4.9.79-UBNT/kernel/drivers/usb/serial/keyspan.ko
  • usbcore: registered new interface driver pl2303 usbserial: USB Serial support registered for pl2303 pl2303 1-1.1:1.0: pl2303 converter detected usb 1-1.1: pl2303 converter now attached to ttyUSB0 usbcore: registered new interface driver uas usb 1-1.2: new high-speed USB device number 4 using xhci-hcd usb 1-1.2: New USB device found, idVendor=0951, idProduct=1666 usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1.2: Product: DataTraveler 3.0 usb 1-1.2: Manufacturer: Kingston usb 1-1.2: SerialNumber: 1C6F654E48EBB131D95D0ABB usb-storage 1-1.2:1.0: USB Mass Storage device detected scsi host0: usb-storage 1-1.2:1.0 scsi 0:0:0:0: Direct-Access Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6 sd 0:0:0:0: [sda] 121110528 512-byte logical blocks: (62.0 GB/57.8 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 45 00 00 00 sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sd 0:0:0:0: [sda] Attached SCSI removable disk

    If you use this, please make a donation to him for his good work:

  • https://paypal.me/nsvee.
  • https://wise.com/pay/me/nilsandreass

  • More pages: July 2002 February 2004 March 2004 November 2004 April 2005 August 2005 January 2006 July 2006 August 2007 November 2007 January 2008 October 2008 November 2008 December 2008 January 2009 May 2009 July 2009 August 2009 September 2009 November 2009 December 2009 January 2010 March 2010 April 2010 June 2010 August 2010 October 2010 January 2011 July 2011 August 2011 December 2011 January 2012 March 2012 May 2012 August 2012 December 2012 January 2013 March 2013 May 2013 September 2013 November 2013 January 2014 March 2014 April 2014 May 2014 October 2014 January 2015 March 2015 May 2015 January 2016 February 2016 June 2016 July 2016 August 2016 October 2016 January 2017 September 2017 January 2018 March 2018 December 2018 January 2019 January 2020 May 2020 January 2021 September 2021 March 2023 April 2023 December 2023 June 2024 November 2024

    >>> Back to post index <<<

    Contact Email