Can we have Erfan Abdi on the show, he has done a lot of work on halium 9, generated publicity on xda. So would be interesting to know what his future plans are and what is holding us back to have a halium 9 GSI phone as a phone with the same quality as halium 7. Maybe the project board of halium 9 can be filled with the major challenges https://github.com/orgs/ubports/projects/20
Best posts made by wouter182
-
RE: Ubuntu Touch Q&A 79 Saturday 4th Of July At 19:00UTC
-
Sensors for the pinephone
Draft: Sensors for the pinephone with the sensors stk3310, mpu6050 and lis3mdl.
Please note that not all the pinephone starting from 2021 have the lis3mdl sensor.
This topic tries to give all the information you need if you want to work on the pinephone sensors.
Please note that in the worst case, your pinephone could crash and you need to reinstall the os on your phone and the data will be lost. Therefore use a separate sd card for development.Using the sensors in combination with bash to get information:
cat /sys/bus/iio/devices/iio\:device3/name
This gives the result: lis3mdl
To set the sensor properties in bash you have to be root, hence:
sudo -i
echo 2 > /sys/bus/iio/devices/iio\:device3/sampling_frequency
This will set the sampling frequency to 2 Hz.Sensorfw is started and stopped with upstart.
Restarting the service could be done with:
sudo service sensorfw restart
The log of sensorfw is given in /var/log/upstart/sensorfw.log
To remove the log before you restart it:
sudo rm /var/log/upstart/sensorfw.log*
Reading the log can be done with you favorite command line reader:
sudo cat /var/log/upstart/sensorfw.log
Location of the sensorfw upstart file:
/etc/init/sensorfw.conf
To make the output more verbose, switch from--log-level=warning
to--log-level=test
.
See below.description "Sensorfw Services" start on started dbus respawn exec /usr/sbin/sensorfwd --device-info --log-level=test --no-magnetometer-bg-calibration
Location configuration file:
/etc/deviceinfo/sensorfw/pinephone.conf
If the configuration file is updating correctly after a change in the file is not completely known. Investigation point.[plugins] accelerometeradaptor = iiosensorsadaptor orientationadaptor = iiosensorsadaptor alsadaptor = iiosensorsadaptor magnetometeradaptor = iiosensorsadaptor gyroscopeadaptor = iiosensorsadaptor proximityadaptor = iiosensorsadaptor [accelerometer] input_match=mpu6050 default_interval=500 transformation_matrix = "0,1,0,-1,0,0,0,0,-1" [als] input_match=stk3310 intervals = "200=>2000" default_interval=500 [gyroscope] input_match=mpu6050 default_interval=500 transformation_matrix = "0,1,0,-1,0,0,0,0,-1" [magnetometer] input_match=lis3mdl intervals = "12.5,25,50,100,200,333.3,500,1000" default_interval=500 #scale_coefficient = 1 needs_calibration = 1 #dataranges = "-4096=>4096" #interval_compensation = 16 ???? calibration_rate = 12.5 calibration_timeout = 60000 [proximity] input_match=stk3310 intervals = "200=>2000" default_interval=500 threshold=19
Using crossbuilder:
clone the git repository of you project which you would like to build
git clone https://github.com/wouter182/sensorfw.git
Go into the project directory
cd sensorfw
Edited:
Build the package
crossbuilder --architecture=arm64 build
Create the deb package and deploy it on the pinephone
crossbuilder --architecture=arm64 --ssh=<Your IP> deploy
Please make sure that you prevent the automatic lock of the home screen. This prevents the phone going into sleep. If the phone is in sleep mode, the wifi connection is not stable anymore (this to reduce energy consumption).Restart sensorfw or reboot the phone and check your work (not completely sure if this works correct with loading of the sensorfw config file)
For building the SensorStatus app:
Clone the sensorstatus repo from wouter182.
git clone https://gitlab.com/wouter182/SensorsStatus.git
Go inside the sensorstatus folder
cd SensorsStatus
and runclickable --ssh <Your IP>
, this will generate the app in click format and will start it automatically.
Withclickable log --ssh <Your IP>
you can check the log files from the app. In case of a crash or to check for errors.Setting up ssh on the pinephone:
https://docs.ubports.com/en/latest/userguide/advanceduse/ssh.htmlSetting up crossbuilder:
Download the crossbuilder script:
git clone https://github.com/wouter182/crossbuilder
For further instruction see https://docs.ubports.com/en/latest/systemdev/testing-locally.htmlRead only rootfs:
Usesudo mount / -o remount,rw
to make the rootfs temporary read and writable.
Note that after an system upgrade, the changed files will be overwritten.Testing a merge request:
Testing a merge request can be done with ubports-qa, see https://docs.ubports.com/en/latest/systemdev/uploading-changes.htmlSetting up clickable:
See https://clickable-ut.dev/en/latest/install.htmlLinks with the information you probably need.
Crossbuilder in combination with ssh and automatic delploy:
https://github.com/ubports/crossbuilder/pull/53
Sensorfw for the pinephone:
https://github.com/ubports/sensorfw/tree/xenial_-edge
https://github.com/ubports/sensorfw/pull/4
Please take note that the pinpehone uses the xenial-_edge repository at the moment.
See https://gitlab.com/ubports/core/rootfs-builder-debos/-/blob/master/scripts/add-mainline-repos.sh#L23Configuration file for sensorfw from deviceinfo:
https://gitlab.com/ubports/core/deviceinfo/-/blob/main/configs/sensorfw/pinephone.confSensorfw plugin in Qt:
https://code.qt.io/cgit/qt/qtsensors.git/tree/src/plugins/sensors/sensorfw?h=5.12SensorStatus app:
https://gitlab.com/wouter182/SensorsStatus
SensorStatus app in the open store:
https://gitlab.com/balcy/SensorsStatusBackground information:
Information about the iio (industrial input and output) sensors in combination with linux:
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio
Magnetometer driver in linux for reference:
https://gitlab.com/pine64-org/linux/-/tree/pine64-kernel-ubports-5.10.y-megi/drivers/iio/magnetometer
Upstream sensorfw if you liked the gitlab search function like me:
https://git.sailfishos.org/mer-core/sensorfw
https://github.com/sailfishos/sensorfw
QML information for sensors:
https://doc.qt.io/qt-5.12/qtsensors-index.htmlTo be continued...
-
RE: Sensors for the pinephone
Hi @applee
The deb packages are the recommended way for the middleware. Sensorfw is the software which connects the linux drivers of the sensors to Qt and does the calibration.
In this way all apps which use Qt could make use of the sensors.
For the SensorsStatus app clickable is the way to go.
Latest posts made by wouter182
-
RE: Q&A 113 This Saturday At 19:00 UTC
Question for mariogrip
For assisted GPS (aGPS) Ubuntu touch has currently a feature which is not in use.
The Mozilla location service (mls).
What is the status of this, does it work for the pinephone?Not that it is more important than 20.04 but just curious.
The pinephone branch of location-service has the mls code from https://code.launchpad.net/~thomas-voss/location-service/add-ichnaea-provider-next in it.
It can only be tested with the api key. Florian has one if I remember it correctly.Probably it can be tested on the pinephone with:
exec /usr/bin/ubuntu-location-serviced --bus system --provider gpsd::Provider --provider mls::Provider --mls::Provider::api=<example: 329694ac-a337-4856-af30-66162bc8187a>
for an android device it is probably this:
exec /usr/bin/ubuntu-location-serviced --bus system --provider gps::Provider --provider remote::Provider --provider mls::Provider --mls::Provider::api=<example: 329694ac-a337-4856-af30-66162bc8187a>Indicator location: https://wiki.ubuntu.com/Location
-
RE: Sensors for the pinephone
Hi @applee
The deb packages are the recommended way for the middleware. Sensorfw is the software which connects the linux drivers of the sensors to Qt and does the calibration.
In this way all apps which use Qt could make use of the sensors.
For the SensorsStatus app clickable is the way to go. -
Sensors for the pinephone
Draft: Sensors for the pinephone with the sensors stk3310, mpu6050 and lis3mdl.
Please note that not all the pinephone starting from 2021 have the lis3mdl sensor.
This topic tries to give all the information you need if you want to work on the pinephone sensors.
Please note that in the worst case, your pinephone could crash and you need to reinstall the os on your phone and the data will be lost. Therefore use a separate sd card for development.Using the sensors in combination with bash to get information:
cat /sys/bus/iio/devices/iio\:device3/name
This gives the result: lis3mdl
To set the sensor properties in bash you have to be root, hence:
sudo -i
echo 2 > /sys/bus/iio/devices/iio\:device3/sampling_frequency
This will set the sampling frequency to 2 Hz.Sensorfw is started and stopped with upstart.
Restarting the service could be done with:
sudo service sensorfw restart
The log of sensorfw is given in /var/log/upstart/sensorfw.log
To remove the log before you restart it:
sudo rm /var/log/upstart/sensorfw.log*
Reading the log can be done with you favorite command line reader:
sudo cat /var/log/upstart/sensorfw.log
Location of the sensorfw upstart file:
/etc/init/sensorfw.conf
To make the output more verbose, switch from--log-level=warning
to--log-level=test
.
See below.description "Sensorfw Services" start on started dbus respawn exec /usr/sbin/sensorfwd --device-info --log-level=test --no-magnetometer-bg-calibration
Location configuration file:
/etc/deviceinfo/sensorfw/pinephone.conf
If the configuration file is updating correctly after a change in the file is not completely known. Investigation point.[plugins] accelerometeradaptor = iiosensorsadaptor orientationadaptor = iiosensorsadaptor alsadaptor = iiosensorsadaptor magnetometeradaptor = iiosensorsadaptor gyroscopeadaptor = iiosensorsadaptor proximityadaptor = iiosensorsadaptor [accelerometer] input_match=mpu6050 default_interval=500 transformation_matrix = "0,1,0,-1,0,0,0,0,-1" [als] input_match=stk3310 intervals = "200=>2000" default_interval=500 [gyroscope] input_match=mpu6050 default_interval=500 transformation_matrix = "0,1,0,-1,0,0,0,0,-1" [magnetometer] input_match=lis3mdl intervals = "12.5,25,50,100,200,333.3,500,1000" default_interval=500 #scale_coefficient = 1 needs_calibration = 1 #dataranges = "-4096=>4096" #interval_compensation = 16 ???? calibration_rate = 12.5 calibration_timeout = 60000 [proximity] input_match=stk3310 intervals = "200=>2000" default_interval=500 threshold=19
Using crossbuilder:
clone the git repository of you project which you would like to build
git clone https://github.com/wouter182/sensorfw.git
Go into the project directory
cd sensorfw
Edited:
Build the package
crossbuilder --architecture=arm64 build
Create the deb package and deploy it on the pinephone
crossbuilder --architecture=arm64 --ssh=<Your IP> deploy
Please make sure that you prevent the automatic lock of the home screen. This prevents the phone going into sleep. If the phone is in sleep mode, the wifi connection is not stable anymore (this to reduce energy consumption).Restart sensorfw or reboot the phone and check your work (not completely sure if this works correct with loading of the sensorfw config file)
For building the SensorStatus app:
Clone the sensorstatus repo from wouter182.
git clone https://gitlab.com/wouter182/SensorsStatus.git
Go inside the sensorstatus folder
cd SensorsStatus
and runclickable --ssh <Your IP>
, this will generate the app in click format and will start it automatically.
Withclickable log --ssh <Your IP>
you can check the log files from the app. In case of a crash or to check for errors.Setting up ssh on the pinephone:
https://docs.ubports.com/en/latest/userguide/advanceduse/ssh.htmlSetting up crossbuilder:
Download the crossbuilder script:
git clone https://github.com/wouter182/crossbuilder
For further instruction see https://docs.ubports.com/en/latest/systemdev/testing-locally.htmlRead only rootfs:
Usesudo mount / -o remount,rw
to make the rootfs temporary read and writable.
Note that after an system upgrade, the changed files will be overwritten.Testing a merge request:
Testing a merge request can be done with ubports-qa, see https://docs.ubports.com/en/latest/systemdev/uploading-changes.htmlSetting up clickable:
See https://clickable-ut.dev/en/latest/install.htmlLinks with the information you probably need.
Crossbuilder in combination with ssh and automatic delploy:
https://github.com/ubports/crossbuilder/pull/53
Sensorfw for the pinephone:
https://github.com/ubports/sensorfw/tree/xenial_-edge
https://github.com/ubports/sensorfw/pull/4
Please take note that the pinpehone uses the xenial-_edge repository at the moment.
See https://gitlab.com/ubports/core/rootfs-builder-debos/-/blob/master/scripts/add-mainline-repos.sh#L23Configuration file for sensorfw from deviceinfo:
https://gitlab.com/ubports/core/deviceinfo/-/blob/main/configs/sensorfw/pinephone.confSensorfw plugin in Qt:
https://code.qt.io/cgit/qt/qtsensors.git/tree/src/plugins/sensors/sensorfw?h=5.12SensorStatus app:
https://gitlab.com/wouter182/SensorsStatus
SensorStatus app in the open store:
https://gitlab.com/balcy/SensorsStatusBackground information:
Information about the iio (industrial input and output) sensors in combination with linux:
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio
Magnetometer driver in linux for reference:
https://gitlab.com/pine64-org/linux/-/tree/pine64-kernel-ubports-5.10.y-megi/drivers/iio/magnetometer
Upstream sensorfw if you liked the gitlab search function like me:
https://git.sailfishos.org/mer-core/sensorfw
https://github.com/sailfishos/sensorfw
QML information for sensors:
https://doc.qt.io/qt-5.12/qtsensors-index.htmlTo be continued...
-
RE: Ubuntu Touch Q&A 79 Saturday 4th Of July At 19:00UTC
Can we have Erfan Abdi on the show, he has done a lot of work on halium 9, generated publicity on xda. So would be interesting to know what his future plans are and what is holding us back to have a halium 9 GSI phone as a phone with the same quality as halium 7. Maybe the project board of halium 9 can be filled with the major challenges https://github.com/orgs/ubports/projects/20