Notifications
Clear all

Eduroam network access  

  RSS
misan
(@misan)
Membre Moderator
Eduroam network access

My MK3 is at my office on campus, where the wifi network is run by the sysadmins and they have determined Eduroam is the only game in town. That means Enterprise Wifi authentication (instead of WPA-PSK). Unfortunately, that is not an option on the Raspberry Pi customizer software. 

I am going through it eventually, but I mention it here in case another beta-tester has already traveled that path.  I am now reading this article about the matter: https://medium.com/good-robot/connect-your-raspberry-pi-to-eduroam-special-instructions-for-raspbian-buster-dfd536003999

Kind regards,

misan

 

Publié : 24/09/2021 3:33 pm
misan
(@misan)
Membre Moderator
Topic starter answered:
RE: First tests

I have just received Prusa Link kit. I have managed to connect it to my home wifi network with this wpa_supplicant.txt file I wrote to the /boot partition of the SD card.

country=es
update_config=1

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=netdev

network={
 scan_ssid=1
 ssid="your_wifi_network"
 psk="your_wifi_password"
}

I did not get anything on my browser when pointing to the IP address of the board. 

Please note my board is not yet connected to the MK3 (as I am not at the moment where the printer is).

I guess this is to be expected according to the documentation as I am step 5 of the "Add printer" process in connect.prusa3d.com site. My understanding is the raspberry needs to "detect" the printer and update itself. As this is not yet happening I guess I cannot go ahead with step 6 as the system is not yet ready (thus the browser message stating it cannot connect to the Raspbery IP local address).

I did not have a miniHDMI to HDMI adaptor so I couldn't connect the board to my display to see system's messages, but I have tested that I can see that if I enable the uart in the config.txt by adding the line enable_uart=1 at the end of the file. I guess this is not advisable as it can collide with Prusa Link software but it can be a life saver if you need to do any debugging or getting shell access to the system while your wifi is yet not working for whatever reasons (of course, for that to work you need to connect the board GND, TX and RX to the GND, RX and TX pins of a serial to USB adapter, please make use you use a 3v3 one if you do this). Putty terminal worked great for this. Remember it is a 115200 bps serial connection. 

My guess is this shell access is going to be useful while I debug the eduroam Enterprise WPA wifi access on the board before I can plug it in to my MK3 (once wifi is known to be working). 

I will report back once this is done.

Publié : 29/09/2021 5:09 pm
Vlastimil
(@vlastimil)
Membre
RE: First tests

I suggest you enable ssh access (it was an option in the imaging tool) and verify that you can connect to the board that way. That has to work even if not connected to printer - I tried it initially with just the separate board powered over usb port. I *think* the browser interface also worked at that point. Make sure you type the IP to browser with explicit http:// otherwise it may default to https:// and fail. Also since you know the IP address you probably verified on your router that the board connected to wifi and got that address from DHCP?

Publié : 29/09/2021 8:07 pm
misan
(@misan)
Membre Moderator
Topic starter answered:
RE: Scratch that

I realized, later, my SD content was a generic Raspberry distro and not the Prusa Link one.

Once I had this one the web access was working even without a printer. 

Thanks for the tip.

 

I too have enabled ssh but that is only going to work once eduroam wifi is working. So maybe I will use a generic Raspi image to get the wpa_supplicant.conf right first and then I will move that to the Prusa Link image... that will be tomorrow.

 

I've got the IP address from ifconfig command in the generic image, but I had the info on my router's devices list too.

Publié : 29/09/2021 10:17 pm
misan
(@misan)
Membre Moderator
Topic starter answered:
Not so good

Hi again,

After some hideous cutting operation, I have got the RPi in place.

Printing and replacing the box can be done at a later time 😉

It seemed that it would work, but it did not.

 

So I went back to a stock Raspberry Pi version and I tried to connect to eduroam network. Unfortunately, the first attempts did not work and I am getting a nasty message on the system log that I am attaching here just in case anyone can help.

 

Attachment removed
Publié : 30/09/2021 9:27 am
misan
(@misan)
Membre Moderator
Topic starter answered:
Raspbian mess

Hi folks, 

It appears there is a problem with enterprise WPA authentication: https://www.raspberrypi.org/forums/viewtopic.php?p=1510664  

More on this later.

Publié : 30/09/2021 9:49 am
misan
(@misan)
Membre Moderator
Topic starter answered:
Success!!

Ok, after trying several options, I got it working by adding these three lines at the end of /etc/dhcpcd.conf file:

interface wlan0
env ifwireless=1
env wpa_supplicant_driver=wext,nl80211

Now I get an IP for my wifi in Raspbian.

To make this to Prusa Link I am going to need access to the SD card filesystem (using Windows at the moment that only allows access to boot and recovery partitions ... 

Publié : 30/09/2021 10:05 am
misan
(@misan)
Membre Moderator
Topic starter answered:
BTW, if you need to cut the box the way I did, this file will help.

Just make sure you print it at 1:1 scale (I did that using Inkscape)

Attachment removed
Publié : 30/09/2021 10:14 am
misan
(@misan)
Membre Moderator
Topic starter answered:
RE:

Ok, let me summarize my tests now:

For stock Raspbian to connect to Eduroam I needed to do a couple of things:

1) manually create the wpa_supplicant.conf (it can be placed in /boot and it will be copied to /etc/wpa_supplicant/ folder on boot. You can do that with any computer you can connect the SD card to.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
ap_scan=1
update_config=1
country=es

network={
        ssid="eduroam"
        scan_ssid=1
        key_mgmt=WPA-EAP
        eap=PEAP
        identity="**************"
        password="******************"
        phase1="peaplabel=0"
        phase2="auth=MSCHAPV2"
}

 

2) add three lines to dhcpcd.conf so an IP address is obtained from eduroam network. To do that I could either use a the serial console (if I have previously enabled enable_uart=1 in config.txt in /boot or I could use a Linux system to access the /root filesystem on the SD card so I can edit dhcpcd.conf file, please note you need to have root access to do that).

