170
edits
Changes
no edit summary
{{InfoBoxTop}}
{{Applies To DivaAppliesToSBCD}}
{{InfoBoxBottom}}
SBC Diva can be populated with DWM WiFi/Bluetooth combo plugin to easily add wireless connectivity.
In order to enable the bluetooth, the correct device tree configuration must be passed to the kernel.
The sbcd comes with two possible devicetree configurations. The default one enables the UART1 and therefore the bluetooth and wifi module. The while the other configuration instead, enables the can CAN interface and disables the UART1.
[[File:DWM.png|center|alt=DWM module for SBCD]] '''Note:''' make sure In order to pass enable the DWM module, the correct devicetree configurationdevice tree file must be loaded.
== Wifi ==
To enable the wifi, the correct gpio gpio114 pin must be configured. Once this has been done, the wlan0 interface should become accessible.
The gpio pin can be enabled as follow:
* VI: CW 7-15, AIFSN 2, TXOP 3008 usec
* VO: CW 3-7, AIFSN 2, TXOP 1504 usec
root@diva:~# iw wlan0 connect ZyXEL
root@diva:~# [ 669.489889] wlan0: authenticate with fc:f5:28:cc:03:90
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 2.329/6.109/13.544 ms
</pre>
=== Performance test ===
The following example shows a throughput performance test, carried out with the well-known <code>iperf</code> tool:
<pre class="board-terminal">
root@diva:~# iperf -c 192.168.11.85 -t 100 -i 5
------------------------------------------------------------
Client connecting to 192.168.11.153, TCP port 5001
TCP window size: 43.8 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.11.154 port 51484 connected with 192.168.11.85port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 5.0 sec 55.4 MBytes 92.9 Mbits/sec
[ 3] 5.0-10.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 10.0-15.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 15.0-20.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 20.0-25.0 sec 56.0 MBytes 94.0 Mbits/sec
[ 3] 25.0-30.0 sec 56.2 MBytes 94.4 Mbits/sec
[ 3] 30.0-35.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 35.0-40.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 40.0-45.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 45.0-50.0 sec 56.0 MBytes 94.0 Mbits/sec
[ 3] 50.0-55.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 55.0-60.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 60.0-65.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 65.0-70.0 sec 56.0 MBytes 94.0 Mbits/sec
[ 3] 70.0-75.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 75.0-80.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 80.0-85.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 85.0-90.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 90.0-95.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 95.0-100.0 sec 56.1 MBytes 94.2 Mbits/sec
[ 3] 0.0-100.0 sec 1.10 GBytes 94.1 Mbits/sec
</pre>
== Bluetooth ==
The bluetooth can also be configured by enabling the correct gpios:
<pre>
echo 114 > /sys/class/gpio/export
echo 115 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio114/direction
echo out > /sys/class/gpio/gpio115/direction
echo 1 > /sys/class/gpio/gpio114/value
echo 1 > /sys/class/gpio/gpio115/value
</pre>
E.g
<pre class="board-terminal">
root@diva:~# echo 115 > /sys/class/gpio/export
root@diva:~# echo out > /sys/class/gpio/gpio115/direction
root@diva:~# echo 1 > /sys/class/gpio/gpio115/value
root@diva:~# rfkill list
0: phy0: wlan
Soft blocked: no
Hard blocked: no
</pre>
Attaching the device:
<pre class="board-terminal">
root@diva:~# hciattach /dev/ttyS1 texas 30000000 flow
Found a Texas Instruments' chip!
Firmware file : /lib/firmware/ti-connectivity/TIInit_7.6.15.bts
Loaded BTS script version 1
texas: changing baud rate to 3000000, flow control to 1
Device setup complete
</pre>
Once the device has been attached using hciattach the hci0 interface should become visible:
<pre class="board-terminal">
root@diva:~# rfkill list
0: phy0: wlan
Soft blocked: no
Hard blocked: no
1: hci0: bluetooth
Soft blocked: no
Hard blocked: no
</pre>
Bluetooth scan example:
<pre class="board-terminal">
root@diva:~# hciconfig hci0 up
root@diva:~# hcitool scan
Scanning ...
18:F0:E4:E1:DC:F8 Redmi
C8:94:BB:A0:7C:1F wifi mp
</pre>