Introduction
PyAccessPoint is a package to create a wifi access point on linux. Itdepends on hostapd for AP provisioning and dnsmasq to assign IP addresses to devices.
Dependencies
So, there 2 types of dependencies.
- System dependencies:
dnsmasq
hostapd
python3
- Python dependencies
wireless
netifaces
psutil
You can not install python dependencies manually, they will be installed while installing the package. If you want to do it manually, just type (or copy, it’s better way :D)
sudo apt install python3-dev python3-pip && sudo pip3 install wireless netifaces psutil
Installation
Easy way by using pip
sudo apt update && sudo apt --yes --force-yes install dnsmasq hostapd python3-dev python3-pip && sudo pip3 install pyaccesspoint
Hard way
Install system dependencies
sudo apt update && sudo apt --yes --force-yes install dnsmasq hostapd python3-dev unzip python3-pip
Download latest package
cd ~ && wget --output-document=pyaccesspoint-master.zip https://github.com/Goblenus/pyaccesspoint/archive/master.zip
Unpack downloaded package
unzip pyaccesspoint-master.zip && cd pyaccesspoint-master
Install it
sudo python3 setup.py install
Remove files
cd ~ && sudo rm -rf pyaccesspoint-master.zip pyaccesspoint-master
That is all. Now you can use PyAccessPoint.
One line install:
sudo apt update && sudo apt --yes --force-yes install dnsmasq hostapd python3-dev unzip python3-pip && cd ~ && wget --output-document=pyaccesspoint-master.zip https://github.com/Goblenus/pyaccesspoint/archive/master.zip && unzip pyaccesspoint-master.zip && cd pyaccesspoint-master && sudo python3 setup.py install && cd ~ && sudo rm -rf pyaccesspoint-master.zip pyaccesspoint-master
Usage
You can use it as standalone command line utility: To start
sudo pyaccesspoint start
It will create hotspot named “MyAccessPoint” on wlan0 with “1234567890” password.
All arguments you may obtain by typing:
pyaccesspoint --help
To stop
sudo pyaccesspoint stop
You can configure and save config file. This will save you time at them next start
sudo pyaccesspoint configure
You config file file will be placed at /etc/accesspoint/accesspoint.json. To start it with config file just type:
sudo pyaccesspoint --config start
Code usage
Import
from PyAccessPoint import pyaccesspoint
Create AccessPoint class
access_point = pyaccesspoint.AccessPoint()
Start it
access_point.start()
Stop it
access_point.stop()
- To check is accesspoint started use is_running
access_point.is_running()
You can change accesspoint parameters while creating AccessPoint class
- Class parameters:
wlan - wlan interface
inet - wlan forward to interface (use None to off forwarding)
ip - just ip of your accesspoint wlan interface
netmask - so… -> (wiki link)
ssid - name of your accesspoint
password - password of your accesspoint
Tested
OrangePi Plus with Armbian 5.23
Note
This project is python3 compatible only, python2 is not tested at all.
Idea
This project is fork of https://github.com/prahladyeri/hotspotd (Prahlad Yeri - prahladyeri@yahoo.com)
Metadata
Release files for PyAccessPoint 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PyAccessPoint-0.2.5.tar.gz | 7.0 kB | Without provenance | Details for PyAccessPoint-0.2.5.tar.gz |
Release files / PyAccessPoint-0.2.5.tar.gz
| Download URL | PyAccessPoint-0.2.5.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
618fa6f614f7e4ed65ce32b3c44de50b19a702fbeb26c420080b73e176159188
|
|
BLAKE2b-256 checksum How to use checksums |
25fa8bb1c38f6936a4d5a0e8d24571dc32b308244af756c900004b727c9f471a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for PyAccessPoint 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.