mirror of
https://github.com/RoganDawes/P4wnP1_aloa.git
synced 2025-03-17 13:21:50 +01:00
minor changes
This commit is contained in:
parent
9bcdb27065
commit
e2e7a62bee
@ -9,7 +9,7 @@ var tmpEventID int64
|
||||
|
||||
// usbCmd represents the usb command
|
||||
var evtCmd = &cobra.Command{
|
||||
Use: "EVT",
|
||||
Use: "evt",
|
||||
Short: "Receive P4wnP1 service events",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
err := receiveEvent(tmpEventID)
|
||||
|
@ -21,7 +21,7 @@ var (
|
||||
)
|
||||
|
||||
var hidCmd = &cobra.Command{
|
||||
Use: "HID",
|
||||
Use: "hid",
|
||||
Short: "Use keyboard or mouse functionality",
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ func init(){
|
||||
*/
|
||||
|
||||
var netCmd = &cobra.Command{
|
||||
Use: "NET",
|
||||
Use: "net",
|
||||
Short: "Configure Network settings of ethernet interfaces (including USB ethernet if enabled)",
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ func checkIPv4(ip4 string) error {
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(netCmd)
|
||||
netCmd.AddCommand(netGetCmd)
|
||||
// netCmd.AddCommand(netGetCmd)
|
||||
netCmd.AddCommand(netSetCmd)
|
||||
netSetCmd.AddCommand(netSetManualCmd)
|
||||
netSetCmd.AddCommand(netSetDHCPClientCmd)
|
||||
|
@ -31,7 +31,7 @@ func init(){
|
||||
*/
|
||||
|
||||
var wifiCmd = &cobra.Command{
|
||||
Use: "WIFI",
|
||||
Use: "wifi",
|
||||
Short: "Configure WiFi (spawn Access Point or join WiFi networks)",
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ func createWifiStaSettings(reg string, strSSID string, strPSK string, nonexmon b
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(wifiCmd)
|
||||
wifiCmd.AddCommand(wifiGetCmd)
|
||||
//wifiCmd.AddCommand(wifiGetCmd)
|
||||
wifiCmd.AddCommand(wifiSetCmd)
|
||||
wifiSetCmd.AddCommand(wifiSetAPCmd)
|
||||
wifiSetCmd.AddCommand(wifiSetStaCmd)
|
||||
|
6
dist/scripts/servicestart.sh
vendored
6
dist/scripts/servicestart.sh
vendored
@ -12,18 +12,18 @@ P4wnP1_cli usb set --vid 0x1d6c --pid 0x1347 --manufacturer "MaMe82" --sn "deadb
|
||||
# - disable DHCP option 3 (router) by passing an empty value
|
||||
# - disable DHCP option 6 (DNS) by passing an empty value
|
||||
# - add a DHCP range from 172.16.0.2 to 172.16.0.2 (single IP) with a lease time of 1 minute
|
||||
P4wnP1_cli NET set server -i usbeth -a 172.16.0.1 -m 255.255.255.248 -o "3:" -o "6:" -r "172.16.0.2|172.16.0.2|5m"
|
||||
P4wnP1_cli net set server -i usbeth -a 172.16.0.1 -m 255.255.255.248 -o "3:" -o "6:" -r "172.16.0.2|172.16.0.2|5m"
|
||||
|
||||
# Enable WiFi AP (reg US, channel 6, SSID/AP name: "P4wnP1", pre shared key: "MaMe82-P4wnP1", don't use nexmon firmware)
|
||||
# Note: As a pre-shared key is given, P4wnP1 assume the AP should use WPA2-PSK
|
||||
# Note 2: The SSID uses Unicode characters not necessarily supported by the console, but P4wnP1 supports UTF-8 ;-)
|
||||
P4wnP1_cli WIFI set ap -r US -c 6 -s "💥🖥💥 Ⓟ➃ⓌⓃ🅟❶" -k "MaMe82-P4wnP1" --nonexmon
|
||||
P4wnP1_cli wifi set ap -r US -c 6 -s "💥🖥💥 Ⓟ➃ⓌⓃ🅟❶" -k "MaMe82-P4wnP1" --nonexmon
|
||||
|
||||
# Configure USB ethernet interface "wlan0" to run a DHCP server
|
||||
# - use IPv4 172.24.0.1 for interface with netmask 255.255.255.0
|
||||
# - disable DHCP option 3 (router) by passing an empty value
|
||||
# - disable DHCP option 6 (DNS) by passing an empty value
|
||||
# - add a DHCP range from 172.24.0.10 to 172.24.0.20 with a lease time of 5 minutes
|
||||
P4wnP1_cli NET set server -i wlan0 -a 172.24.0.1 -m 255.255.255.0 -o "3:" -o "6:" -r "172.24.0.10|172.24.0.20|5m"
|
||||
P4wnP1_cli net set server -i wlan0 -a 172.24.0.1 -m 255.255.255.0 -o "3:" -o "6:" -r "172.24.0.10|172.24.0.20|5m"
|
||||
|
||||
P4wnP1_cli led -b 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user