EDUP 802.11n Mini Wi-Fi Adapter Sleeping

 

I bought some EDUP 802.11 N Mini Wi-Fi Adapters from China.  They’re cheap and do a fine job plugged into my Raspberry Pi’s.

However, by default, they always go to sleep which makes it difficult to connect to them via ssh etc.  To fix this, here’s what I did:

To identify the USB WLAN Adapter I did the following:

Then:

From that I was able to derive that the WLAN adapter was using the rtl8192cu drivers.

A bit of Googling later, I was able to disable power management on the Wifi adapter, like this:

Reboot…

Run:

It should return 0 if the power management is off.

Bask in the glory of your WiFi adapter that stays up all the time 🙂

Deploy Watchtower in Docker

Watchtower is an application that will monitor your running Docker containers and watch for changes to the images that those containers were originally started from. If watchtower detects that an image has changed, it will automatically restart the container using the new image.

  • A 16 megabyte limit is set on the container, in this instance.
  • I’ve added a hostname for this container because Watchtower sends emails with the hostname of the Watchtower Docker container in the subject line.  By setting my own hostname instead of the default Docker generated hostname, I can glance at the email and see which of my hosts containers have just been updated.
  • Email notifications are configured using the container environment variables using the -e flags.  These can be omitted if you don’t want any notifications.

Deploy Portainer in Docker

Portainer is an Open-Source lightweight Management UI which allows you to easily manage your Docker Hosts or Swarm Clusters

  • Port 9000 of the container is published to the host
  • A 16 megabyte limit is set on the container, in this instance.
  • Data is persisted in a named volume called ‘portainer_data’

The container can also be deployed using the more explicit –mount flag which became available for standalone containers in Docker 17.06.

Install Docker and Compose on Ubuntu 16.04 LTS

If you plan on using the –memory flag when creating containers, you may need to enable memory and swap accounting in the Kernel.

  1. Log into the Ubuntu host as a user with sudo privileges.
  2. Edit the /etc/default/grub file. Add or edit the GRUB_CMDLINE_LINUX line to add the following two key-value pairs:
  3. Save and close the file.
  4. Update GRUB.

    If your GRUB configuration file has incorrect syntax, an error occurs. In this case, repeat steps 3 and 4.

    The changes take effect when the system is rebooted.

More detailed information can be found in the Docker Post-Installation Steps for Linux.