Thank you for your answers which helped me to find leads. After failure, soft brick, re-flash and multiple reset, and of course tries based on your comments. I also use ChatGPT3.5
a lot to identify errors at the code level such as the consistency between what I want, the network configuration and Firewall.
I think I succeeded!

By putting wwan0
as protocol instead of qmi_cellular
I share below the steps that I tried to put in order after several tries to help others.
To conclude, I also put on a next comment [HERE] the complete configurations for Network, Firewall and Wireless.
Bonus: The internet LED
does not work by default, it must be configured directly in LuCi
to have an indicator. I put several LED settings for the Internetinternet indicator, but it crashed my router. I only keep one, just green to indicate when there is RX
or/and TX
.
Step 1: Hotspot_Phone Configuration (/etc/config/wireless)
We need internet on router to install needed packages.
Configure Hotspot_Phone to connect to the wireless network:
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/ahb/18100000.wmac'
option channel '1'
option band '2g'
option htmode 'HT20'
option cell_density '0'
config wifi-iface 'wifinet1'
option device 'radio0'
option mode 'sta'
option network 'Hotspot_Phone'
option ssid 'YourWiFiNetwork' # Example network name you want to connect to
option encryption 'psk2' # Security method, like WPA-PSK
option key 'YourWiFiPassword' # Example WiFi network security key
Step 2: Network Configuration (/etc/config/network)
In the /etc/config/network file, make sure the loopback and lan interfaces are already configured by default after installing OpenWrt firmware. You can leave them as they are, as they are necessary for the router's operation.
Add configurations for the Hotspot_Phone and modem interfaces:
config interface 'Hotspot_Phone'
option proto 'dhcp'
config interface 'modem'
option proto 'dhcp'
option device 'wwan0'
Step 3: Firewall Configuration (/etc/config/firewall)
Configure zones for "modem_zone" and "wan":
config defaults
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'modem_zone'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'modem'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'Hotspot_Phone'
Configure forwarding rules:
config forwarding
option src 'lan'
option dest 'wan'
config forwarding
option src 'lan'
option dest 'modem_zone'
Add a rule to allow Internet access from the "modem" interface:
config rule
option name 'Allow-Output-Modem'
option src 'modem_zone'
option target 'ACCEPT'
Step 4: WiFi Configuration (/etc/config/wireless)
(Optional) If you don't need the Hotspot_Phone interface, you can leave the interface commented out to disable it. You can disable the interface by commenting out the following lines after installing the packages:
#config wifi-iface 'wifinet1'
# option device 'radio0'
# option mode 'sta'
# option network 'Hotspot_Phone'
# option ssid 'YourWiFiNetwork'
# option encryption 'psk2'
# option key 'YourWiFiPassword'
Configure the WiFi interface to broadcast the local network:
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/ahb/18100000.wmac'
option channel '1'
option band '2g'
option htmode 'HT20'
option cell_density '0'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
After following these configuration steps, you should have a working Internet connection through the integrated modem and Hotspot_Phone, as well as WiFi broadcasting using the local network (LAN) with the SSID "OpenWrt". You can also disable the Hotspot_Phone or the WiFi network if you don't need them.
Remember to save your configurations after making changes and restart the router for the changes to take effect. Happy configuring!