First, flash into TF card, creat a new file with name: ssh without suffix and wpa_supplicant.conf type command and save:
country=CN ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="yours" psk="passwd" key_mgmt=WPA-PSK priority=1 } #if you have 2 or more local networks show specified sequence to system by "priority" network={ ssid="another" psk="passwd2" key_mgmt=WPA-PSK priority=2 }
employ 2 files to root directory and copy necessary display drivers
PS: after the raspberry pi boot completed, it will be automatically added to the /etc/wpa_supplicant/wpa_supplicant.conf for intranet automatic connection.
wpa_supplicant.conf structure as follow:
// 详细介绍:
#ssid:网络的ssid
#psk:密码
#priority:连接优先级,数字越大优先级越高(不可以是负数)
#scan_ssid:连接隐藏WiFi时需要指定该值为1
// 如果你的 WiFi 没有密码
network={
ssid="你的无线网络名称(ssid)"
key_mgmt=NONE
}
// 如果你的 WiFi 使用WEP加密
network={
ssid="你的无线网络名称(ssid)"
key_mgmt=NONE
wep_key0="你的wifi密码"
}
// 如果你的 WiFi 使用WPA/WPA2加密
network={
ssid="你的无线网络名称(ssid)"
key_mgmt=WPA-PSK
psk="你的wifi密码"
}
then modify the config.txt with follow text:
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1 #可以去掉开机屏幕周围的黑色边框
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1#
#