当前位置:网站首页>WiFi one click connection configuration of raspberry pie
WiFi one click connection configuration of raspberry pie
2022-07-28 07:12:00 【The most beautiful wish must be the craziest】
Turn on AP Pattern , Turn raspberry pie into a hot spot
This is the online search tutorial through tools create_ap To operate . First installation create_ap
function sudo git clone https://github.com/oblique/create_ap.git
function cd create_ap/
function sudo make install
Install dependent library run :
sudo apt-get install util-linux procps hostapd iproute2 iw haveged dnsmasq
About raspberry pie static IP Configuration of
modify /etc/dhcpcd.conf file
The last side of the file is added
interface eth0
static ip_address=192.168.0.10/24 (IP)
static routers=192.168.0.1 ( gateway )
static domain_name_servers=192.168.0.1 (DNS)
For details, please refer to the following website :
http://www.cnblogs.com/taojintianxia/p/6026225.html
Python-wifi Download and install
function :
sudo wget
function sudo tar xvjf python-wifi-0.6.1.tar.bz2
function cd python-wifi-0.6.1/
function sudo python setup.py install install
test :
>>> from pythonwifi.iwlibs import Wireless
>>> wifi = Wireless('wlan0')
>>> wifi.getEssid()
'scream02'
>>> wifi.getMode()
'Managed'
WIFI Installation of debugging tools
Carry out orders :sudo pip install wifi
Reference resources :https://wifi.readthedocs.io/en/latest/
When using this programming, use cell = Cell.all('wlan0') To the surroundings wifi scan , Often appear wifi Scan not available , You can only scan the currently connected wifi, Later used root This problem does not occur when the permission is running
pywifi Module installation
This is an online article , The download address is attached
http://www.cnblogs.com/jkkkk/p/6386308.html
Decompress after downloading , You need to make some changes after unzipping , If you download it from other places, you may not need to modify it . file /pywifi-msater/pywifi/iface.py Need to put """"Get the name of the wifi interfacce.""" Remove one quotation mark from the left of this sentence , Otherwise, the program will not run correctly . Then copy the folder to raspberry pie
function sudo python setup.py install install
socket Network programming
routine :
Server side :
#!/usr/bin/env python
import socket
s=socket.socket()
host=socket.gethostname()
print host
port=12345
s.bind(("192.168.2.141",port)) ( Bind the address and port )
s.listen(5) ( Maximum connectable number , It's usually 5, At least 1)
while True:
c,addr=s.accept() ( Obstructed , Waiting for the client )
print "client",addr
print c.recv(1024) ( Notice the handle here c , This is the client side .)
client :
#!/usr/bin/env python
import socket
s = socket.socket()
port = 12345 ( The port of the server )
s.connect(("192.168.2.141", port))
s.send("1234567")
s.close()
Details refer to :http://www.runoob.com/python/python-socket.html
Some explanations about ports . Ports are used to identify different services . In the LAN , Each host can access each other through ports . The port is the entrance of each service . As shown in the figure below , When the client accesses , From the Internet , It can only see ports A1,A2,A3.... On the router side , Turn the computer A,B,C Server port on B1B2.....C1C2..D1D2.. Mapped to the router A1A2A3... On . for example B1 and A1 Is a mapping relationship , If you want to access the service port through the Internet B1, You can only access the port A1, Because I can see it intelligently on the Internet B1 Mapping port of A1, Out of sight B1.

After a day of testing and research ,python-wifi Most functions are state acquisition , Only suitable wifi Management of , Not suitable for connection . and WIFI The attempt to connect was unsuccessful , After each connection ,wifi The module will not work properly . Unable to connect . Finally decided to use pywifi Connect ,wifi scanning
Test source :https://github.com/IJustLoveMyself/Raspberry-Pi/blob/master/test3/wifi_test.py( Network debugging assistant is required )
边栏推荐
- JS string method Encyclopedia
- shell---条件语句练习
- easypoi导出隔行样式设置
- Shell script - sort, uniq, TR, array sort, cut, Eval command configuration
- 分解路径为目录名和文件名的方法
- MOOC Weng Kai C language week 8: pointer and string: 1. Pointer 2. Character type 3. String 4. String calculation
- bond模式配置
- C language push box
- DOM operation cases
- Results fill in the blanks for beer and drinks
猜你喜欢

Freemaker merges cells, uses if and else tags, and processes null and empty strings

Easypoi export table with echars chart

爬虫学习总结

kali下安装nessus

MySQL queries all descendant nodes under the parent node. When querying the user list, it is processed by multi-level (company) departments. According to reflection, it recurses the tree structure too

shell---函数

1、 PXE overview and installation

SySeVR环境配置:joern-0.3.1、Neo4j-2.1.5、py2neo2.0
![[learning records of erudite Valley] Super summary, attentive sharing | collection](/img/a3/4183a074a7cdc41fe7624624492280.png)
[learning records of erudite Valley] Super summary, attentive sharing | collection

DOM -- event chain, event bubble and capture, event proxy
随机推荐
爬虫学习总结
Read the IP and device information of the switch node in the XML file, Ping the device, and the exception is displayed in the list
NAT-网络地址转换
easypoi导出表格带echars图表
MOOC翁恺 C语言 第三周:判断与循环:2.循环
easypoi导出隔行样式设置
Operation document tree
Uni app double click event simulation
MOOC翁恺C语言第八周:指针与字符串:1.指针2.字符类型3.字符串4.字符串计算
Standard C language learning summary 9
JS array method Encyclopedia
Results fill in the blanks for beer and drinks
About gcc:multiple definition of
Escape character notes
MOOC Weng Kai C language fourth week: further judgment and circulation: 3. Multiple branches 4. Examples of circulation 5. Common errors in judgment and circulation
joern运行后.joernindex数据库无内容
Blue bridge code error ticket
Starting point Chinese website font anti crawling technology web page can display numbers and letters, and the web page code is garbled or blank
Use powercli to create a custom esxi ISO image
Layer 3 switching and VRRP