WiFi HotSpot and G_Ether

I would like to setup the DietPi WiFi HotSpot on a Raspberry Pi Zero that I’m connected to through ethernet over USB (g_ether). It fails to work because the installation first checks for an Ethernet connection, but does not detect the g_ether connection.

Required Information

  • DietPi version | v8.17.2
  • Distro version | bullseye 1
  • Kernel version | Linux audpi 6.1.21+ #1642 Mon Apr 3 17:19:14 BST 2023 armv6l GNU/Linux
  • Architecture | armhf
  • SBC model | RPi Zero W (armv6l)
  • Power supply used | 5V 2A
  • SD card used | 64 GB, A2, U3

Steps to reproduce

  1. I’ve got a link-local ethernet-over-usb connection using g_ether:

    2: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 2e:35:6f:61:0e:38 brd ff:ff:ff:ff:ff:ff
    inet 169.254.0.1/24 brd 169.254.0.255 scope global usb0
       valid_lft forever preferred_lft forever
    inet6 fe80::2c35:6fff:fe61:e38/64 scope link 
       valid_lft forever preferred_lft forever
    
  2. I connect to the device (a Pi Zero) over this connection using ssh: ssh root@169.254.0.1

  3. I try to install, using dietpi-software60 WiFi Hotspot: turn your device into a WiFi hotspot

  4. It complains with:

How do I get it to pass the Ethernet check by noticing the usb0 connection?

Also, where can I find the source code for that WiFi Hotspot software?

I see that similar issues have been raised before, with manual alternatives noted:

This is a known limitation of our script. Actually, we check explicitly for eth0 interface, ignoring other interfaces. Basically 3 options at this stage

  • perform installation manually
  • use different software like RaspAP
  • adjust our script manually to check for usb0 instead of eth0

@Joulinar is RaspAP known to work out of the box on DietPi? I’m considering running their “Quick Installer” script.

@Joulinar How do I go with this option? Where is the script source?

The script is at /boot/dietpi/dietpi-config, eth0 is mentioned only two times, at line 1842 and 2194.
The install script itself (/boot/dietpi/dietpi-software) doesn’t check which interface you use, only if there is one with an assigned IP (eth online check).

Don’t do it at this script. It’s the wrong place.

At GitHub :wink:

It should be enough to modify 2 lines within dietpi-software

and

Yes should be working best to my knowlage.

Many thanks @Joulinar and @Jappe !

So best practice would be to fork dietpi, make the customizations and then gitclone it? Or what do you mean with wrong place?

I think he just meant that it would be better to edit dietpi-software rather than dietpi-config.

1 Like

correct. Maybe I was not clear enough :smiley: Sorry for that. Thx for clarification.

1 Like