mPCIe WiFi RedPine RS9113 card
The RS9113 USB Half Mini Card is based on Redpine Signals’ RS9113 ultra-low-power Convergence SoC. It offers dual-band 1x1 802.11n, dual-mode Bluetooth 4.0, and ZigBee 802.15.4 in a single device over USB in a Mini PCIe card form factor.
The RB350 has one Mini PCI Express card connector where you can mount the RedPine RS9113 card. The RS9113 card is a Half Mini Card, but the connector is for a Full Mini Card, so you need an adapter. There is also a possibility to mount a connector for a Half Mini Card during production.
Driver installation
Drivers installation requires a kernel build. For our customers we provide rs9113.sh script for that.
$ chmod +x rs9113.sh ./rs9113.sh
After successful installation of the driver interfaces wlan0 and zigbe0 should be created. This can be seen using 'ifconfig' command.
By default RS9113 card is configured in Wi-Fi station and ZiGB station mode (mode dev_oper_mode=17). You can change mode by editing the file:
$ nano /etc/modprobe.d/rsi_91x.conf
and change dev_oper_mode to required. For example:
- Wi-Fi station mode dev_oper_mode=1,
- Wi-Fi and Bluetooth EDR mode dev_oper_mode=5,
- ZigBee station mode dev_oper_mode=16.
For more details, see Chapter 3.3 of the Technical Reference Manual.
WiFi
Scanning for WiFi Networks
To scan for WiFi networks, use the following command:
$ sudo iwlist wlan0 scan
Configuring Wifi
The quickest way to enable wireless networking is by using the command-line raspi-config tool:
$ sudo raspi-config
Select the Network Options item from the menu, then choose Wi-Fi. Enter the SSID of the network and the passphrase. For more information, see Raspberry Pi setting WiFi.
To check the WiFi connection:
$ ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.163 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::86c3:3a53:8d7d:7e prefixlen 64 scopeid 0x20
ether 88:da:1a:24:d9:70 txqueuelen 1000 (Ethernet)
RX packets 10047 bytes 637825 (622.8 KiB)
RX errors 0 dropped 96 overruns 0 frame 0
TX packets 8089 bytes 515108 (503.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Antenna selection
By default, the internal antenna is configured.
To select the external antenna:
$ ifconfig wlan0 down iw phy phy0 set antenna 1 0
$ ifconfig wlan0 up
To select the internal antenna:
$ ifconfig wlan0 down iw phy phy0 set antenna 0 0
$ ifconfig wlan0 up
Zigbee
The RSI driver supports three ZigBee modes: End Device mode, Coordinator mode, and Router mode. After successful driver installation, the interface zigb0 should be created. This can be verified using the ifconfig command:
$ ifconfig zigb0 zigb0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 00:23:a7:27:03:99 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
For more information see chapter "ZiGB mode" in Technical Reference Manual pdf file.
Bluetooth
The RS9113 supports dual-mode Bluetooth 4.0. Below is an example of a set of commands to successfully pair a Bluetooth device.
$ sudo bluetoothctl
[NEW] Controller 88:DA:1A:A0:B3:F6 pigeon [default]
[bluetooth]# list
Controller 88:DA:1A:A0:B3:F6 pigeon [default]
[bluetooth]# show
Controller 88:DA:1A:A0:B3:F6
Name: pigeon
Alias: pigeon
Class: 0x000000
Powered: yes
Discoverable: no
Pairable: yes
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d052B
Discovering: no
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 88:DA:1A:A0:B3:F6 Discoverable: yes
[bluetooth]# scan on
Discovery started
[NEW] Device F0:13:C3:8B:0B:C7 Fenda R25BT
[bluetooth]# scan off
Discovery stopped
[CHG] Controller 88:DA:1A:A0:B3:F6 Discovering: no
[bluetooth]# devices
Device F0:13:C3:8B:0B:C7 Fenda R25BT
[bluetooth]# trust F0:13:C3:8B:0B:C7
[CHG] Device F0:13:C3:8B:0B:C7 Trusted: yes
Changing F0:13:C3:8B:0B:C7 trust succeeded
[bluetooth]# pair F0:13:C3:8B:0B:C7
Attempting to pair with F0:13:C3:8B:0B:C7
[CHG] Device F0:13:C3:8B:0B:C7 Connected: yes
[CHG] Device F0:13:C3:8B:0B:C7 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device F0:13:C3:8B:0B:C7 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device F0:13:C3:8B:0B:C7 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device F0:13:C3:8B:0B:C7 ServicesResolved: yes
[CHG] Device F0:13:C3:8B:0B:C7 Paired: yes
Pairing successful