Orange Pi Zero – point d’accès Wifi
Publié le 02/01/2017 par Alastor Pilkine
Allez hop, en mode rapide…

hostapd est déjà installé, il suffit de le paramétrer, pour cela :

On ajoute le chemin du fichier de config dans /etc/init.d/hostapd, exemple : « DAEMON_CONF=/etc/hostapd/hostapd.conf »
On gère la conf du daemon dans le fichier précédent :

# This is the name of the WiFi interface we configured above
interface=wlan0
# Use the nl80211 driver with the brcmfmac driver
driver=nl80211
# This is the name of the network
ssid=babyRoadTrip
# Use the 2.4GHz band
hw_mode=g
# Use channel 6
channel=6
# Enable 802.11n
ieee80211n=1
# Enable WMM
wmm_enabled=1
# Enable 40MHz channels with 20ns guard interval
ht_capab=[HT40]
# Not sure if OPi supports these:
# [SHORT-GI-20][DSSS_CCK-40]
# Accept all MAC addresses
macaddr_acl=0
# Use WPA authentication
auth_algs=3
# Require clients to know the network name
ignore_broadcast_ssid=0
# Use WPA2
wpa=2
# Use a pre-shared key
wpa_key_mgmt=WPA-PSK
# The network passphrase
wpa_passphrase=roadtrip
# Use AES, instead of TKIP
rsn_pairwise=CCMP


J’avoue, cette conf vient du forum orangepi.
On oubli pas de gérer l’interface wlan0 dans le fichier /etc/network/interfaces :
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.114.1
netmask 255.255.255.0
network 192.168.114.0
broadcast 192.168.114.255


On oubli pas d’installer dnsmasq pour le DHCP, et on remplace la conf par défaut par la suivante, dans le fiocher /etc/dnsmasq.conf :

interface=wlan0
dhcp-range=192.168.114.114,192.168.114.200,255.255.255.0,12h


Et voila !

 

In this article I’ll present how I used a Raspberry Pi 3 to create a Wifi access point. The specificity of my setup, is that the Raspberry won’t be a router but a bridge. DHCP is thus delegated to the main ADSL router and all devices connected to the AP will appear on the same network than other devices.

 

The instructions below are based on a fresh Raspbian lite install so that it can be reproduced easily.

Install the required packages :

sudo apt-get install -y bridge-utils hostapd

To create a bridge, we need to enable ip_forward in the kernel, for that, edit /etc/sysctl.conf and remove comment (#) from the following line :

net.ipv4.ip_forward=1

Then configure your network to create a bridge with eth0, in /etc/network/interfaces :

auto lo
iface lo inet loopback

# Disable eth0 / wlan0 config, handled by bridge
auto eth0
#iface eth0 inet manual
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual

# Create a bridge with static IP
auto br0
iface br0 inet static
bridge_ports eth0
address 192.168.1.13
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
# Or use dhcp client on bridge
#iface br0 inet dhcp


You may have noticed that wlan0 is not configured in bridge br0. This is because hostapd will handle this once the access point is ready. So, next step is to configure the access point. For this, edit the file /etc/hostapd/hostapd.conf :
# First part is about configuring the access point and is copied from reference 1
interface=wlan0
driver=nl80211
hw_mode=g
channel=6
ieee80211n=1
wmm_enabled=1
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
# This part is about setting SSID and WPA2 password
ssid=wifi_ssid
wpa_passphrase=wifi_password
# This line ask hostapd to add wlan0 to the bridge br0
bridge=br0

Now we need to tell hostapd to use our config. For that, edit /etc/default/hostapd and set:

DAEMON_CONF="/etc/hostapd/hostapd.conf"

Ok, here we go, just reboot the Pi and voilà.

sudo reboot

This article is inspired from following articles :

source ! http://blog.ithasu.org/2016/10/using-a-raspberry-pi-3-as-a-wifi-access-point-and-bridge/



Source : https://legeeko.wordpress.com/2017/02/01/orange-pi-zero-point-dacces-wifi/

 

auto eth0 iface eth0 inet static address 192.168.20.225 netmask 255.255.255.0 network 192.168.20.0 broadcast 192.168.20.255 gateway 192.168.20.1 auto eth1 iface eth1 inet dhcp auto br0 iface br0 inet static address 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255 bridge_ports eth1 eth0 bridge-ageing 7200 bridge_spt off
Source : https://forum.ubuntu-fr.org/viewtopic.php?id=449457

Connexion à une box :

sudo nano /etc/network/interfaces

le script à ajouter :

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
   wpa-ssid "ssid"
   wpa-psk "password"

 

Orange pi temperature

cat /sys/devices/virtual/thermal/thermal_zone0/temp

cat /sys/devices/virtual/thermal/thermal_zone1/temp

 

 

OS orange pi :

https://www.reddit.com/r/RetroPie/comments/5mufrq/howto_getting_retrorangepi_30_to_run_on_the/

En poursuivant votre navigation sur mon site, vous acceptez l’utilisation des Cookies et autres traceurs  pour réaliser des statistiques de visites et enregistrer sur votre machine vos activités pédagogiques. En savoir plus.