Usefull script to connect eduroam network using raspberry pi for IOT , remote control and etc ..
Tested and verified using raspberrypi os Buster and below , please dont use > buster .
Upcoming update , restore file to original in case something going wrong.
- Connect eduroam using just a script
- Easily get ip address from connected eduroam wifi when raspberry pi boot up and send it to telegram bot
To use eduroam.sh , Assume you already in root env. If not , use below code to get root :
sudo -iafter that use raspi-config type in your raspberry pi terminal to change your wifi country , Localization -> wlan country:
raspi-configTo connect to eduroam , if you have internet connection , use this command :
wget https://raw.githubusercontent.com/UntaDotMy/Rasp-Setup-4-script/main/eduroam.sh && chmod +x eduroam.sh && ./eduroam.shif you dont have internet connection in your raspberry pi , make a new file , then copy the code inside eduroam.sh and save it in .sh
nano <yourfilename>.shmake sure to validate your information otherwise the wifi will be not connected . Lastly , reboot your raspberrypi , and your raspberry pi will be automatically connected to eduroam network . Good Luck !
sudo rebootFirst , go to BotFather and make your own bot . give unique name so u can remember . grab the token , we need it later in configuration.
Second , go to this website copy and paste your token in the url, replace according to your bot token.
http://api.telegram.org/bot<token>/getupdatesThird , start your bot in telegram , and just chat anything to your bot. and refresh the website, you will get the chat id (id from message).
Fourth , grab your token and chat id , copy it into notepad.
Fifth , download the file using wget in your teminal (Copy Paste)
wget https://raw.githubusercontent.com/UntaDotMy/Rasp-Setup-4-script/main/info2tele.sh && chmod +x info2tele.shSixth , open up info2tele.sh using nano (text editor) and put your token and chat id in it.
nano info2tele.shLastly , we need in to run at boot , so it will send the ipv4 information to your telegram bot.
first , open up rc.local .
nano /etc/rc.localsecond , put below code before the exit 0.
/root/info2tele.shsave the file with ctrl+x and then y and enter. and reboot .
sudo reboot you should get the network ipv4 information send to your telegram when the raspberry pi connected to the eduroam .
Have fun do your project !
Contributions are always welcome!
- Why it said Wi-Fi is currently blocked by rfkill , after i reboot ?
- You need to configure your wlan country code before you can use WiFi . Follow second step above .- After reboot , i dont get the chat from my telegram bot , do i did wrong ?
- try enable the rc local service , see above for How to enable rc.local .- My clock not syncronize , i have internet , how to syncronize ?
- sudo apt install htpdateDistributed under the no License. See LICENSE.txt for more information.