OctoPi WiFi/network connection troubleshooting megatopic

troubleshooting
wifi

#81

I am not sure I understand, your R-Pi has IP Address 192.168.137.101 ? If that's the case and you try to log in with putty via SSH I assume, not telnet, you don't get the login prompt ?

THX
Jan P.

Just to add some more info, the Octopi image is done in a way that it has the sshd enabled by default, so you should be able to log in as user pi via ssh.


#82

Steps I followed

  1. I downloaded the raspian software and with the help of Win32 disk imager, i wrote the software in the sd card and then installed the same in the raspberry pi 3B. I connected the pi with the ethernet cable, then using a software named advanced IP scanner i got the IP address as 192.168.137.101. After this, i take out the sd card, format the same and write the octopi software, I entered my SSID and PASSWORD and connected the same to the PI. Now when i am using the same ip scanner, i cannot find the ip address of the pi. Plus my laptop is connected to a wifi router and the ip address of the router is 192.168.1.1. I am using a windows in my laptop

i hope this is understandable.

Waiting for your reply

Regards,

Rishabh


#83

I would suggest to do this step my step instead of going 2 steps ahead. After writing the Octopi image I would suggest to connect the R-Pi via the Ethernet cable to start with. Once you have success with that and you can log in to the R-Pi with Octopi on it i would go ahead and configure the wireless network. I have no "blank" R-Pi here at work, once I am home I will check that hands on with the WiFi config. I tent to use Ethernet in wired form where ever I can, just my personal preference :wink:

Jan P.

Oh and I just see that, 192.168.137.101 of the R-Pi and your router are probably not in the same network unless your netmask is /16 or 255.255.0.0. Or do you intentionally have different IP networks on wired Ethernet and WiFi ?


#84

sir the other end of the ethernet cable which was connected to pi was connected to my laptop and my laptop was connected to the wifi.

Ok please do try meanwhile even i will give shot of connecting my ethernet cable to my PI with the sd card in it and then try to login

Waiting for your reply

Regards,

Rishabh


#85

When I connect a (crossover) Ethernet cable from my MacBook to a Raspberry Pi, I note that OSX will:

  1. presumably look to see if the Raspberry Pi offers a DHCP server, it doesn't
  2. then it will self-assign a 169.x.x.x-based IP address and network to itself, spin up a DHCP server
  3. and issue an IP address in the same space to the Raspberry Pi

#86

Right, I have created a new Octopi SD card am mounted the FAT32 partition to edit the file octopi-wpa-supplicant.txt. I uncommented the required lines, aded my SSID and Passphrase and it connected right away. SSH is enables by default. So here is what it looks like:

## WPA/WPA2 secured
network={
  ssid="My_Network"
  psk="My_PSK"
}

By default the country is set to UK, depending on your location you might be better off changing that cause it might allow for higher TX power of the wireless part. In the EU that is rather limited. That is below line 50 in the above file. By default everything is commented out in the file, only the country is set, so you would have to remove the # from the beginning of ALL lines that are relevant for your config, As seen above that includes the line before the SSID and after the PSK. Also worth mentioning probably, the R-Pi 3B does ONLY support 2.4 GHz Wifi, if your wireless network is in the 5GHz range it will not be able to connect.

Regards
Jan P.

PS: I mounted the partition cause I usually work on Linux, in Windows it is easy accessible anyway. If you work in Windows you can't use the standard notepad application, use Notepad++ which is free, on MacOS you can use vi in a terminal. I am sure there is some equivalent to Notepad++ available for MacOS as well if you need the GUI.


#87

And you definitely want that to appear (in UPPERCASE for the country code) to be above the network paragraph itself.


#88

It does not seem to matter where in the config file it is, in the file that comes with Octopi its further down than the SSID and PSK. The examples are there anyway. Plain Raspbian Stretch has it before the SSID.

Jan P.


#89

We have anecdotal evidence here of users simply moving the country code line above the network paragraph which then made it work for them. I wouldn't have thought so, otherwise.


#90

even i did the same,
I booted the sd card and installed in the PI, the only mistake i made before was the SSID for my wifi i was entering it wrong, so i corrected it and then added a line to the country name as country=IN # India.

After that when i went to take up the ip address i still cannot see the ip address of the octo pi.

I am giving power to the raspberry pi 3b from my power which has the output current of a 2.4A.

Waiting for your reply.

Regards,

Rishabh


#91

You are trying to get too much done in a single step. Lets start with the basics.

  1. Connect a screen and keyboard, check that the R-Pi is actually booting
  2. Connect wired ethernet from your router/AP which can serve a DHCP address and reboot the R-Pi
  3. During the boot process near the end it should show you the IP address scrolling by that your R-Pi has been assigned, Try to ssh in that IP address with user pi. In Octopi it also has a MOTD that shows you the IP addresses after login, if you log in from the console it should show you the IP address (es) there.
  4. Once logged in issue ifconfig, if you have wlan0 showing up there issue sudo iwlist wlan0 scan and check that the R-Pi can actually see your network.

I don't think it gets any more basic than this. The problem with your approach is that you can not determine which step actually is gone wrong to start with, thats why the step my step would help to find out where it goes wrong.

Rgds
Jan P.

