Herramientas de usuario

Herramientas del sitio


personas:jero98772:antena-direcional-pringler:p-node-comandos

small docuemntation of p-node proyect

upload image to rapsberry pi

image file in:

http://www.p-node.org/pibox_img/pibox_V2.img

next use etcher

upload image on terminal

see de devices coneted

 df -h

upload iso(img)

 sudo dd if=2018-04-18-raspbian-stretch.img of=/dev/sdb status=progress bs=1M

manual configuration

connet via ssh

ssh pi@<IP_of_the_pibox>

update

cd pibox_V2
git pull

if ssh dont work plese use and habiliate in raspberry pi config with , you can configurate wifi onthere:

sudo raspi-config

change wifi (manual way)

 sudo nano /etc/hostapd/hostapd.conf

clear and preparete operating sistem

 sudo apt-get update
 sudo apt-get upgrade
 sudo apt-get install git sox libav-tools oggfwd python3-pip
 sudo pip3 install bs4

install radio on rybn repo

 cd
 git clone http://git.rybn.org/rybn/pibox_V2.git

install dependencies

sudo apt-get install hostapd dnsmasq

stop services to configurate them

 sudo systemctl stop dnsmasq
 sudo systemctl stop hostapd

crete file to configurate hospot

 sudo nano /etc/hostapd/hostapd.conf

configurate network

 	interface=wlan0
	driver=nl80211
	ssid=myssid
	hw_mode=g
	channel=7
	wmm_enabled=0
	macaddr_acl=0
	auth_algs=1
	ignore_broadcast_ssid=0

save and close

configurate next file

 sudo nano /etc/default/hostapd

edit file

 edit this #DAEMON_CONF="" for 
	DAEMON_CONF="/etc/hostapd/hostapd.conf"
 sudo cp /etc/dnsmasq.conf /etc/dnsmasq.conf_back
 echo "" | sudo tee /etc/dnsmasq.conf

save and close

create file for configurate hospot network

 sudo nano /etc/dnsmasq.conf

copy and paste in file

 	interface=wlan0      
	dhcp-range=192.168.100.2,192.168.100.10,255.255.255.0,24h

save and close

edit dhcpcd.conf

 sudo nano /etc/dhcpcd.conf

copy and paste this configuration

	interface wlan0
	static ip_address=192.168.100.1/24
	nohook wpa_supplicant

now can start services

 sudo systemctl restart dhcpcd
 sudo systemctl unmask hostapd
 sudo systemctl start hostapd
 sudo systemctl enable hostapd
 sudo systemctl start dnsmasq

set hospot name

  sudo hostnamectl set-hostname "pibox"

reboot

when you reboot , edit rc.local

 
 sudo nano /etc/rc.local

copy and paste this in rc.local

			#!/bin/sh -e
			#
			# rc.local 
			#
			# This script is executed at the end of each multiuser runlevel.
			# Make sure that the script will "exit 0" on success or any other
			# value on error.
			#
			# In order to enable or disable this script just change the execution
			# bits.
			#
			# By default this script does nothing.

			# Print the IP address 
			_IP=$(hostname -I) || true
			if [ "$_IP" ]; then
			  printf "My IP address is %s\n" "$_IP"
			fi

this		/usr/bin/python3 /home/pi/pibox_V2/go.py 2> /home/pi/pibox_V2/error_log.txt >/dev/null &

			exit 0

/usr/bin/python3 /home/pi/pibox_V2/go.py 2> /home/pi/pibox_V2/error_log.txt >/dev/null &
create rules

edit network rules

 sudo nano /etc/udev/rules.d/70-persistent-net.rules

add this

	 ACTION=="add", SUBSYSTEM=="net", DRIVERS=="r8188eu", NAME="wlan1"

shutdown

 sudo halt

now you can test it

wifi

ssid pibox

password pnodeaccesspass

ip 192.168.100.1

(copy and paste

192.168.100.1

in your browuser )

more documentation in

personas/jero98772/antena-direcional-pringler/p-node-comandos.txt · Última modificación: 2021/09/12 01:41 por jero98772