Trouble configuring rpi 3B+ and piBeacon to use wifi
Trouble configuring rpi 3B+ and piBeacon to use wifi
New user of piBeacon, need a bit of assistance.
Using piBeacon 7.128.459, buster 2020-02-25 ssd image.
Can someone point me to instructions to bring up an rpi 3B+ to use wifi, both by using ethernet initially and starting with wifi?
Using the Debian distro through rpi, the rpi has no trouble showing available networks and connecting to my SSID without having ethernet connected, so the rpi's wifi works. piBeacon works well through ethernet, I just can't get wifi operational.
Using the piBeacon SD image as above, even though wlan0 is "UP", no packets are being transmitted; doesn't look like the interface is being used therefore dhcp request doesn't get sent. The wifi mac address is in my router to give a specific wlan IP, but piBeacon reports "no ip number working".
If I then connect an ethernet cable, the rpi immediately obtains an IP address through dhcp.
I would like to be able to change to wifi. More importantly, I would also like at some point to add one or more rpi 0-W's, so I need to be able to start from scratch with only wifi and terminal input (keyboard and monitor on rpi).
I have tried the procedures here , and adding json file {"SSID":"abc", "passCode":"def"} to the boot directory on the sd card as described here, without success.
Appreciate any pointers to what I'm missing. Have read a bunch of topics in this subforum but not finding the right place.
Using piBeacon 7.128.459, buster 2020-02-25 ssd image.
Can someone point me to instructions to bring up an rpi 3B+ to use wifi, both by using ethernet initially and starting with wifi?
Using the Debian distro through rpi, the rpi has no trouble showing available networks and connecting to my SSID without having ethernet connected, so the rpi's wifi works. piBeacon works well through ethernet, I just can't get wifi operational.
Using the piBeacon SD image as above, even though wlan0 is "UP", no packets are being transmitted; doesn't look like the interface is being used therefore dhcp request doesn't get sent. The wifi mac address is in my router to give a specific wlan IP, but piBeacon reports "no ip number working".
If I then connect an ethernet cable, the rpi immediately obtains an IP address through dhcp.
I would like to be able to change to wifi. More importantly, I would also like at some point to add one or more rpi 0-W's, so I need to be able to start from scratch with only wifi and terminal input (keyboard and monitor on rpi).
I have tried the procedures here , and adding json file {"SSID":"abc", "passCode":"def"} to the boot directory on the sd card as described here, without success.
Appreciate any pointers to what I'm missing. Have read a bunch of topics in this subforum but not finding the right place.
Trouble configuring rpi 3B+ and piBeacon to use wifi
The trick with the text file on the ssd boot directory only work with a fresh ssd. After it works the “master” program assumes it is configured and you can setup WiFi yourselfBillC wrote:New user of piBeacon, need a bit of assistance.
Using piBeacon 7.128.459, buster 2020-02-25 ssd image.
Can someone point me to instructions to bring up an rpi 3B+ to use wifi, both by using ethernet initially and starting with wifi?
Using the Debian distro through rpi, the rpi has no trouble showing available networks and connecting to my SSID without having ethernet connected, so the rpi's wifi works. piBeacon works well through ethernet, I just can't get wifi operational.
Using the piBeacon SD image as above, even though wlan0 is "UP", no packets are being transmitted; doesn't look like the interface is being used therefore dhcp request doesn't get sent. The wifi mac address is in my router to give a specific wlan IP, but piBeacon reports "no ip number working".
If I then connect an ethernet cable, the rpi immediately obtains an IP address through dhcp.
I would like to be able to change to wifi. More importantly, I would also like at some point to add one or more rpi 0-W's, so I need to be able to start from scratch with only wifi and terminal input (keyboard and monitor on rpi).
I have tried the procedures here , and adding json file {"SSID":"abc", "passCode":"def"} to the boot directory on the sd card as described here, without success.
Appreciate any pointers to what I'm missing. Have read a bunch of topics in this subforum but not finding the right place.
This is mainly for pi0 They do not have an Ethernet port.
So you need to setup your WiFi yourself
1. With graphic interface setup WiFi
2. Create the proper interface and supplicant file in the proper directories
3. Edit ~/pibeacon/interfaces and /wpa_supplicant Then run
sudo python interface.py
It will copy the files to the proper directories
You can also
Look at interface.py where it copies the files to.
This assumes you know how to edit files on the rpi.
Also in indigo edit rpi device you can disable /enable Ethernet / WiFi
By default it should be 1. use Ethernet if available otherwise WiFi. If Ethernet is on do not use WiFi
Hope that helps.
When you have setup WiFi you also need to tell the plugin the new ip number of the rpi in either edit rpi device or initial setup of rpi.
If you still have problems let me know- I can walk you through the steps online if you like
Karl
Sent from my iPhone using Tapatalk
Re: Trouble configuring rpi 3B+ and piBeacon to use wifi
here the python ppm that copies the files:
here a basic supplicant file:
replace xxx and yyy with your sid and password
and the basic interfaces file:
Karl
Code: Select all
import subprocess
subprocess.Popen("sudo cp /home/pi/pibeacon/interfaces /etc/network/interfaces ",shell=True)
subprocess.Popen("sudo cp /home/pi/pibeacon/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf ",shell=True)
Code: Select all
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="xxx"
psk="yyy"
}and the basic interfaces file:
Code: Select all
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.confRe: Trouble configuring rpi 3B+ and piBeacon to use wifi
Karl, thanks for the replies. Tomorrow when I have some time I will start over with a fresh ssd. But it seems to me the problem is that the rpi never tries DHCP on the wlan0 interface, and therefore doesn’t get to the SSID/pwd entries.
Trouble configuring rpi 3B+ and piBeacon to use wifi
Yes you need to have a valid interfaces file
As WiFi only works if you have the proper ssid you need to edit these files anyway.
Hence any preconfigured setup would not work
That is why I added the option to supply the interface and wpa supplicant files on the ssd
That’s where you have to set the dhcp info.
Karl
Sent from my iPhone using Tapatalk
As WiFi only works if you have the proper ssid you need to edit these files anyway.
Hence any preconfigured setup would not work
That is why I added the option to supply the interface and wpa supplicant files on the ssd
That’s where you have to set the dhcp info.
Karl
Sent from my iPhone using Tapatalk
Trouble configuring rpi 3B+ and piBeacon to use wifi
I just published a new version that allows to create interfaces as well as wpa_supplicant.conf file(s) in the boot directory on the RPI ssd at EVERY boot
1.put the ssd into the mac card reader
2.create interfaces and wpa_supplicant file as described above
3. put ssd into rpi
4. reboot the rpi
BEFORE this works you need to upgrade the plugin version and push the new version to the RPI(s)
Bill for you -- BEFORE step1:
connect the rpi w ethernet
upgrade the plugin - the plugin should push the new version to the rpi (if the userid ip# are correct)
then do step 1,2,3,4 from above
Karl
ps..
this is the program that does the copying:
1.put the ssd into the mac card reader
2.create interfaces and wpa_supplicant file as described above
3. put ssd into rpi
4. reboot the rpi
BEFORE this works you need to upgrade the plugin version and push the new version to the RPI(s)
Bill for you -- BEFORE step1:
connect the rpi w ethernet
upgrade the plugin - the plugin should push the new version to the rpi (if the userid ip# are correct)
then do step 1,2,3,4 from above
Karl
ps..
this is the program that does the copying:
Code: Select all
def copySupplicantFileFromBoot():
try:
retCode = False
if os.path.isfile("/boot/wpa_supplicant.conf"):
subprocess.call("/usr/bin/sudo cp /boot/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf", shell=True)
subprocess.call("/usr/bin/sudo rm /boot/wpa_supplicant.conf", shell=True)
retCode = True
if os.path.isfile("/boot/interfaces"):
subprocess.call("/usr/bin/sudo cp /boot/interfaces /etc/network/interfaces", shell=True)
subprocess.call("/usr/bin/sudo rm /boot/interfaces", shell=True)
retCode = True
return retCode
except Exception as e :
logger.log(30, u"cBY:{:<20} Line {} has error={}".format(G.program, sys.exc_info()[-1].tb_lineno, e))
return False
Re: Trouble configuring rpi 3B+ and piBeacon to use wifi
Thanks, Karl, that worked.I just published a new version that allows to create interfaces as well as wpa_supplicant.conf file(s) in the boot directory on the RPI ssd at EVERY boot
1.put the ssd into the mac card reader
2.create interfaces and wpa_supplicant file as described above
3. put ssd into rpi
4. reboot the rpi
BEFORE this works you need to upgrade the plugin version and push the new version to the RPI(s)
Bill for you -- BEFORE step1:
connect the rpi w ethernet
upgrade the plugin - the plugin should push the new version to the rpi (if the userid ip# are correct)
then do step 1,2,3,4 from above
What would I need to do to set up without using ethernet, as if I were setting up the zero-w?
Re: Trouble configuring rpi 3B+ and piBeacon to use wifi
put the wpa_supplicant file into the boot directory while mounted on the mac BEFORE you put it into the RPi 0
Karl
Karl
Re: Trouble configuring rpi 3B+ and piBeacon to use wifi
To be clear: just the wpa_supplicant.conf file, not interfaces and not the wifiInfo.json file?
Re: Trouble configuring rpi 3B+ and piBeacon to use wifi
on the SSD only the wpa_supplicant file is copied and also if present the Json - don't do both
in the new plugin version it will look at wpa_.. interfaces and json BUT that only gets there after you have it connected at least through ethernet and the plugin can push the new version.
What I also do with an rpi0: put a usb--> ethernet connector, to get things setup. you can that remove later. they cost $8 at amazon
Karl
in the new plugin version it will look at wpa_.. interfaces and json BUT that only gets there after you have it connected at least through ethernet and the plugin can push the new version.
What I also do with an rpi0: put a usb--> ethernet connector, to get things setup. you can that remove later. they cost $8 at amazon
Karl
Re: Trouble configuring rpi 3B+ and piBeacon to use wifi
Now that makes a lot of sense and I should have thought of it earlier, since I knew they existed.What I also do with an rpi0: put a usb--> ethernet connector, to get things setup. you can that remove later. they cost $8 at amazon
Thanks for all your help, and for sharing all your work!
Bill