Support Me
Get a discount on Ekster Products
https://shop.ekster.com/devodyssey or discount code "DEV" at checkout!
(PAID Link)
Follow me on Twitter and Facebook
https://twitter.com/Dev_Odyssey
https://www.facebook.com/Dev0dyssey
Description
Welcome back to Dev Odyssey! In this episode, we're harnessing the power of USB OTG to power and connect to our OpenWrt 21.02 Raspberry Pi, via serial and ethernet, all with one USB-C cable. Briefly, USB OTG allows your devices to switch between host and device mode, depending on the scenario. For example, it lets your phone act as USB host, when you plug in a flash drive, but also lets your phone act as a USB device, when you plug in your phone, to your computer. For the wanderlust developer who needs to pack light, OTG compliments their travel requirements. For those who despise cable clutter, OTG is also for you. The use cases are vast, from serial, ethernet, mass storage, use with a USB C Tablet, like an iPad, improved connection stability, and more. With all the possible combinations, you're only limited by the USB guest configurations available.
Best of all, USB OTG is not limited to Raspberry Pi or Raspberry Pi OS. So long as your device, or single board computer, has a USB OTG enabled port, and an operating system thats supports it, then you can reap the same benefits of USB OTG. Watch till the end to see two of the most useful examples of USB OTG configurations!
Links
Hardware
Raspberry Pi 4B
https://rpilocator.com/?cat=PI4
Cat 5/6 Ethernet Cable
USB-C to USB-C Cable
Software
OpenWrt USB Guest configuration
https://openwrt.org/docs/guide-user/hardware/usb_gadget
OpenWrt OTG Serial Config
https://gist.github.com/odevodyssey/d330b9253cc34bcc978dbe415e041f54
OpenWrt OTG Serial And Ethernet Config
https://gist.github.com/odevodyssey/5b14d3105dc20fbb55120ad2b3731937
OpenWrt OTG Ethernet Config
https://gist.github.com/odevodyssey/37d4bdaa89a29d40f760ea44c6a12e59
OpenWrt Packages Used
Serial Only
kmod-usb-dwc2
kmod-usb-gadget-serial
Serial and Ethernet
kmod-usb-dwc2
kmod-usb-gadget-cdc-composite
Ethernet Only
kmod-usb-dwc2
kmod-usb-gadget-eth
00:00 Intro
00:54 OTG Explanation
01:42 OTG Benefits
02:52 Hardware / Software
03:43 OTG Serial Config
07:17 OTG Serial + Ethernet Config
13:33 Closing Notes
14:17 Outro
Attributions
Music | "Ocean Love" by LiQWYD
Watch: https://youtu.be/xjv66pH_jP4
License: https://www.liqwydmusic.com/how-to-use
Download/Stream: https://hypeddit.com/liqwyd/oceanlove
Icons made by Freepik, runkanicon, iconmas from Flaticon
https://www.flaticon.com
Raspberry Pi trademark of Raspberry Pi Trading
OpenWrt is a registered trademark owned by Software Freedom Conservancy (SFC)
#RaspberryPi #OpenWrt #USBOTG #Router