Controlling browser with IR remote - raspberry-pi

I'm totally beginner at Raspberry Pi. Is there some way how to control web browser URL with infrared remote? I already saved key codes with LIRC library. (for example key volume up will open google.com, key volume down will open facebook.com etc.)
How to do it? Thanks

You can launch a script that's waiting for IR and when you receive you code you launch a System command like this:
chromium-browser --kiosk www.google.com
hope it helpes

Related

Turn off raspberry Pi with Kodi remotely

Let me explain my problem: I have a raspberry Pi with Kodi installed and I use it with a IPTV service. This service only allow me to use it in one device at a time and sometimes I want to use it on my phone.
I'd like to be able to turn off my raspberry remotely so I can watch it in my phone whenever I want. I tried to create a web server that would allow me to run a script that would turn off the device but I can't access it because the raspberry IP takes me to some kodi stuff.
So to sum up, I'd like to go to my raspberry IP with Kodi installed, press a button and turn off the device. The web stuff I can take care of.
Any thoughts?
The only safe way to do this is to have a VPN tunnel that lets you access your internal network. This is much safer than opening up a port to Kodi on your router. It would just attract every bot and hacker out there.
Once you have a working VPN tunnel between your home network and your smartphone, just use a Remote Control App to shut Kodi down cleanly.
You can use a Kodi remote app for your mobile device. E.g. Kore (official remote app for Android) does have a shutdown button.
I think the best and easy way is to install dataplicity in your Raspberry Pi and access via dataplicity web or the app (Android or iOS) to the Terminal and use the command: sudo shutdown -h now or sudo poweroff

Android Things - Setup with Laptop only

