psolyca / Yi_4k_ROOTFS

Yi 4k file system optimisation and debug
39 stars 3 forks source link

YI 4K Wifi station mode #1

Closed tuxmike closed 5 years ago

tuxmike commented 5 years ago

Hi,

I'm trying to get the YI 4K into wifi station modewith SW version 1.10.9 by adding a config to the SD-card, but all attempts that i tried failed... First try:

##### Wifi configuration file (sta.conf) ##########################################
# SSID
SSID=[mySSID]
# Password
PASSWORD=[myPassword]
# Device Name
DEVICE_NAME=YI4K
# Country Code
COUNTRY_CODE=US

Second try, copied from the original root-fs:

##### STA mode configuration (wifi.conf) ##########################################
# ap: SoftAP mode
# sta: Station mode
# p2p: Enable Wifi Direct Support for peer-to-peer connectibity
WIFI_MODE=sta
# SSID
ESSID=[mySSID]
# Passphrase. Leave empty at no security mode; please edit wpa_supplicant.conf when your AP cannot be detected
PASSWORD=[myPassword]
# Device Name for AMBA Discovery Protocol (optional)
STA_DEVICE_NAME=YI4K
# Do not detect SSID setting changes, use previous scanned results
STA_SKIP_SCAN=yes

Tird try, using other param names I found in the root-fs-scripts...

##### STA mode configuration (wifi.conf) ##########################################
# ap: SoftAP mode
# sta: Station mode
# p2p: Enable Wifi Direct Support for peer-to-peer connectibity
WIFI_MODE=sta
# SSID
STA_SSID=[mySSID]
# Passphrase. Leave empty at no security mode; please edit wpa_supplicant.conf when your AP cannot be detected
STA_PASSWD=[myPassword]
# AP freq (0: 2.4G  other:5G)
STA_FREQ=0
# Device Name for AMBA Discovery Protocol (optional)
STA_NAME=YI4K
# Do not detect SSID setting changes, use previous scanned results
STA_SKIP_SCAN=yes

Can someone give me a hint, what I'm doing wrong? Is there no way to enable Station mode with the original firmware?

Regards, Mike

psolyca commented 5 years ago

Hey,

No, you can not have station mode with original firmware as there is a bug in it. You must use a custom firmware.

Use this one for minimal modification v0.9 Otherwise take the last one in the release page

tuxmike commented 5 years ago

Thanks -> closed

pansitlugaw commented 1 year ago

Hey,

No, you can not have station mode with original firmware as there is a bug in it. You must use a custom firmware.

Use this one for minimal modification v0.9 Otherwise take the last one in the release page

Hi sir psolyca, I'm using yi4k firmware version 1.9 with a broken screen. the wifi is currently on but I can't connect to wifi because of wrong password. can you help me have a code for getting the password of my yi4k wifi. thanks

psolyca commented 1 year ago

Hey,

If you are on my custom firmware, edit the wifi.conf file on the SDCard to match the password of the wifi network you want to join. Otherwise, I do not understand what you want !

pansitlugaw commented 1 year ago

Let me explain. I'm trying to connect my yi action app on my phone to my yi4k (currently on your custom firmware). The hotspot of the action camera was already on and the network is visible on my phone. but I cannot connect because of wrong password. I cannot touch my camera because it has broken screen. I just hoping if you can help me set up new password of the wifi of my action camera. Thanks.

psolyca commented 1 year ago

If you are on my custom firmware, create a wifi.conf on the SDCard and fill it with :

##### Wifi configuration file ##########################################
WIFI_MODE=ap
WIFI_MAC=
# This is a work around caused by a bug I have introduced, force IP of AP
# SSID (1 ~ 32 characters)
AP_SSID=YDXJ_AP
# IP address
LOCAL_IP=192.168.42.1
# IP subnet mask
LOCAL_NETMASK=255.255.255.0
# IP pool starting address of DHCP server
DHCP_IP_START=192.168.42.2
# IP pool end address of DHCP server
DHCP_IP_END=192.168.42.10
# Wifi channel number, set 0 to use Auto Channel Selection
AP_CHANNEL=0
# Wifi channel 5G/2.4G, set 0 to use 2.4G Channel/set 1 to use 5G
# Empty to use the value set in the cam menu otherwise force the value
AP_CHANNEL_5G=
# Maximum number of stations allowed in station table
AP_MAXSTA=5
# If you say yes here, all WPA/WEP settings will be ignored
AP_PUBLIC=no
# WPA Passphrase (8 ~ 63 characters)
AP_PASSWD=the_password_you_want
# Empty to use the value set in the cam menu otherwise force the value
AP_COUNTRY=

Change the AP_PASSWD value to suit your need also the AP_SSID

muzzol commented 1 year ago

sorry for using a closed issue but I just want to be sure I understand how to use this firmware.

If I just want to put a static IP on my yi 4k do I need to replace stock firmware? I was reading somewhere else that you can just put sta.conf on SD root to achieve that, so I'm a little bit confused here.

thanks for your time.

psolyca commented 1 year ago

Hey! You can put a sta.conf but the official firmware is buggy so it will not work. Use my firmware and you'll have more capabilities and less bugs.