Auto-Connecting Ubuntu to Ad-Hoc Connection

The Odroid U3 has Ubuntu 14.04 LTS Desktop version installed on its eMMC card.

In order to have an ad-hoc connection automatically connected on boot of the OS do the following steps:

  1. Edit /etc/network/interfaces, add these lines to the bottom and make sure there is no other configuration for your WiFi interface.

    auto wlan3
    iface wlan3 inet static
      address 192.168.1.1
      netmask 255.255.255.0
      wireless-essid odroid
      wireless-mode ad-hoc
      wireless-key 1234567890
    
  2. Edit /etc/NetworkManager/NetworkManager.conf, this should be a template for how to restrict the Network Manager to manage your WiFi interface.

    [main]
    plugins=ifupdown,keyfile,ofono
    dns=dnsmasq
    
    
    [ifupdown]
    managed=false
    
    
    [keyfile]
    unmanaged-devices=mac:00:13:d4:c0:62:db
    

    Where 00:13:d4:c0:62:db is my WiFi interface MAC address.

More: ad-hoc, ubuntu, wireless