Allow for the user to override the auto-detect Ethernet code.

Also, update README for this change
This commit is contained in:
Scott Kilau 2022-06-21 09:01:45 -05:00
parent 0bd0c36401
commit 618018fc05
3 changed files with 40 additions and 30 deletions

View File

@ -152,12 +152,15 @@ USB Ethernet Adapter support:
```
ENABLE_USB_ETH="true"
ENABLE_USB_ETH_MODULES="asix,r8152,cdc_ether"
ENABLE_USB_ETH_MODULE=""
```
available modules: asix, ax88179_178a, cdc_ether, r8152
To have the Ethernet NIC be auto-detected, set the ENABLE_USB_ETH_MODULE value to an empty string, eq: ""
the next time you boot your camera, make sure your USB Ethernet Adapter is connected to the camera and ethernet. The camera has to be setup initially with Wi-Fi for this to work. After setup, Wi-Fi is no longer needed, as long as you are using the USB Ethernet Adapter. Note that using USB Ethernet disables the onboard Wi-Fi. Specify the driver you need for your specific USB Ethernet adapter. asix is listed by default.
To load a specific USB Ethernet NIC driver, set ENABLE_USB_ETH_MODULE to one of the following:
asix, ax88179_178a, cdc_ether, r8152
The next time you boot your camera, make sure your USB Ethernet Adapter is connected to the camera and ethernet. The camera has to be setup initially with Wi-Fi for this to work. After setup, Wi-Fi is no longer needed, as long as you are using the USB Ethernet Adapter. Note that using USB Ethernet disables the onboard Wi-Fi.
---

View File

@ -277,6 +277,11 @@ if [[ "$ENABLE_USB_ETH" == "true" ]]; then
insmod $KMOD_PATH/kernel/drivers/net/usb/usbnet.ko
# Should we load a specific Ethernet driver, or try to auto-detect one
if [[ "ENABLE_USB_ETH_MODULE" != "" ]]; then
insmod $KMOD_PATH/kernel/drivers/net/usb/$ENABLE_USB_ETH_MODULE.ko
else
# Auto-Detect an Ethernet Driver and load it
for DEVICE in `lsusb | awk '{print $6}'| tr '[:upper:]' '[:lower:]'`; do
case $DEVICE in
'077b:2226' | '0846:1040' | '2001:1a00' | '0b95:1720' | '07b8:420a' |\
@ -304,6 +309,7 @@ if [[ "$ENABLE_USB_ETH" == "true" ]]; then
;;
esac
done
fi
if [[ "$BONDING_ENABLED" == "true" ]]; then
if [[ "$BONDING_LINK_MONITORING_FREQ_MS" == "" ]]; then

View File

@ -12,6 +12,7 @@ WEB_CAM_FPS_RATE="25"
CUSTOM_HOSTNAME="WCV3"
ENABLE_USB_ETH="false"
ENABLE_USB_ETH_MODULE=""
ENABLE_USB_DIRECT="false"
USB_DIRECT_MAC_ADDR="02:01:02:03:04:08"