diff mbox series

[OpenWrt-Devel] brcm2708: Tethering by default

Message ID 20180519153814.5917-1-christo.nedev@gmail.com
State Changes Requested
Delegated to: John Crispin
Headers show
Series [OpenWrt-Devel] brcm2708: Tethering by default | expand

Commit Message

Christo Nedev May 19, 2018, 3:38 p.m. UTC
>usb0 interface is used by USB-to-ethernet adapters <that's what we  need> or smartph
one
>tethering <my be mobile WIFI as well>, and they need drivers to work. Just adding the interface does
>not have any effect.
Do you mean these drivers -> kmod-usb-net kmod-usb-net-cdc-ether kmod-usb-net-rndis?

>I think it makes more sense to enable the wifi on the raspi zero and
>zero W by default.
Pi Zero has no radio! WIFI can be configured in meny different whays!
What about to open SSH port for WAN interface?

>Raspi 3 have an ethernet port and it works, I think there is no need to
>add usb0 interface. Many devices have only ethernet ports in OpenWrt.
You are right here! When I SSH through LAN how to get connected to the internet?

>Also, since you are active on these devices, it seems that the wifi on
>the Pi 3 B+ only needs firmware files extracted from Raspbian to work,
>maybe you can add that too?
>See this post
>https://forum.lede-project.org/t/raspberry-pi-3-b-openwrt-lede-image/13066/32
Saw it long time ago!
Last wireless drivers: https://community.cypress.com/servlet/JiveServlet/download/14837-1-34881/cypress-fmac-v4.14-2018_0321.zip

Please approve to get ahead.

Signed-off-by: Christo Nedev <christo.nedev@gmail.com>
---
 target/linux/brcm2708/Makefile                          |  1 +
 target/linux/brcm2708/base-files/etc/board.d/02_network | 13 ++++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

Comments

Alberto Bursi May 19, 2018, 5:30 p.m. UTC | #1
On 19/05/2018 17:38, Christo Nedev wrote:
>> usb0 interface is used by USB-to-ethernet adapters <that's what we  need> or smartph
> one
>> tethering <my be mobile WIFI as well>, and they need drivers to work. Just adding the interface does
>> not have any effect.
> Do you mean these drivers -> kmod-usb-net kmod-usb-net-cdc-ether kmod-usb-net-rndis?

Those are for Android smartphone tethering, and for the cheaper 
usb-to-gigabit-ethernet adapters, they are not all drivers for 
USB-to-ethernet dongles, and won't work with Iphone tethering.

>> I think it makes more sense to enable the wifi on the raspi zero and
>> zero W by default.
> Pi Zero has no radio! WIFI can be configured in meny different whays!
> What about to open SSH port for WAN interface?

Default wifi configuration generates an open (no password) wifi network. 
By default wifi is also disabled because an open wifi network is unsafe.

I guess for the raspi zero and zero W it's better to have tethering 
instead of enabling wifi then.

>> Raspi 3 have an ethernet port and it works, I think there is no need to
>> add usb0 interface. Many devices have only ethernet ports in OpenWrt.
> You are right here! When I SSH through LAN how to get connected to the internet?

Follow the instructions on the wiki. You should not hard-code your own 
configuration in the openwrt default configuration if there is a way to 
connect to the device to configure it. Ethernet is enough to configure a 
device.

This is for connecting an OpenWrt device to an existing ethernet network 
https://openwrt.org/docs/guide-user/network/lede_as_clientdevice

This is for setting up USB tethering 
https://openwrt.org/docs/guide-user/network/wan/smartphone.usb.tethering

Apparently we miss a tutorial to use the wifi to connect to another 
network, and I'll have to make that. Follow the initial steps of this 
tutorial 
https://openwrt.org/docs/guide-user/network/wifi/relay_configuration as 
it does show how to connect to another wifi network, ignore the parts 
about setting up a "relay bridge" as that's not required if you just 
want to connect to the Internet.

>> Also, since you are active on these devices, it seems that the wifi on
>> the Pi 3 B+ only needs firmware files extracted from Raspbian to work,
>> maybe you can add that too?
>> See this post
>> https://forum.lede-project.org/t/raspberry-pi-3-b-openwrt-lede-image/13066/32
> Saw it long time ago!
> Last wireless drivers: https://community.cypress.com/servlet/JiveServlet/download/14837-1-34881/cypress-fmac-v4.14-2018_0321.zip
>
> Please approve to get ahead.
>

I'm not a core developer, I cannot approve or merge anything. I'm just 
pointing out things I think are not going to look good for core developers.

