It's fast and easy, and you can get in contact with others straight away...

Enter a Display Name
Enter your full name or a display name. Businesses, couples and families are also accepted. e.g.
Model Trains Inc.,
Sam and Janis Allen
Enter a username
Your username must be at least 6 characters in length, contain both letters and numbers and end in a number, but can not contain spaces or other characters.
Suggested usernames:
Password strength:
Your password can be up 250 characters in length and can contain letters, numbers, punctuation marks and spaces.
Hint: a secure password is long but easy to remember and not complex, e.g.
Jules Verne is an excellent author
Retype password
Enter the same password again to check for errors.

By signing up you agree to our Terms of Use & Privacy Policy

 

    Give Raspberry Pi a fixed hardware address when it keeps changing


    When plugging a Raspberry Pi Zero W, or any RPi, you have probably found out it assigns a new network ID every time it connects to your computer or laptop by USB. Then, it is fed the 10.0.0.1/24 static IP to get the network connection work.

    One suggestion was to configure g_ether through /etc/modprobe.d/g_ether.conf - but that didn't work for us.

    Alternatively, it turns out you can configure g_ether through /boot/cmdline.txt using the following steps:

    1. In a terminal, log in to your RPi with ssh pi@10.0.0.2

    2. Get your network IDs using dmesg | grep MAC

    The values after HOST MAC and MAC will be used. (Your output might differ from this):

    pi@pwnagotchi:~ $ dmesg | grep MAC
    [    1.691085] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
    [    5.535418] usb0: HOST MAC 0e:23:91:34:09:10
    [    5.540356] usb0: MAC 42:08:8a:8d:24:78
    

    3. Edit cmdline.txt with sudo nano /boot/cmdline.txt to set up g_ether:

    Where it says

    modules-load=dwc2,g_ether
    

    add the HOST MAC value for host_addr, and the MAC value for dev_addr, so it now look like:

    modules-load=dwc2,g_ether g_ether.host_addr=0e:23:91:34:09:10 g_ether.dev_addr=42:08:8a:8d:24:78
    

    4. Save with Ctrl+O and exit with Ctrl+X.

    5. Reboot with sudo reboot and your device should now reconnect using the same MAC addresses as before.
    View As
    Sort by
    Sign In or Sign Up to reply.
    Cancel esc
    Click for advanced permissions.
    View
    Edit
    Reply
    Approve
    Moderate
    Tags
    Visibility
    ·
    Replies
    General
    Content Suitability
    Show Replies As
    Sort Replies By ·
      Paste Link Undo Redo ctrl enter

    Loading
    Loading...

    Loading messages...
    Visibility
    ( )
    Content Suitability
    Replies
    Click for advanced permissions.
    View
    Edit
    Reply
    Approve
    Moderate
    Tags

    Attach an image or file

    Cancel esc
    Cancel esc