Install Tizen 2.3.1 on Samsung RD-PQ
Check out the date on this baby!!
The Samsung RD-PQ developer device is also known as M0 or TRATS2 and is based on a Samsung Galaxy S3 device, though it is missing any radio capabilities since it’s a developer device.
WiFi connectivity on Tizen 2.3.1 (or 2.3 for what matters) does not work out of the box for a Samsung RD-PQ developer device due to the fact that the images found on the main Tizen website are not complete and they are missing some important components.
Let’s see how we can improve that.
Prerequisites
You will need access to an Ubuntu (preferably) machine or virtual-machine in order to use the lthor
utility for updating the images on your RD-PQ device. On the Tizen website it is specified that a Thor utility exists for Windows, but I was unable to find it. Just fire up an Ubuntu virtual machine into your favorite VM application (VirtualBox preferably, you can use Qemu, VMware, etc) or an Azure/AWS instance. The Linux machine will be needed just for the boot-loader migration and the actual OS install. You won’t be needing it again except if you want to reinstall the OS. You can install the lthor utility now.
Add the Tizen tools repository.
$ sudo vi /etc/apt/sources.list
Append the following line, save and quit.
deb http://download.tizen.org/tools/latest-release/Ubuntu_14.04 /
Install the utility.
$ sudo apt-get update
$ sudo apt-get install lthor
Migrate boot-loader
First, you need to migrate your boot-loader to 2.3, so download the tar.gz archive (249Kb) from the Tizen website. Put your phone into download mode by pressing PowerKey
and VolumeDown
(while it’s off) and load the archive into your phone:
$ sudo lthor migrate_2.3_bootloader.tar.gz
Install Tizen OS 2.3.1
Wait till your phone reboots and goes into download mode again. Download the system (4.8Mb) and platform (184Mb) images from the Tizen website and load them again into your phone:
$ sudo lthor tizen-2.3.1-mobile_20150921.1_mobile_boot.tar.gz tizen-2.3.1-mobile_20150921.1_mobile_target.tar.gz
From what I’ve noticed, sometimes you can’t upload both images in one go, so you might need to send them to the phone separately:
$ sudo lthor tizen-2.3.1-mobile_20150921.1_mobile_boot.tar.gz
$ sudo lthor tizen-2.3.1-mobile_20150921.1_mobile_target.tar.gz
Wait till the phone boots into Tizen 2.3.1 and now you should have a pretty functional phone (without all Tizen UI apps) but unfortunately, you can’t turn WiFi on. Pressing the grey button in Settings -> WiFi will just hang on Tizen 2.3, while on 2.3.1 you will be able to turn WiFi on, but the phone won’t be able to connect to any networks.
Enable WiFi interface
There are three culprits for this behaviour. First, there is no installed wlan driver for the BCM 43xx
network chip inside your phone. Download the packaged rpm (1.3Mb) and install it on the phone (it is made for Tizen 2.1, but will work on 2.3 and 2.3.1.
sdb root on
sdb push wlandrv-plugin-tizen2.1-bcm43xx-1.0.4-1.armv7l.rpm /home
sdb shell
$ rpm -ivh /home/wlandrv-plugin-tizen2.1-bcm43xx-1.0.4-1.armv7l.rpm --force --nodeps
$ sync
$ reboot
Secondly, the component that is supposed to activate the wlan0
interface is missing two links and last, wifi_supplicant
is based on a rpm package that is missing from the main Tizen OS image.
sdb root on
sdb shell
$ ln -s /usr/sbin/modprobe /sbin/modprobe
$ ln -s /usr/sbin/rmmod /sbin/rmmod
This will create the two missing links in the OS and if you want to turn on the WiFi connection, you can do that now. You can either press the grey WiFi button from the Settings -> WiFi UI or just issue a shell command to start it.
$ /usr/bin/wlan.sh start
The wlan.sh
script should pick up your chip driver / settings and activate wlan0
which you can check by entering:
$ ifconfig
Enable WiFi network connectivity
The third issue is that if you try to connect to a wireless network, you will get the message Wrong Password
for every connection, even if the password is correct. The problem lies with the wpa_supplicant program. Thing is, wpa_supplicant is enabled via the /usr/sbin/wpa_supp.sh
script, and the script depends on a rpm package that is not installed by default, usleep
. That package is not available for Tizen 2.3 or 2.3.1, so we have to get creative. Download the rpm (6.6Kb) from the Tizen 2.2 repository (don’t worry, it will work for Tizen 2.3 and 2.3.1) and install it on your phone.
sdb root on
sdb push usleep-1-4.1.armv7l.rpm /home
sdb shell
$ rpm -ivh /home/usleep-1-4.1.armv7l.rpm
$ sync
$ reboot
After the phone boots into the Tizen UI, you will be able to activate WiFi via Settings -> WiFi UI or via console.
$ /usr/bin/wlan.sh start
$ /usr/sbin/wpa_supp.sh start
Auto-enable WiFi and auto-connect to a wireless network
If you connect to a wireless network once via the Tizen UI, you will be able to make the phone connect automatically to that network after each restart via two systemd
scripts I’ve created.
First one is called wlan-1.service
.
[Unit]
Description=Wireless network connectivity 1
Wants=network.target
Before=network.target wlan-2.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/wlan.sh start
[Install]
WantedBy=multi-user.target
Second one is called wlan-2.service
.
[Unit]
Description=Wireless network connectivity 2
Wants=network.target
Before=network.target
Requires=wlan-1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/wpa_supp.sh start
[Install]
WantedBy=multi-user.target
Also, sometimes the connman
program that manages the wireless connection doesn’t restart automatically, so I’ve changed the connman.service
systemd unit file for it too.
[Unit]
Description=Connection service
After=shutdown.target
Requires=wlan-2.service
[Service]
Type=dbus
BusName=net.connman
RemainAfterExit=yes
ExecStartPre=/usr/bin/dbus-send --system --dest=net.netconfig / net.netconfig.auto.activate
ExecStart=/usr/sbin/connmand
[Install]
WantedBy=multi-user.target
The three scripts are chained via After
and Requires
commands that ensure they will be started in the correct order: wlan-1
, wlan-2
and finally connman
. Upload the 3 files into your phone and enable them into systemd:
sdb root on
sdb push *.service /etc/systemd/system/
sdb shell
$ systemctl enable wlan-1
$ systemctl enable wlan-2
$ systemctl enable connman
$ sync
$ reboot
After the phone reboots, the connection will be made automatically, no need to enable WiFi manually, so now you can uninstall the Tizen UI (the Xorg server actually) and any unneeded services, and you will be able to connect to the phone via SSH. And we’ll do that in the next article.