HclX / WyzeHacks

Hacks I discovered allowing Wyze camera owners to do customizations
MIT License
793 stars 75 forks source link

Request for USB Ethernet driver? #62

Open ryny24 opened 3 years ago

ryny24 commented 3 years ago

I just found this WyzeHacks and I can't wait to try it.

Would it be possible to add ethernet (USB) support to the WyzeCam? For locations that don't have Wifi. Just a thought!

Keep up the good work!

Vendo232 commented 2 years ago

I just found this WyzeHacks and I can't wait to try it.

Would it be possible to add ethernet (USB) support to the WyzeCam? For locations that don't have Wifi. Just a thought!

Keep up the good work!

Hello , would you commands to change SSID and password in V3 via telnet?

gtxaspec commented 2 years ago

i got this to work without needing a wifi network present... that was the issue right? you still needed wifi when the camera booted?

Vendo232 commented 2 years ago

i got this to work without needing a wifi network present... that was the issue right? you still needed wifi when the camera booted?

hello @gtxaspec , what steps did you run to make the ethernet working on V3?

gtxaspec commented 2 years ago

code goes like this:

echo "check if ethernet adapter is present"
 if [[ ! -d /sys/class/net/eth* ]]; then
        echo "usb ethernet not present"
    else
        ifconfig eth0 down
        ifconfig wlan0 down

        /media/mmc/busybox ip link set wlan0 name wlanold 
        /media/mmc/busybox ip link set eth0 name wlan0

        ifconfig wlan0 up
        udhcpc -i wlan0
        /media/mmc/dropbearmulti dropbear -R -m &
        sleep 5
        mount -o bind /media/mmc/wpa_cli.sh /bin/wpa_cli
    fi

wpa_cli.sh:

#!/bin/sh

echo 'wpa_state=COMPLETED'
echo ip_addresss=`ifconfig wlan0 | awk '/inet / {print $2}' | awk -F: '{print $2}'`

EDIT: make sure you are using a busybox that has the ip applet built in. the stock wyze one does ont.

evanheckert commented 2 years ago

@gtxaspec Thanks for sharing this! I'll give this a try. What cable/adapter are you using to get ethernet connected?

gtxaspec commented 2 years ago

@evanheckert I'm using an AX88772B usb 2.0 ethernet adapter, an old macally one.
according to the kernel you should be able to use most asix or r8152 based usb ethernet adapters.

[    0.516183] usbcore: registered new interface driver r8152
[    0.521875] usbcore: registered new interface driver asix
evanheckert commented 2 years ago

@gtxaspec

EDIT: make sure you are using a busybox that has the ip applet built in. the stock wyze one does not.

Not sure I follow on this. What's a busybox?

Also I manually triggered

And both worked, so I made the grave mistake of adding them as export CUSTOM_SCRIPT lines. Then with a reboot, only wlan0_kill.sh worked, apparently, because it connects to wifi just long enough to see it at the router control panel, then disappears.

If I can't telnet in and wifi is disabled, am I bricked?

gtxaspec commented 2 years ago

busybox is a utility that included in the wyze firmware. You can always flash back using the stock firmware. I will release a version of wz_mini_hacks soon that has the ethernet stuff built in.

evanheckert commented 2 years ago

busybox is a utility that included in the wyze firmware. You can always flash back using the stock firmware. I will release a version of wz_mini_hacks soon that has the ethernet stuff built in.

Awesome! Starred and followed. I'll give it a go when the ethernet stuff is added. RTSP enabled as well?

gtxaspec commented 2 years ago

you can use the RTSP firmware too!

UncleJohnsBnd commented 2 years ago

busybox is a utility that included in the wyze firmware. You can always flash back using the stock firmware. I will release a version of wz_mini_hacks soon that has the ethernet stuff built in.

When will this be available?

UncleJohnsBnd commented 2 years ago

Does this work on V3?

gtxaspec commented 2 years ago

https://github.com/gtxaspec/wz_mini_hacks