介绍
我有一个自定义硬件,可以创建 Wifi 网络并允许用户连接到它(移动设备)。没有蜂窝SIM卡,只有wifi。
连接后,通过套接字,我可以在硬件和电话之间交换数据。
问题
使用Apple iPhone(任何版本),当连接到此 Wifi 时,手机显示“无连接”但仍连接,并且手机能够通过蜂窝网络自动重定向 4G 流量并通过硬件进行套接字/wifi 通信,而无需问题。
使用Android(特别是三星),当连接到这个 Wifi 时,手机会自动断开与 4G 网络的任何其他连接。没有一个应用程序能够使用互联网。
问题
也有一些是在hostapd.conf
或在routing-tables
我需要配置,以避免因我硬件自动丢弃连接,而不是使用手机的配置?
有没有人有类似的问题并且能够帮助我?
这里是摘录hostapd.conf
:
interface=wlan0
driver=nl80211
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=CustomWifi
hw_mode=g
channel=11
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wmm_enabled=1
ieee80211n=1
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1
wpa=2
wpa_passphrase=Password12345
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
这是文件的内容hosts
:
127.0.0.1 localhost.localdomain localhost
非常感谢