M.2 Test

From ESS-WIKI
Jump to: navigation, search

ROM-7510 supports Broadcom43241b4 wifi/bt modules throught M.2.

Compile driver

$ cd $LINUXSRC/ext_drivers/dhd-linux-1.363.125.7/src/dhd/linux
$ make ARCH=arm CROSS_COMPILE=<tool chain> LINUXDIR=<linux src> dhd-cdc-sdmmcp2p-android-cfg80211

Then copy the compiled driver to the file system.

Driver installation

$ modprobe cfg80211
$ insmod cywdhd.ko

Wifi test

$ rfkill unblock all
$ ifconfig wlan0 up
$ killall wpa_supplicant
$ rm /etc/resolv.conf
$ echo "ctrl_interface=/var/run/wpa_supplicant" > /tmp/wpa.conf
$ wpa_passphrase "advantech for guest" 12345678 >> /tmp/wpa.conf
$ wpa_supplicant -B Dwext -iwlan0 -c /tmp/wpa.conf
$ wpa_cli -iwlan0 scan
$ udhcpc -i wlan0
$ rm /tmp/wpa.conf
$ ping -I wlan0 www.advantech.com.cn

Bluetooth test

$ brcm_patchram_plus -d --no2bytes --patchram /lib/firmware/brcm/bcm43241b4.hcd /dev/ttyS3
$ hciattach /dev/ttyS3 any 115200 flow

Turn on Bluetooth and make it visible:

$ hciconfig hci0 piscan

Look the mac address of your Bluetooth device:

$ hciconfig

hci0:     Type: BR/EDR Bus: UART

             BD Address: 43:24:B3:00:1F:AC ACL MTU: 1021:8 SCO MTU: 64:1

             UP RUNNING PSCAN ISCAN

             RX bytes:702 acl:0 sco:0 events:41 errors:0

             TX bytes:1036 acl:0 sco:0 commands:41 errors:0

Send bt-test throught Bluetooth:

$ ussp-push --debug --timeo 25 34:23:87:B7:B2:CA@ bt-test bt-test

Note: 34:23:87:B7:B2:CA is Mac address of the opposite device!

Receive file throught Bluetooth:

$ obexpushd -B

Note: The file will be received under current directory.