interface wlan0
env ifwireless=1
env wpa_supplicant_driver=wext,nl80211

After these two changes, my board happily connects to eduroam.

Unfortunately, the same is not true with Prusa Link SD.

Can you guys tell me if there is much divergence from stock in your distribution?

No IP connection means the only debugging possible happens to be using the microHDMI and USB keyboard. The former is tricky as I do not have one cable/adapter around. I cannot use serial console here (though it is enabled in PrusaLink by default) because that is used by PrusaLink app to dialog with the MK3 (unless there is a way to kill the app and use it for debugging too, if so, please let me know).

Publié : 01/10/2021 8:33 am
misan
(@misan)
Membre Moderator
Topic starter answered:
Success!

Ok, I found the culprit: the wpa_supplicant.conf file I was using on the PrusaLink SD card did contain two network sections, once I removed one (so it follows the model above) it worked as the stock Raspbian with Eduroam.

Now I can even ssh to the printer, cool!

Publié : 01/10/2021 9:56 am
misan
(@misan)
Membre Moderator
Topic starter answered:
Registration worked too

I have been successful in adding my printer to my PrusaAccount, all through the Eduroam network (firewall gods were favorable this time). 

Publié : 01/10/2021 10:05 am
misan
(@misan)
Membre Moderator
Topic starter answered:
But the new printer does not show up in Prusa Connect

It all looked ok, now I have to provide username and password to access to my printer's IP address. However, the new printer does not show in my Prusa Connect page on connect.prusa3d.com

Using the printer's IP I could send a gcode file to the printer (Duet wifi spoiled me) but it did not print. I got an API error instead, but one minute later the printer started moving despite the previous warning... 

Publié : 01/10/2021 10:23 am
misan
(@misan)
Membre Moderator
Topic starter answered:
The second attempt was successful!

I learned that if I remove the prusa_printer_settings.ini file from the /home/pi folder I could restart the printer's connection process. This time I made sure my browser was authenticated against connect.prusa3d.com (different authentication than prusaprinters.org).

This second attempt was a success (it may or may not depend on the above, I am not sure). But once it succeeded the whole Prusa Connect features seem to be working nicely. And, in my case, they are welcome as the campus firewall blocks any incoming traffic to the printer. So remote control when away is still made possible when away from the office. 

Sending a project from PrusaSlicer 2.3.3 worked at the first attempt, no problem. 

So I would say Educational use for Universities using Eduroam network seems to be a no-brainer. 

Publié : 04/10/2021 10:34 am
misan
(@misan)
Membre Moderator
Topic starter answered:
It is going to be mentioned

Not that I am going to surprise anyone but one problem I guess is tied to the poor performance of the Raspi Zero W is the upload speed. It took around a minute to upload the 9 MB g-code file. 

However, when I did an experiment of transferring an 8 MB file over the wifi to the Rasp Zero W, it only took 7 seconds (that's more than 1 MBytes/sec). So I guess there is room for improvement in the project upload speed. 

Publié : 04/10/2021 11:03 am
Nox et Vlastimil ont aimé
McBig
(@mcbig)
Membre
RE: Eduroam network access

Hi, thanks a lot for your notes. In a nutshell:

  • PrusaLink image is set to be USB UART device via config.txt, so you can play with system without Printer Connection as you wrote. Just connect RaspberryPi Zero to PC and open some terminal software to access USB UART which is Rasbian terminal.
  • New image will be based on new Rasbian bullseye, so i hope that your connection will still work
  • There will be some speed improvements in networking and in printing in new release, so stay tuned 😉
Publié : 02/12/2021 4:47 am
misan a aimé
Tuki
 Tuki
(@tuki)
Membre
RE: Eduroam network access

Hi, I'm trying to set this up without a lot of background knowledge. If I understand correctly, you:

1) flashed the SD card with the PrusaLink image (as described in the Prusa KnowledgeBase setup);
2) added a DIY wpa_supplicant.conf file to the SD card with nothing else in it except:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
ap_scan=1
update_config=1
country=es

network={
    ssid="eduroam"
    scan_ssid=1
    key_mgmt=WPA-EAP eap=PEAP
    identity="***********"
    password="
***************"
    phase1="peaplabel=0"
    phase2="auth=MSCHAPV2"
}

3) found the dhcpcd.conf in the SD card root folder (via Linux or a serial connection to Windows?) and added/changed:

interface wlan0
env ifwireless=1
env wpa_supplicant_driver=wext,nl80211

... Profit?

Please tell me if I've forgotten or misunderstood any steps.
Thanks in advance!

Publié : 17/09/2024 8:11 am
misan
(@misan)
Membre Moderator
Topic starter answered:
RE: Eduroam network access

Hi Tuki,

Please note you need to make sure what is the way your institution authenticates. Mine uses PEAP but that might me different in yours. 

Also, note that "eap = PEAP" must be on a different line than "key_mgm=WPA-EAP."

Please report back once you have it working.

KR,

misan

Publié : 17/09/2024 9:54 am
Tuki a aimé
_KaszpiR_
(@_kaszpir_)
Honorable Member
RE: Eduroam network access

Also make sure to set in wpa_supplicant.conf country code to the one you are in, because there are different specifications for wifi for some countries.

 

See my GitHub and printables.com for some 3d stuff that you may like.

Publié : 17/09/2024 10:59 am
Tuki a aimé
Partager :