Next steps
You can configure the following components to suit your needs, but you aren't limited to these options:
Keyboard layout
By default, your system recognizes the US 101-key keyboard layout. To change this, use the following command:
root@qnxpi:~# vim /system/lib/graphics/drm-rpi5/graphics-rpi5-2xhdmi.confThen, add the following line under the begin globals heading and replace en_US_101 with the keyboard layout for your locale:
keymap = /system/share/keyboard/en_US_101Use the ISO 2-letter language identifier to identify your locale, where the first two letters represent your language code https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes, and the next two represent your country code https://en.wikipedia.org/wiki/ISO_3166-2.
The following list includes the supported keyboard layouts:
cs_CZ_102da_DK_102de_CH_102de_DE_102en_CA_101en_CA_101_dvoraken_GB_102en_US_101(default)en_US_101_dvorakes_ES_102fr_BE_102fr_CA_102fr_CH_102fr_FR_102hr_HR_102it_IT_102ja_JP_106nl_NL_102no_NO_102pl_PL_102pt_PT_102se_SE_102sk_SK_102
To apply the changes, reboot your Pi.
Some keys may not produce output when pressed. Only ASCII characters in the range 32-127 are supported.
Display resolution
Your system won't detect and set the display resolution automatically. By default, Screen uses the configuration file at /system/lib/graphics/rpi4-drm/graphics-rpi4.conf and requires a configuration file as the first argument to run the Screen binary. You can run pidin ar to check if the name of your Screen configuration file matches the default one. For more information on the Screen configuration file, refer to "Configuring Screen" in the Screen Graphics Subsystem Developer's Guide.
To update the display resolution of your image, edit the configuration file using the vim command (note: must be done as the root user, su -). Under the begin winmgr section, find begin display 1, then the video-mode option. By default, the resolution is 1080p (1920x1080):
...
begin display 1
video-mode = 1920 x 1080 @ 60
stack-size = 65536 # in units of bytes
force-composition = true
cursor = on
end display
...The video-mode option determines the image's resolution, which you can change. After saving your changes, reboot your system to apply them.
Run drm-probe-displays to view a list of resolutions that your display supports.
If you create a new user on the QNX target and you want to use any graphical output, you must add that user to the user group screen by editing /etc/group.
Camera
When connecting a USB camera to your Raspberry Pi, use one of the blue USB 3.0 ports to avoid receiving an error message.
Supported hardware cameras
It is a key priority of the project to support additional cameras over time, including generic USB cameras. At this time, the following cameras are supported:
| Name | Details |
|---|---|
| Raspberry Pi Camera Module 3 | https://www.raspberrypi.com/products/camera-module-3/ |
| ZED 2 Stereo Camera | https://www.stereolabs.com/en-ca/products/zed-2 |
| Leopard Imaging LI-USB30-OV10635 | https://www.mouser.com/ProductDetail/Leopard-Imaging/LI-USB30-OV10635?qs=AQlKX63v8RtocoURajGbKQ%3D%3D |
If you're connecting the Raspberry Pi camera to the Raspberry Pi 5, use the connector labelled CAM/DISP0, not CAM/DISP1.
Configuring your camera
To select a new default system camera, enter the following command:
root@qnxpi:~# vim /system/etc/startup/post_startup.shFind the section that begins with the line echo '---> Starting Sensor...'. Note that the simulator camera is configured to launch by default. To reconfigure your Raspberry Pi to use your desired camera, comment out the command for the simulator camera, and uncomment the command that corresponds with your camera. Save your changes and restart your Raspberry Pi. Then, enter camera_example3_viewfinder to view the camera frames on screen.
Alternatively, you can enter a sequence of commands to restart the sensor service. For example, to configure your Raspberry Pi to use a USB camera, enter:
root@qnxpi:~# slay sensor
root@qnxpi:~# sensor -U 521:521,1001 -r /system/share/sensor -c /system/etc/system/config/usb_camera.conf
root@qnxpi:~# camera_example3_viewfinderYou can also create a configuration file under /system/etc/system/config that can identify multiple cameras at once. For example, to configure the simulator and USB cameras, add the following to your configuration file:
begin SENSOR_UNIT_1
type = simulator_camera
name = front
position = 0, 0, 0
direction = 0, 0, 0
default_video_resolution = 1280, 720
default_video_format = nv12
num_user_buffers = 4
end SENSOR_UNIT_1
begin SENSOR_UNIT_2
type = usb_camera
name = front-camera
position = 0, 0, 0
direction = 0, 0, 0
default_video_framerate = 90
address = /dev/usb/io-usb-otg, -1, -1, -1, -1
num_user_buffers = 12
user_queue_depth = 4
end SENSOR_UNIT_2Then, enter camera_example6_egl_viewfinder -u 1 to display the simulator camera or camera_example6_egl_viewfinder -u 2 to display the USB camera.
For more information, refer to the "Sensor configuration file" topic in the QNX SDP 7.1 documentation. Note that because this is 7.1 documentation, certain terms may be out of date in relation to SDP 8.0.
Touchscreen
If you connect a touchscreen using a micro HDMI to HDMI and USB cable to your Raspberry Pi, the touch function should work by default.
If the driver fails to detect the touchscreen, you can manually set up the mtouch.conf configuration file:
- Ensure that
io-hid -d usbis running. To do so, runpidin arto view the active processes. - Run
hidviewto get the list of USB devices. Find your touchscreen and record its Vendor and Product ID. - Set up the
mtouchconfiguration file. For more information, refer to the "Touch configuration file" section in the QNX SDP 8.0 Screen Graphics Subsystem Developer's Guide.
Adding binaries
The quick start image comes with most of the SDP's common binaries, but some aren't included. To add more binaries, copy them from your host machine with SCP:
As qnxuser, enter:
- On Linux:
user@host:~$ scp <binary> qnxuser@<target-ip>:~/bin- On Windows:
user@host:~$ scp -o "MACs=hmac-sha2-256" <binary> qnxuser@qnxpi:~/binAs root, move the binary to /system/bin/. Then, any user should have access to that binary.
The Network File System (NFS) protocol can also enable file transfers. For more information, refer to the QNX SDP 8.0 documentation on the NFS filesystem.
Customizing the Welcome screen
If you are using a display, you saw the Welcome splash screen when your target booted up. You can customize the applications and icons shown on the screen, which may be helpful if you want a quick way to launch an application with the mouse or touchscreen. The applications shown on the Welcome screen are defined in /system/etc/desktop and are owned by the root user.
The demolauncher can read up to ten *.desktop configuration files. It orders the icons alphabetically based on the Name
tag provided in the desktop file and displays them starting from left to right, then top to bottom.
You can use vim as the root user to edit them and customize how they look and what they launch. Note that applications will always be forced fullscreen when fullscreen-winmgr is active.
The following example desktop file uses the terminal_black_large.png icon stored in /system/share/icons and launches the terminal utility with default parameters:
[Desktop Entry]
Name=Terminal
Exec=/system/bin/st /system/etc/st_boot.sh
Icon=/system/share/icons/terminal_black_large.png
Categories=UtilitiesLastly, you can launch a copy of the splash screen using your own desktop files by passing a custom directory as an argument to the demolauncher application:
root@qnxpi:~# demolauncher -a /data/home/qnxuser/my_desktop_filesThermal throttling
If your Raspberry Pi experiences thermal throttling, it may run into performance issues. In this case, you should add heat sinks or fans to your Raspberry Pi.
To check your Raspberry Pi's thermal temperature, run the following command:
qnxuser@qnxpi:~$ cat /dev/thermalUsing cURL
The quick start target image automatically includes the cacert.pem bundle, which is located at /etc/ssl/certs/cacert.pem.
To run cURL, enter:
qnxuser@qnxpi:~$ curl https://www.example.comIf your certificate bundle is nearing its expiration, or you wish to update to a newer cert bundle, you can run the following command (as root):
root@qnxpi:~# updatecacertThis command fetches the latest certificate bundle from https://curl.se/docs/caextract.html.
Configuring your network
This section describes how to configure you network settings, including:
Setting a static IP address
To set a static IP address for Ethernet interfaces only, edit /boot/network and add the following line to the file:
IP=<static IP>Then, restart your system for the change to take effect.
The value of the IP variable is passed to ifconfig unmodified, thus it's possible to add additional arguments. For example, if you also want to set the netmask, you could set the IP variable as:
IP="<static IP> netmask <IP mask>"You must add quotes when passing multiple arguments to the IP variable, like the example above.
Setting a default route
To set a default route, use the route utility. For example, if you want the default route to be <GW_IP>, then you'd enter the following command as root:
root@qnxpi:~# route add default <GW_IP>However, this only sets the route until the next system reset. To set the default route permanently, add the above command to the /system/etc/post_startup.sh script. You can use vi or sed to modify the IP address. The sed command looks like the following:
root@qnxpi:~# cd /system/etc && sed -i '/ip6addrctl/a route add default <GW_IP>' ./post_startup.shIf you use vi, place the route command after the ip6addctrl line.
If you want to switch back to using DHCP, you will need to remove the command from /system/etc/post_startup.sh.
Configuring DNS lookups
To configure DNS lookups, create a resolv.conf file in /data/var/etc. For details on this file, visit the /etc/resolv.conf page in the QNX SDP 8.0 documentation.
By default, the QSTI contains a symlink from /data/var/etc/resolv.conf to /data/var/dhcpd/resolv.conf that you'll need to remove first. If the file doesn't exist, it just means the DHCP daemon hasn't run yet. Either way, replace or create a symlink with a real resolv.conf:
root@qnxpi:~# rm /data/var/etc/resolv.conf
root@qnxpi:~# cat > /data/var/etc/resolv.conf << EOF
> domain myexample.com
> nameserver 8.8.8.8
> EOFIf you want to switch back to using DHCP to acquire an IP address, you must recreate the symlink:
root@qnxpi:~# rm /data/var/etc/resolv.conf
root@qnxpi:~# ln -s /data/var/dhcpcd/resolv.conf /data/var/etcAudio
Both the Raspberry Pi 4 and 5 support audio playback, recording, and conversion. To perform any the following actions, use the respective commands:
Convert WAV format to AAC:
aac-enc <input>.wav <output>.aacConvert AAC format to raw PCM:
audio-decode -o <output> <input>Record WAV files from a USB headset:
arecord <output file>Play WAV and AAC files to a USB headset:
mmrplay -a "alsa:USB" <absolute path to file>For RPi 5 only, you can also use one of the following commands:
mmrplay <absolute path to file>mmrplay -a "alsa:default" <absolute path to file>
The Raspberry Pi 4 also supports:
Play WAV and AAC files to 3.5mm headphones; use one of the following commands:
mmrplay <absolute path to file>mmrplay -a "alsa:default" <absolute path to file>
