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



Table of Content for computers:

More pages: November 2024 June 2024 April 2024 December 2023 August 2021 May 2020 February 2016 July 2014 December 2013 November 2013 January 2013 August 2011 July 2011 August 2010 June 2010 May 2010 March 2010 February 2010 December 2009 November 2009 March 2009 July 2002 October 2001



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
  • 2024/11/10 Getting Things Done in an ADHD World
    π 2024-11-10 01:01 in Arduino, Computers, Electronics
    I attended Pasadena Hackaday Supercon, so I figured I'd put my pictures into a quick blog entry, shouldn't take long...


    1) Oh, I need to finish writing code to get the SAO badge holder to do something fun

    2) Mmmh, why does this python global variable thing doessn't work in the function

    3) Goes to re-learn python, with help from gemini and how python forks global variables by default in functions so what you write to them isn't saved at local scope (oh my, why did they do that?)

    4) after more hacking, get a proper demo working:

    5) publish code https://github.com/marcmerlin/2024-Supercon-8-Add-On-Badge/blob/main/README.md (actual code is here: https://github.com/marcmerlin/2024-Supercon-8-Add-On-Badge/blob/main/software/software/main.py )

    6) Oh, I need to make a video demo of the SAO, but...

    7) oh yeah, there was that hat on my desk I needed to add LEDs on for an upcoming party, start hacking on that

    8) mmmh, the hat won't work long enough with a USB battery, start hacking on a lipo solution

    9) ah, lipos work, but the front LED panels rated for 5V start failing around 3.5V, so I need to make a dual lipo solution, one for the neopixels and one for the RGB panels

    10) test and measure the dual lipo solution and figure out it will last close to 12H, that's good. Ok, hat works mostly, post that https://www.instagram.com/p/DCYEl1jJd_-
    11) Ah yes, the SAO video I was supposed to work on: https://www.youtube.com/watch?v=z7MSywf7js4

    12) During that time, I get interesting distracting packages on my doorstep, like lovely flexible LED panels that will hopefully power my future outfit: https://rpi-rgb-led-matrix.discourse.group/t/rpi0-2w-speed-compared-to-rpi3a/913/2

    13) While I'm testing them, also try some new rPi0 2w chips and microcontrollers to see if they can power my LED outfit with a smaller form factor (and yes they can): https://rpi-rgb-led-matrix.discourse.group/t/rpi0-2w-speed-compared-to-rpi3a/913 . In the interest of briefty, I'm going to skip the part that included migrating from raspbian to a new dietpi linux distro and port back all my custom changes on it :)

    14) That said, I had a long-ish discussion and planning with the electrodragon folks in China on how to make a new 3 channel daughter board that is much smaller and would decrease the over footprint of all new picture frames like the one I built, and of course my LED outfit.

    15) but wait, now I also find out there is a new beaglebone solution that does 6 channels output instead of 3? Ok, make a post about it: https://rpi-rgb-led-matrix.discourse.group/t/interesting-6-port-board-beaglebone-pocketcroller-v2/918/2

    16) and file a couple of RFE bugs to look into it: https://github.com/hzeller/rpi-rgb-led-matrix/issues/1733 + https://github.com/FalconChristmas/fpp/issues/2054

    17) Oh, I just found this old video on my laptop, why did I never post it? Ok, fix that: https://marc.merlins.org/perso/linux/post_2021-01-23_Linux_conf_au-2021-LED-Talk.html

    18) Mmmh, so when I quickly posted those pictures from Neil deGrasse Tyson who just gave a talk, I got a reminder it was annoying for my blog system not to be able to link to videos directly without having to upload them to youtube.

    19) Ok, learn about html5 video tag, hack my blog system to support videos, and push a new blog with my first video tag: https://marc.merlins.org/perso/outings/post_2024-11-14_Neil-deGrasse-Tyson-back-at-San-Jose-Center-for-Performing-Arts_-An-Astrophysicist-Goes-To-The-Movies_-the-Sequel.html

    20) ok, but why did I have to rescue my video from my phone because the H265 recompressed version did not work in the blog? Ah, because of royalties on H265 being too high, most browsers refuse to add support for it: http://marc.merlins.org/perso/linux/post_2024-11-17_Vidrename-Script_-Clean-up-Normalize-Video-Filenames-and-Add-Codec-And-Container-Format-With-Mplayer.html

    21) Ok, sure, but now I need to upgrade my vidcomp script to support VP9 and AV1: http://marc.merlins.org/perso/linux/post_2024-11-17_Vidcomp-Script_-recompress-videos-on-linux-with-mencoder-or-ffmpeg-to-div3_-div4_-div5_-xvid_-mpeg4_-h264_-h265_-VP9_-and-AV1.html

    22) then I find an Email from a chinese engineer who is willing to talk to me about making better LED shoes. That's exciting, let me reply to him first

    23) ok, now I can recompress my videos to VP9, which I benchmarked to somehow be faster to compress and still smaller file size than AV1 (not supposed to be the case, but that's what I'm getting). On the plus side, VP9 works with more browsers than AV1.

    24) what as I doing again? (now days have passed). Oh yes, I was supposed to write a blog on hackaday supercon: http://marc.merlins.org/perso/electronics/post_2024-11-01_Pasadena-Hackaday-Supercon-2024.html

    25) of course the ridiculous amount of time spent to allow these 2 videos in that post, is a bit hard to justify, but it's really solving a problem I've had for over 10 years, and never got to the top of the pile, because, well, you see what happens when I try to put something on top of the pile :)

    26) and I was good, I didn't even play with the micropython rpi micro I received in the mail this week, or the electromage pixelblaze and I/O board, or more LED panels that somehow showed up at my doorstep :)

    27) mmmh, and there are all those webcams I ordered and need to configure, but now it's clear I'm going to have to re-install my camera controller, shinobi, from scratch, and that's yet another rabithole...

    28) in the meantime I have to finish my LED hat, and design my new shirt and pants for Dreamstate in 4 days... Wish me luck :)


    More pages: November 2024 June 2024 April 2024 December 2023 August 2021 May 2020 February 2016 July 2014 December 2013 November 2013 January 2013 August 2011 July 2011 August 2010 June 2010 May 2010 March 2010 February 2010 December 2009 November 2009 March 2009 July 2002 October 2001

    Contact Email