# Insert the ko file into the kernel as the network driver module.
# aerial_sdio.ko.FC11:for SDIO		aerial_usb.ko.FC11:for USB
#
#insmod aerial_sdio.ko.FC11
#insmod aerial_usb.ko.FC11



# Load the firmware running the Rohm WiFi device
# If you update the firmware. Please update the bin file.
# fwimage[xxxx]_STA_[yyyy].bin			[xxxx]:Number of version
#						[yyyy]:SDIO or USB
# /sys/module/aerial_[zzzz]/rohm0/firmware	[zzzz]:sdio or usb
#
#cat fwimage375r_STA_SDIO.bin > /sys/module/aerial_sdio/rohm0/firmware
cat fwimage375r_STA_USB.bin > /sys/module/aerial_usb/rohm0/firmware

sleep 1
iwpriv rohm0 fwload
##### Wait for device ready only USB
##### Default : sleep 1sec
##### Case to set TKIP or AES with WPS : sleep 30sec
sleep 1
iwpriv rohm0 fwsetup
sleep 1



# set WLAN
#
# set BSS type	Managed:Infrastructure	mode	ad-hoc:ad hoc mode
#
# set Infrastructure mode
iwconfig rohm0 mode Managed
#
# set ad hoc mode
# It is necessary to set channel at ad hoc mode.
#iwconfig rohm0 mode ad-hoc
#iwconfig rohm0 channel 7



# set SSID
#
iwconfig rohm0 essid rohm_wifi



# set encryption mode
#
# None security
iwpriv rohm0 set_cryptmode NONE
#
# WEP64, key="12345"
#iwconfig rohm0 enc 3132333435
#iwpriv rohm0 set_cryptmode WEP64
#
# WEP128, key="1234567890123"
#iwconfig rohm0 enc 31323334353637383930313233
#iwpriv rohm0 set_cryptmode WEP128
#
# WPA-TKIP, pass phrase=12345678
#iwpriv rohm0 set_psk 12345678
#iwpriv rohm0 set_cryptmode WPA-TKIP
#
# WPA-AES, pass phrase=12345678
#iwpriv rohm0 set_psk 12345678
#iwpriv rohm0 set_cryptmode WPA-AES
#
# WPA2-AES, pass phrase=12345678
#iwpriv rohm0 set_psk 12345678
#iwpriv rohm0 set_cryptmode WPA2-AES



# Configure the network interface card(NIC name is "rohm0")
# set IP address and run the NIC
#
ifconfig rohm0 192.168.0.235 up
