Skip to main content

Archlinux USB Tethering

I was greatly surprised that my Archlinux immediately recognized my USB Tethering phone (Samsung Note 20 Ultra 5G)!

I first plugged the USB-C cable, then went to the "Mobile hotspot and Tethering" menu to activate the "USB Tethering":


 

Then with "journalctl -f" we can see the USB activity:

Jun 10 17:48:42 universe kernel: usb 1-1: new high-speed USB device number 19 using xhci_hcd
Jun 10 17:48:43 universe kernel: usb 1-1: New USB device found, idVendor=04e8, idProduct=6860, bcdDevice= c.00
Jun 10 17:48:43 universe kernel: usb 1-1: New USB device strings: Mfr=7, Product=8, SerialNumber=9
Jun 10 17:48:43 universe kernel: usb 1-1: Product: SAMSUNG_Android
Jun 10 17:48:43 universe kernel: usb 1-1: Manufacturer: SAMSUNG
Jun 10 17:48:43 universe kernel: usb 1-1: SerialNumber: R5CN80H7WKZ


Then this

Jun 10 17:48:56 universe kernel: usb 1-1: USB disconnect, device number 19
Jun 10 17:48:56 universe kernel: usb 1-1: new high-speed USB device number 20 using xhci_hcd
Jun 10 17:48:56 universe kernel: usb 1-1: New USB device found, idVendor=04e8, idProduct=6863, bcdDevice= c.00
Jun 10 17:48:56 universe kernel: usb 1-1: New USB device strings: Mfr=7, Product=8, SerialNumber=9
Jun 10 17:48:56 universe kernel: usb 1-1: Product: SAMSUNG_Android
Jun 10 17:48:56 universe kernel: usb 1-1: Manufacturer: SAMSUNG
Jun 10 17:48:56 universe kernel: usb 1-1: SerialNumber: R5CN80H7WKZ
Jun 10 17:48:56 universe vmnet-natd[706]: RTM_NEWLINK: name:usb0 index:8 flags:0x00001002
Jun 10 17:48:56 universe vmnetBridge[678]: RTM_NEWLINK: name:usb0 index:8 flags:0x00001002
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9138] manager: (usb0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/9)
Jun 10 17:48:56 universe kernel: rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-1, RNDIS device, f2:eb:10:ab:5b:1e
Jun 10 17:48:56 universe systemd-udevd[84302]: Using default interface naming scheme 'v247'.
Jun 10 17:48:56 universe systemd-udevd[84302]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jun 10 17:48:56 universe vmnet-natd[706]: RTM_NEWLINK: name:usb0 index:8 flags:0x00001002
Jun 10 17:48:56 universe vmnetBridge[678]: RTM_NEWLINK: name:usb0 index:8 flags:0x00001002
Jun 10 17:48:56 universe kernel: rndis_host 1-1:1.0 enp0s20f0u1: renamed from usb0
Jun 10 17:48:56 universe vmnetBridge[678]: RTM_NEWLINK: name:enp0s20f0u1 index:8 flags:0x00001002
Jun 10 17:48:56 universe vmnet-natd[706]: RTM_NEWLINK: name:enp0s20f0u1 index:8 flags:0x00001002
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9388] device (usb0): interface index 8 renamed iface from 'usb0' to 'enp0s20f0u1'
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9434] device (enp0s20f0u1): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 10 17:48:56 universe vmnet-natd[706]: RTM_NEWLINK: name:enp0s20f0u1 index:8 flags:0x00011043
Jun 10 17:48:56 universe vmnetBridge[678]: RTM_NEWLINK: name:enp0s20f0u1 index:8 flags:0x00011043
Jun 10 17:48:56 universe vmnetBridge[678]: Adding interface enp0s20f0u1 index:8
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9438] device (enp0s20f0u1): carrier: link connected
Jun 10 17:48:56 universe vmnetBridge[678]: Started bridge enp0s20f0u1 to virtual network 0.
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9447] device (enp0s20f0u1): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Jun 10 17:48:56 universe vmnet-natd[706]: RTM_NEWLINK: name:enp0s20f0u1 index:8 flags:0x00011043
Jun 10 17:48:56 universe vmnetBridge[678]: RTM_NEWLINK: name:enp0s20f0u1 index:8 flags:0x00011043
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9452] policy: auto-activating connection 'ATS' (e545aae1-5790-4d08-8fa0-f5c6ec7df855)
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9455] device (enp0s20f0u1): Activation: starting connection 'ATS' (e545aae1-5790-4d08-8fa0-f5c6ec7df855)
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9456] device (enp0s20f0u1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 10 17:48:56 universe systemd-udevd[84302]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9458] manager: NetworkManager state is now CONNECTING
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9460] device (enp0s20f0u1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9465] device (enp0s20f0u1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9467] dhcp4 (enp0s20f0u1): activation: beginning transaction (timeout in 45 seconds)
Jun 10 17:48:56 universe vmnetBridge[678]: RTM_NEWLINK: name:enp0s20f0u1 index:8 flags:0x00011043
Jun 10 17:48:56 universe vmnet-natd[706]: RTM_NEWLINK: name:enp0s20f0u1 index:8 flags:0x00011043
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9503] dhcp4 (enp0s20f0u1): state changed unknown -> bound, address=192.168.134.174
Jun 10 17:48:56 universe vmnet-natd[706]: RTM_NEWADDR: index:8, addr:192.168.134.174
Jun 10 17:48:56 universe vmnet-natd[706]: RTM_NEWROUTE: index:8
Jun 10 17:48:56 universe vmnetBridge[678]: RTM_NEWROUTE: index:8
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9512] device (enp0s20f0u1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jun 10 17:48:56 universe dbus-daemon[524]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.2' (uid=0 pid=525 comm="/usr/bin/NetworkManager --no-daemon ")
Jun 10 17:48:56 universe systemd[1]: Starting Network Manager Script Dispatcher Service...
Jun 10 17:48:56 universe dbus-daemon[524]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jun 10 17:48:56 universe systemd[1]: Started Network Manager Script Dispatcher Service.
Jun 10 17:48:56 universe audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9593] device (enp0s20f0u1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9595] device (enp0s20f0u1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9599] manager: NetworkManager state is now CONNECTED_LOCAL
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9606] manager: NetworkManager state is now CONNECTED_SITE
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9607] policy: set 'ATS' (enp0s20f0u1) as default for IPv4 routing and DNS
Jun 10 17:48:56 universe NetworkManager[525]:   [1623336536.9613] device (enp0s20f0u1): Activation: successful, device activated.
Jun 10 17:48:56 universe kernel: audit: type=1130 audit(1623336536.955:352): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 10 17:48:56 universe vmnet-natd[706]: RTM_NEWADDR: index:8, addr:192.168.134.174
Jun 10 17:48:57 universe kernel: userif-5: sent link down event.
Jun 10 17:48:57 universe kernel: userif-5: sent link up event.
Jun 10 17:48:58 universe vmnet-natd[706]: RTM_NEWADDR: index:8, addr:192.168.134.174
Jun 10 17:48:58 universe kernel: userif-5: sent link down event.
Jun 10 17:48:58 universe kernel: userif-5: sent link up event.
Jun 10 17:49:02 universe NetworkManager[525]:   [1623336542.5337] manager: NetworkManager state is now CONNECTED_GLOBAL
Jun 10 17:49:02 universe vmnetBridge[678]: RTM_NEWROUTE: index:8
Jun 10 17:49:02 universe vmnet-natd[706]: RTM_NEWADDR: index:8, addr:192.168.134.174
Jun 10 17:49:02 universe vmnetBridge[678]: RTM_DELROUTE: index:8
Jun 10 17:49:02 universe vmnet-natd[706]: RTM_NEWROUTE: index:8
Jun 10 17:49:02 universe vmnet-natd[706]: RTM_DELROUTE: index:8
Jun 10 17:49:02 universe kernel: userif-5: sent link down event.
Jun 10 17:49:02 universe kernel: userif-5: sent link up event.
Jun 10 17:49:06 universe systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Jun 10 17:49:06 universe audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 10 17:49:06 universe kernel: audit: type=1131 audit(1623336546.895:353): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

