Softap + 2G Station - Ublox JODY-W1 Series System Integration Manual

Host-based modules with wi-fi and dual-mode bluetooth
Table of Contents

Advertisement

Assign an IP address to the AP network interface and run a DHCP server:
$ cat udhcpd-bcm1.conf
start 192.168.10.8
end 192.168.10.255
interface bcm1
pidfile /var/run/udhcpd-bcm1.pid
lease_file /var/lib/misc/udhcpd-bcm1.leases
option subnet 255.255.255.0
option lease 864000 # default: 10 days
$ ifconfig bcm1 192.168.10.1
$ udhcpd -S udhcpd-bcm1.conf
Listing 10: 2.4 GHz AP IP configuration
3.8.2
2G SoftAP + 2G Station
This example shows how to start concurrent AP and STA in the 2.4 GHz band.
When creating an AP+STA configuration in the same band, both will be on the same channel. The
AP follows the channel of the STA.
First, create the 2.4 GHz AP:
wpa_cli> IFNAME=wlan0 DRIVER interface_create bcm0
wpa_cli> interface_add bcm0 /opt/jody-w1/wpa_supplicant_ap.conf nl80211
wpa_cli> IFNAME=bcm0 remove_net all
wpa_cli> IFNAME=bcm0 add_net
wpa_cli> IFNAME=bcm0 set_net 0 ssid "JODY-2G"
wpa_cli> IFNAME=bcm0 set_network 0 key_mgmt NONE
wpa_cli> IFNAME=bcm0 set_net 0 frequency 2437
wpa_cli> IFNAME=bcm0 set_net 0 mode 2
wpa_cli> IFNAME=bcm0 select_net 0
Listing 11: 2.4 GHz SoftAP on channel 6 without security
Assign an IP address to the AP network interface and run a DHCP server:
$ cat udhcpd-bcm0.conf
start 192.168.9.8
end 192.168.9.255
interface bcm0
pidfile /var/run/udhcpd-bcm0.pid
lease_file /var/lib/misc/udhcpd-bcm0.leases
option subnet 255.255.255.0
option lease 864000 # default: 10 days
$ ifconfig bcm0 192.168.9.1
$ udhcpd -S udhcpd-bcm0.conf
Listing 12: 2.4 GHz AP IP configuration
Next, configure the station network interface to connect it to an AP:
wpa_cli> IFNAME=wlan0 disconnect
wpa_cli> IFNAME=wlan0 list_network
wpa_cli> IFNAME=wlan0 remove_network 0
wpa_cli> IFNAME=wlan0 add_network
wpa_cli> IFNAME=wlan0 set_network 0 ssid "testAP2"
wpa_cli> IFNAME=wlan0 set_network 0 key_mgmt NONE
wpa_cli> IFNAME=wlan0 save_config
wpa_cli> IFNAME=wlan0 enable_network 0
Listing 13: 2.4 GHz station without security
UBX-16012621 - R18
C1-Public
JODY-W1 series - System integration manual
Software
Page 45 of 72

Advertisement

Table of Contents
loading

This manual is also suitable for:

Jody-w163-aJody-w164-aJody-w167-aJody-w174-a

Table of Contents