sabhiram / raspberry-wifi-conf

Raspberry Pi Node application which makes connecting to your home wifi easier
MIT License
415 stars 169 forks source link

RPi4 Troubleshooting #37

Open skyler1537 opened 4 years ago

skyler1537 commented 4 years ago

@sabhiram @stzoran1 - figured I would drop this here and include stzoran1 since it looks like you were the last one to add to this repository as well.

I'm running an RPi4 and things seem to be generally working. Currently not running as a service yet, but I can run the node server and get all the way through setting up the access point, connecting via the access point, entering credentials, and then connecting to my home wifi. The only issue is that after running the server, although I register as "connected", I can't seem to ping anything going out, or ssh into the Pi. I can see that I am connected on my router as well, so I'm not sure where the break down might be?

Here's the output of a few files/commands in case they are helpful:

cat /etc/network/interfaces source-directory / etc/network/interfaces.d

allow-hotplug wlan0 iface wlan- inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface

0.0.0.0 192.168.1.254 0.0.0.0 UG 0 303 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 303 0 wlan0

ifconfig wlan0: flags -4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.215 netmask 255.255.255.0 broadcast 192.168.1.255 .....

/etc/resolv.conf domain attlocal.net nameserver 192.168.1.254

Update: I can get set credentials for the hotspot on my phone and it does appear to work end to end. So maybe connecting to my LAN is an issue with my router? Is there anything that jumps out at you from the above details?

leoheck commented 4 years ago

Hi @sabhiram and @skyler1253 I am about to test the project with the RPi 4 tomorrow. Today I tested it with Raspbian 10 (Buster) on Raspberry Pi 3 Model B Plus Rev 1.3 and everything is working just fine.

leoheck commented 4 years ago

Hi, I put it to work on an Raspberry Pi 4 Model B Rev 1.1 with the same OS version Raspbian 10 (Buster) . Everything looks good for me.

This is the current kernel version if someone needs know it. Linux deepx19 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux

alexis-lee commented 3 years ago

Hi @skyler1253 @leoheck, I'm having trouble getting this to work on my RB4. After I run "sudo npm start", I get the follow error:

`> raspberry-wifi-conf@0.0.1 start /home/ubuntu/raspberry-wifi-conf

node server.js Wifi is not enabled, Enabling AP for self-configure Force reconfigure enabled - reset AP ... dhcpcd server failed! - ifconfig wlan0 down successful... ifconfig wlan0 up successful... ... dnsmasq server failed! - ... AP Enable Success! HTTP server running...`

I don't really understand from the README how to fix the dhcpcd and dnsmasq server failure issues

leoheck commented 3 years ago

Hi, @alexis-lee, maybe you have to have superuser powers. Did you try to use sudo node server.sh to see what happens?

alexis-lee commented 3 years ago

Hi @leoheck , sorry for the late response. When I tried to run sudo node server.js I run into the same issue. The only thing I've tried to fix is changing the config.json and setting "force_reconfigure" to true.

alexis-lee commented 3 years ago

I am able to see the wifi hosted but cannot connect to http://192.168.44.1:88

leoheck commented 3 years ago

Try to use a different port, like 8080, 8888 (the 88 is a small number, maybe it is reserved for the system)

alexis-lee commented 3 years ago

@leoheck I am able to connect now! I was able to select a wifi ssid to connect to and enter its password. Although it says I connected to a wifi successfully, there is no IP address when I run an ifconfig. I suspect it is failing in the wpa_supplicant. I will let you know how debugging goes. Btw, I should have mentioned earlier, that I am working on a RBP 4 B model.

leoheck commented 3 years ago

Wow! This is pretty nice. I also ran it on my RPi4 in the past. So, debugging this is pretty easy if you can connect it through the ethernet port. So, you can launch the server without losing the connection. Then you can see some logs on the console too while logged there.