I'm using Rpi 3b+ and every time I carry it to any location, I have to attach it to the HDMI screen and enter the wifi credential, How can I set up a Pendrive so when I plugged in the Pendrive(for creating a notepad etc) it will automatically be connected to wifi?

  • Welcome to Raspberry Pi :-) But your question is too broad and opinion based. Such questions are flagged and may be closed. This site isn't made for brainstorming and discuss general issues. It is made to do one specific question that can be answered detailed. Please take the short Tour and visit the Help Center to get an idea how things work here. – Ingo Apr 1 at 12:38

Two ways I can think of:

First way does not need the Pendrive but is a bit of a clat:

I would set the Pi up to be an access point using WiFi Connect from Balena. Then when you power on the Pi you can use anything to connect to its access point and give it the locations WiFi details. Just before you leave, reset the Pi to use the WiFi connect at the next boot.

The second way using the pen drive:

  1. Find the ID of the pen drive (either partition or unique ID)
  2. Add a line in FSTAB to mount the pen drive with the nofail option
  3. Add a start-up script (cron @reboot) to check if the wpa_supplicant file is in the mount location
  4. If found MOVE it /boot and reboot the Pi
  5. Wait till the Pi reboots and you can find it

You could add a status LED (maybe a multi-colour one) to show you what is happening or pop a small OLED display (The Pi Hut has this tiny one) on the GPIO

Make sure you have a unique system name for your Pi - networks get upset when two machines are called the same :)

| improve this answer | |
  • I know this is off-topic, but are you the same andyroo who used to be in the forums? Just curious. – Botspot Apr 1 at 12:58
  • @Botspot Yes I am – Andyroo Apr 1 at 14:04
  • OK cool. Welcome back and let's hope the mods are nice to your MH. :) – Botspot Apr 1 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.