Is this possible? I've no LAN cable, no USB to TLL cable and want to connect my raspberry pi 3 with my WLAN.
I've found this: How to set wifi to Android Things without an ethernet cable or adb but I can't boot the img file (https://developer.android.com/things/preview/download.html) and edit it. If I boot it on windows 10, it tells me errorenous image. If I boot it with a third party app like OSFMount I can boot it, but the content looks like opening the sd card after flashing the image, like following:
So no /data/misc/wifi/wpa_supplicant.conf file that I could edit... Am I mounting it wrong?
Any ideas on how to get this working without buying something? All I need to do is setting up the WLAN on the sd card directly somehow...
I could not find a way to successfully AND correctly mount all partitions on windows. A virtual machine with ubuntu helped mounting everything, but I could only mount it successfully with read permissions.
Final solution: I bought a UST to TTL cable, connected via putty to my raspberry pi and set up wifi via the console...
It's somehow sad, that there is no setup file on the boot partition (like the cmdline.txt and confix.txt file) that could simply be added, this would make things a lot easier...

make raspberry appear as SSID

I have a nodejs server in my raspberry and I want people to be able to connecto to it just connecting to the raspi.
The ideal scenario is where in my phone I see the raspi SSID, I connect to it. Then I open chrome enter the ip:port of the raspi itself and it works. Nothing fancier.
What I don't know how to search for in the internet is how to set my pi in a way that it opens itself to the world and appears in the SSID list in my phone. I don't need internet sharing nor anything. Just accessing the nodejs server in the pi.
This can be easily achieved depending on the OS you are using in your pi. Use basically need to use hostapd and a DHCP Server.
You can use a script like create_ap.

Captive Portal - Chillispot | OpenWrt vs DD-wrt

I've been trying to configure a captive portal using DD-wrt and Open-wrt, with my own radius server and I've also tried to configure them using a CSP page (http://worldspot.net).
DD-wrt
My first try was with a TP-LINK WR841N (v7.) and DD-wrt using the web interface. In dd-wrt web interface there is an option in Services -> HotsPot -> ChilliSpot. Here I tried both configurations, using my own server data, and also tried with WorldSpot data, and my issue was the same in both cases:
When I enable Chillispot on the router, I don't get IP assigned, meaning I can't connect to the wifi/lan. It seems the problem is obviusly with the router and It's something like the Chillispot configuration is not working, or the changes are not"applied"
Open-wrt
After some hours trying to make work dd-wrt I think that maybe with open-wrt it was easier to configure, and here I found another problem. After updating my TP-LINK to Open-wrt I realized that I cannot access to the router via WEB, so I have to connect via telnet and ssh to install some packages and make some configurations.
I tried to install "luci" the package for the web gui and I found with some errors:
- First It didn't find the package, and I have to change the /etc/opkg.conf file
- Once I downloaded the package and try to access web I get error uci_load: not found
- Once I fixed the uci package issue, I enable the uhttpd and start it, but when I try to connect via web I get another error "CGI didn't receive any response"
Questions
Someone with more experience than me could point me wich of these softwares is better to have a spot system/captive portal ?
It's possible that in dd-wrt case the configuration of chillispot wasn't applied to the router configuration ?
For open-wrt anyone has same errors with the web interface ?
I've been reading and it seems that it's possible to configurate ChilliSpot via SSH , but the tutorials I found were not very helpfull, anyone can point me to a good tutorial for this ?
I also have a D-Link dir-615 H2 but it seems to be less compatible with open-wrt and dd-wrt than the TP-LINK.
I would be thankfull for any information that can put me in a good direction, thanks!
Some months ago I found a very easy answer for this question about making a captive portal.
The best of this solution is that the router flashing part is very automatized and the Captive Portal configuration is made through a WEB UI very easy to understand and manage
You may also connect through ssh to the router if some software customization is needed, like VLANS
To use this solution your modem should be in this list(At the time the answer is wrote):
Linksys: WRT54G | WRT54GL | WRT54GS
MiniRouter: MR3201A
FonSpot / Fonera (Atheros)
Ubiquiti: Bullet-M | Nano-M | Rocket-M | Airrouter | UniFi | Bullet/Nano/etc/{2/5}
I used this method in several Ubiquiti AirRouters and now it just take me 5 minutes to configure a router for a HotSpot system using FreeRadius.
I tried with FreeRadius installed in a RaspBerry in LAN and also into an VPS through WAN
The steps to flash any of the above routers are:
Download coova-ap.jnlp from here
Open the file with Java Web Start
For Linux systems: sudo javaws coova-ap.jnlp
You have to click Flash CoovaAP and you will see a window like this where you should select your router model:
After the file is downloaded you will see the next window:
Here you should select your network device, usually eth0 (wired) is the best choice, anyways I strongly recommend to click Save firmware to File button to store a backup of the original firmware.
If youre using an Ubiquiti router, before clicking the Start Flashing
you need to:
. If you re using a Ubiquiti device you should put it in TFTP mode by unplugging the POE ethernet cable, and reconnecting it while holding the reset button for 8 seconds. If this doesnt work, you may have to press it for 16 seconds. The LED lights now should flash alternately indicating TFTP mode.
Once you hit Start Flashing and the flash is done, the router will restart and we will be able to access the router using the same Coova software.
Now the Configure CoovaAP button should be clickable and we will see a very fancy interface to configure the router Captive Portal, we will be able to use different HotSpot configurations.
If the button is not clickable make sure the CoovaAP IP is 192.168.1.1
One of the guides that help me most to configure the router using CoovaAP software was HotSpotSystem: Installation CoovaAP guide
On that tutorial you will have more information about some steps and the mainly configuration of the Captive Portal interface. I didn't add the HotSpot part because the question was about which was the best router configuration.
There are some ways to build a captive portal server:
1.
Regarding router compatibility I can only recommend DD-WRT build 22118 or later (coovachilli based dd-wrt).
Following versions are supported: mini_hotspot (broadcom_K26 non-nv60k , non-nv64k!), nokaid, standard, big or mega. Other versions (like mini or micro) don’t contain the hotspot module so they cannot be used for hotspot purposes.
Once you have a such build, you can start a simple Captive Portal with Chillispot.
All what you need is a FreeRadius server & Web Server.
2.
Using OptWARE
Here I used a router Asus RT N16, I've patched it with dd-wrt.v24-18024_NEWD-2_K2.6_mega.bin
The entire tutorial is here.

How to run a local html file which is in my pc (Windows 7) to safari web browser on my iPhone?

I want to run my local html file which is saved on my desktop, on Safari of my iPhone. I have a local web server running on my system (xampp) as well as I have opened the ports(on which the file is running) required through my firewall. Is there any other settings I need to do on my iPhone also?
Please explain how to run the file. Thanks in advance!
If your ISP provides a dynamic IP address you'll need to look into a service which overcomes this, for example No IP. That way all you'll need to do is type in the domain provided to get to your web app.
Therefore, instead of accessing http://123.123.123.123:8080 you simply run http://your-new-domain.com:8080.