Device Setup

Network Setup

  1. Using a text editor, create a wpa_supplicant.conf file and enter the following information:
    1. ssid – Name of the Wi-Fi network
    2. psk – Wi-Fi password
    network={
      ssid="<your Wi-Fi network>"
      proto=WPA2
      key_mgmt=WPA-PSK
      pairwise=TKIP CCMP
      group=TKIP CCMP
      psk="<your Wi-Fi password>"
    }
  2. Push the file into the development kit.
    c:\adb shell mount -o remount,rw /
    c:\adb push wpa_supplicant.conf /data/misc/wifi/
    c:\adb shell sync

  3. Reboot the device to redo the WiFi provisioning.
    c:\>adb reboot && adb wait-for-device && adb shell
  4. After a few moments, check if wlan0 is up.
    c:\adb shell
    #ifconfig

    ...
    wlan0    Link encap:Ethernet HWaddr 00:0A:F5:A9:66:46
          inet addr:192.168.86.153 Bcast:192.168.86.255 Mask:255.255.255.0
          inet6 addr: fe80::20a:f5ff:fea9:6646/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:1643697 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76012 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3000
          RX bytes:2144208637 (1.9 GiB) TX bytes:22562296 (21.5 MiB)

If the device has not connected to the network and assigned an IP address, please use the following command to manually connect.

# wpa_supplicant -Dnl80211 -iwlan0 -c /data/misc/wifi/wpa_supplicant.conf -dddd &

The network should now be available. You should be able to ping the internet.

# ping www.qualcomm.com

PING e1479.x.akamaiedge.net (23.36.57.162): 56 data bytes
64 bytes from 23.36.57.162: icmp_seq=0 ttl=56 time=27.353 ms
64 bytes from 23.36.57.162: icmp_seq=1 ttl=56 time=68.265 ms
64 bytes from 23.36.57.162: icmp_seq=2 ttl=56 time=65.011 ms

Check HDMI

Connect your HDMI monitor to the HDMI port and the keyboard and mouse to the USB ports. Please follow the steps below after every reboot to enable HDMI display.

c:\>adb shell
sh-4.4# mkdir -p /usr/bin/weston_socket
sh-4.4# export XDG_RUNTIME_DIR=/usr/bin/weston_socket
sh-4.4# export LD_LIBRARY_PATH=/usr/lib:/usr/lib/aarch64-linux-gnu/
sh-4.4# weston --tty=1 --connector=29 --idle-time=0

At this point your weston display is up. You can press the top left corner and open a terminal window.

Run Camera capture via camx-hal3

You can use the camx-hal3-test or the gstreamer applications to try it out. You can run the application from the terminal or you can use adb. Please note id=0 points to the main camera and id=1 points to tracking camera.

c:\>adb shell
sh-4.4# camx-hal3-test
>>A:id=0,psize=1920x1080,pformat=yuv420,ssize=1920x1080,sformat=jpeg,zsl=1
>>P:1
>>s:1
>>Q

The commands and response from the device is as seen below.

c:\>adb shell
sh-4.4# camx-hal3-test
Enter Camera Testing

        ======================= Camera Test Version =======================
         CAMTEST_SHA1 : 103bafff478e95e3175e7d03ada1e593b8d98f92
         CAMTEST_BUILD_TS: 9/24/2020 7:3:19
         CAMTESTHOSTNAME : 337527fc220a
         CAMBUILD_IP :
        ===============================================================
Camera: 0 face:1
Camera: 1 face:2
Camera: 2 face:1
Camera: 3 face:1
CAM0>>A:id=0,psize=3840x2160,pformat=yuv420,ssize=3840x2160,sformat=jpeg,zsl=1
Test camera:A:id=0,psize=3840x2160,pformat=yuv420,ssize=3840x2160,sformat=jpeg,zsl=1
camera:0
preview size:3840x2160
preview format:yuv420
snapshot size:3840x2160
snapshot format:jpeg
in ZSL modeadd a camera :0
gbm_create_device(156): Info: backend name is: msm_drm
CameraId:0
CAM0>>P:1
Test camera:P:1
preview dump:1/0 for cameraid:0.
CAM0>>S:1
Test camera:S:1
snapshot request:1
CAM0>>Q
Test camera:Q
quit
Exiting application!

This will save the sample images in /data/misc/camera.

c:\>adb shell
sh-4.4# ls -lrt /data/misc/camera/
-rw-r----- 1 root root 315 Sep 24 07:01 mle_tflite.config
-rw-rw-rw- 1 root root 12441600 Sep 28 03:44 'preview_w[3840]_h[2160]_id[97]_20200928_034406.yuv'
-rw-rw-rw- 1 root root 12441600 Sep 28 03:44 'preview_w[3840]_h[2160]_id[121]_20200928_034408.yuv'
-rw-rw-rw- 1 root root 438564 Sep 28 03:44 'snapshot_w[24964158]_h[1]_id[127]_20200928_034408.jpg'

You can see the images on Weston desktop. Connect the HDMI monitor, launch the Weston desktop and run the following command in the terminal window:

sh-4.4# weston-image /data/misc/camera/snapshot*