And the result is:

6: enp0s20f0u1:  mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether 7a:37:fb:a9:48:11 brd ff:ff:ff:ff:ff:ff
    inet 192.168.134.174/24 brd 192.168.134.255 scope global dynamic noprefixroute enp0s20f0u1
       valid_lft 3590sec preferred_lft 3590sec
    inet6 fe80::1836:8d42:d305:7b93/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Popular posts from this blog

npm run build base-href

Using NPM to specify base-href When building an Angular application, people usually use "ng" and pass arguments to that invocation. Typically, when wanting to hard code "base-href" in "index.html", one will issue: ng build --base-href='https://ngx.rktmb.org/foo' I used to build my angular apps through Bamboo or Jenkins and they have a "npm" plugin. I got the habit to build the application with "npm run build" before deploying it. But the development team once asked me to set the "--base-href='https://ngx.rktmb.org/foo'" parameter. npm run build --base-href='https://ngx.rktmb.org/foo did not set the base href in indext.html After looking for a while, I found https://github.com/angular/angular-cli/issues/13560 where it says: You need to use −− to pass arguments to npm scripts. This did the job! The command to issue is then: npm run build -- --base-href='https://ngx.rktmb.org/foo&

dockerfile multiline to file

Outputing a multiline string from Dockerfile I motsly use a Dockerfile by sourcing from a base ditribution: CentOS or Debian. But I also have a local mirror and would like to use it for packages installation. Espacially on CentOS it is about many lines to write to the /etc/yum.repos.d/CentOS-Base.repo file. Easiest way: one RUN per line The first method that comes in mind is to issue one RUN per line to write. Here you are: RUN echo "[base] " > /etc/yum.repos.d/CentOS-Base.repo RUN echo "name=CentOS-$releasever - Base " >> /etc/yum.repos.d/CentOS-Base.repo RUN echo "baseurl=ftp://packages-infra.mg.rktmb.org/pub/centos/7/base-reposync-7 " >> /etc/yum.repos.d/CentOS-Base.repo RUN echo "gpgcheck=0 &quo

Emacs TypeScript Development

Emacs Configuration for Typescript In order to comfortably develop on Node, React or Angular projects with Emacs, TIDE is a good solution. We have TypeScript code highlight (that is the minimum!) and code completion based on the codebase (not only on locally defined and builtins) In order to achieve that: Install Emacs (24+) Install Node Install Typescript (which will provide "tsserver") Install TIDE and some usefull dependencies Configure Emacs to use all those Node is then installed in " /home/mihamina/Apps/node-v12.18.0-linux-x64/bin ": you should add it to your PATH. Installing Typescript is done with: npm install --save typescript @types/browserify After that, "tsserver" will be in " /home/mihamina/node_modules/.bin " Then comes the installation of TIDE: With the Emacs package manager, M-x package-install , install "tide". Do the same for "web-mode", "flycheck", "company" "js2-mode" and "