PS: The reason why so detailed step-by-step is also because we KNOW that the Octopi Image does work, there must be something missing on your end which makes the R-Pi not work as expected.
And ofc, just checking. You use WPA/WPA2 on your WiFi network, not WEP or unsecured ?


#92

Hello,
these are the steps i should do ,

  1. connect the pi to a desktop not a laptop

  2. load the raspian software in it and then boot it

  3. connect the ethernet cable

  4. open terminal and then look for the ip address

I hope i am right, there ar few terms that i dont understand like DHTS.

Waiting for your reply

Regards,

Rishabh


#93

It is not likely that your Desktop or Laptop serve an IP address, thats most likely the device that also provides WiFi or your router. So connect an Ethernet cable between the R-Pi and the device that gives you WiFi or your router that gives you internet access. If you have no screen and keyboard it is extra tricky because it will be only guess work up to the point where you actually can log in via ssh, so thats not a great screnario for troubleshooting.

Jan P

DHCP is the protocol that allows your device to automatically receive an IP address, The DHCP server would in most cases run on your router but can also be a dedicated device.


#94

hello,
What i did previously was i connected my pi to my laptop with the ethernet cable and after that was done i went to the network sharing in my laptop and looked up the ip address for my PI and used the same for my PUTTY, and it worked but the same is not happening with my octopi.

Also i wanted to know is the current supply of 2.4A enough for the pi to work properly ?

Waiting for your reply.

Regards,

Rishabh


#95

If you have followed the instruction on how to install the Octopi image to SD card and it does not become available like the R-Pi did with your setup before you have something strange going on that is not possible to troubleshoot without screen. I can not comment on the network sharing thing as I am not a Windows guy,maybe someone else can shed some light on that part. You would make it a lot easier if you just plugged the R-Pi in your router, the entire Laptop scenario adds just an extra layer of stuff potentially going wrong.

The 2.4A PSU is fine, in fact if you run the R-Pi headless without anything plugged in to USB you would not even need 2.5A at all.

Jan P.


#96

Ok I will try connecting with a desktop.
Can you mention me the steps that I have to follow in Linux OS as I have another laptop with Linux installed in it.

It would we really helpful if you could send me a direct link for installing raspberry pi in Linux and how can I do the same for octopi in Linux .

Waiting for your reply.

Regards,

Rishabh


#97

That would be the same issue with a desktop, you would have to "create" a network with a DHCP server on an ethernet interface etc..... get routing going or NAT. Your router that connects you to the internet does all of that already, why not make it easier for yourself and plug it into that ?

To install the Octopi image from a linux box you can just use dd, open a command line and isue lsblk, that should list all block devices attached. So check the output before and after you plug in the SD card, you see which one was added. Double check the size is plausible. Here is my output with SD card, device names might be different for you:

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  1.4T  0 disk
├─sda1   8:1    0  953M  0 part [SWAP]
└─sda2   8:2    0  1.4T  0 part /
sdb      8:16   0  1.4T  0 disk
└─sdb1   8:17   0  1.4T  0 part /vms1
sdc      8:32   1  7.2G  0 disk
└─sdc1   8:33   1  7.2G  0 part
sr0     11:0    1 1024M  0 rom

So i have /dev/sdc as my sd card. Now I would simply issue the following to write the imake;

dd bs=4M if=2018-04-18-octopi-stretch-lite-0.15.1.img of=/dev/sdc conv=fsync

Note that it will destroy everything that was on your SD card before. After that is done and you do lsblk again you should see 2 partitions, one is a few megabyte and the other is 2 gb. Thats it, plug that SD card in your R-Pi, boot it and wired network should come up.

Jan P.


#98

Also if you want to edit the wireless network settings you have to mount the 1st partition and edit the file octopi-wpa-supplicant.txt.

sudo mount /dev/sdc1 /mnt
cd /mnt
sudo nano octopi-wpa-supplicant.txt

I guess nano is what most ppl use on the CLI ? vi is another one bit simpler, what ever editor suits you basically as long as it maintains the correct file format. After you are done.

cd
sudo umount /mnt/
sudo eject /dev/sdc

And boot from that, if the settings are correct it should connect to your WiFi.

Jan P.

sdc is the SD Card in my situation on this particular host, you have to change that to what it shows up as on your system !


#99

I am kind of puzzled that you have made all that effort to NOT conect to your actual router or WiFi AP wired, are you connected to a public WiFi AP or corporate situation ? On public accessible WiFi AP or Hotspots the equipment will have the option to configure client isolation, this will prevent Wireless clients to communicate to each other. So even if your R-Pi is fine and all good the infrastrucure will NOT allow you to connect to it if it is conected to the same physical radio. Maybe you could clarify your set-up so its easier to figure out what to suggest to fix the issue.

Rgds
Jan P.


#100

Hi every one,

UPDATE:
Somthing in my laptop was bloking for the connection.
entered the IP adress into the browser of my phone and it worked.

UPDATE 2:
I'm using Windows defender security center and i think this is blocking for the connection. Can anyone help..?

Like many others i have som problems with the wifi connection.

Well not quite true, i do connect to wifi, i can ping octopi, but when i try to connet with putty, i get a "connection refused" message..? Any idea why that might be..?

/Michael