-Alberto
John Crispin May 22, 2018, 4:54 a.m. UTC | #2
On 19/05/18 17:38, Christo Nedev wrote:
>> usb0 interface is used by USB-to-ethernet adapters <that's what we  need> or smartph
> one
>> tethering <my be mobile WIFI as well>, and they need drivers to work. Just adding the interface does
>> not have any effect.
> Do you mean these drivers -> kmod-usb-net kmod-usb-net-cdc-ether kmod-usb-net-rndis?
>
>> I think it makes more sense to enable the wifi on the raspi zero and
>> zero W by default.
> Pi Zero has no radio! WIFI can be configured in meny different whays!
> What about to open SSH port for WAN interface?
>
>> Raspi 3 have an ethernet port and it works, I think there is no need to
>> add usb0 interface. Many devices have only ethernet ports in OpenWrt.
> You are right here! When I SSH through LAN how to get connected to the internet?
>
>> Also, since you are active on these devices, it seems that the wifi on
>> the Pi 3 B+ only needs firmware files extracted from Raspbian to work,
>> maybe you can add that too?
>> See this post
>> https://forum.lede-project.org/t/raspberry-pi-3-b-openwrt-lede-image/13066/32
> Saw it long time ago!
> Last wireless drivers: https://community.cypress.com/servlet/JiveServlet/download/14837-1-34881/cypress-fmac-v4.14-2018_0321.zip
>
> Please approve to get ahead.

please write a proper description to get ahead
     John

>
> Signed-off-by: Christo Nedev <christo.nedev@gmail.com>
> ---
>   target/linux/brcm2708/Makefile                          |  1 +
>   target/linux/brcm2708/base-files/etc/board.d/02_network | 13 ++++++++++++-
>   2 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile
> index 870029c4c8..4a8b670ba7 100644
> --- a/target/linux/brcm2708/Makefile
> +++ b/target/linux/brcm2708/Makefile
> @@ -25,6 +25,7 @@ include $(INCLUDE_DIR)/target.mk
>   DEFAULT_PACKAGES += \
>   	brcm2708-gpu-fw \
>   	kmod-usb-hid \
> +	kmod-usb-net kmod-usb-net-cdc-ether kmod-usb-net-rndis \
>   	kmod-sound-core kmod-sound-arm-bcm2835 \
>   	kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
>   	brcmfmac-firmware-43430-sdio kmod-brcmfmac wpad-mini \
> diff --git a/target/linux/brcm2708/base-files/etc/board.d/02_network b/target/linux/brcm2708/base-files/etc/board.d/02_network
> index c8449bb78f..da7a22651b 100755
> --- a/target/linux/brcm2708/base-files/etc/board.d/02_network
> +++ b/target/linux/brcm2708/base-files/etc/board.d/02_network
> @@ -14,14 +14,25 @@ case "$board" in
>   raspberrypi,model-b |\
>   raspberrypi,model-b-plus |\
>   raspberrypi,model-b-rev2 |\
> -raspberrypi,2-model-b |\
> +raspberrypi,2-model-b)
> +	ucidef_set_interface_lan "eth0"
> +	ucidef_set_interface_wan "usb0"
> +	;;
> +
>   raspberrypi,3-model-b |\
>   raspberrypi,3-model-b-plus)
>   	ucidef_set_interface_lan "eth0"
> +	ucidef_set_interface_lan "wlan0"
> +	ucidef_set_interface_wan "usb0"
> +	;;
> +
> +raspberrypi,model-zero)
> +	ucidef_set_interface_wan "usb0"
>   	;;
>   
>   raspberrypi,model-zero-w)
>   	ucidef_set_interface_lan "wlan0"
> +	ucidef_set_interface_wan "usb0"
>   	;;
>   esac
>
diff mbox series

Patch

diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile
index 870029c4c8..4a8b670ba7 100644
--- a/target/linux/brcm2708/Makefile
+++ b/target/linux/brcm2708/Makefile
@@ -25,6 +25,7 @@  include $(INCLUDE_DIR)/target.mk
 DEFAULT_PACKAGES += \
 	brcm2708-gpu-fw \
 	kmod-usb-hid \
+	kmod-usb-net kmod-usb-net-cdc-ether kmod-usb-net-rndis \
 	kmod-sound-core kmod-sound-arm-bcm2835 \
 	kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
 	brcmfmac-firmware-43430-sdio kmod-brcmfmac wpad-mini \
diff --git a/target/linux/brcm2708/base-files/etc/board.d/02_network b/target/linux/brcm2708/base-files/etc/board.d/02_network
index c8449bb78f..da7a22651b 100755
--- a/target/linux/brcm2708/base-files/etc/board.d/02_network
+++ b/target/linux/brcm2708/base-files/etc/board.d/02_network
@@ -14,14 +14,25 @@  case "$board" in
 raspberrypi,model-b |\
 raspberrypi,model-b-plus |\
 raspberrypi,model-b-rev2 |\
-raspberrypi,2-model-b |\
+raspberrypi,2-model-b)
+	ucidef_set_interface_lan "eth0"
+	ucidef_set_interface_wan "usb0"
+	;;
+
 raspberrypi,3-model-b |\
 raspberrypi,3-model-b-plus)
 	ucidef_set_interface_lan "eth0"
+	ucidef_set_interface_lan "wlan0"
+	ucidef_set_interface_wan "usb0"
+	;;
+
+raspberrypi,model-zero)
+	ucidef_set_interface_wan "usb0"
 	;;
 
 raspberrypi,model-zero-w)
 	ucidef_set_interface_lan "wlan0"
+	ucidef_set_interface_wan "usb0"
 	;;
 esac