https://wiki.postmarketos.org/api.php?action=feedcontributions&user=Blacklight&feedformat=atompostmarketOS - User contributions [en]2024-03-29T12:23:32ZUser contributionsMediaWiki 1.39.6https://wiki.postmarketos.org/index.php?title=User:Blacklight&diff=18660User:Blacklight2021-04-17T21:57:43Z<p>Blacklight: </p>
<hr />
<div>Github: https://github.com/BlackLight<br />
<br />
<br />
== Owns devices ==<br />
<br />
{{My devices}}<br />
{{Owns device|Nokia_N900_(nokia-n900)}}<br />
{{Owns device|Google_Nexus_5_(lg-hammerhead)}}<br />
{{Owns device|Google_Nexus_7_2013_(asus-flo)}}<br />
{{Owns device|OnePlus_6_(oneplus-enchilada)}}<br />
{{Owns device|Raspberry_Pi_Zero_(raspberry-pi0)}}<br />
{{Owns device|Raspberry_Pi_1_&_2_(raspberry-pi)}}<br />
{{Owns device|Raspberry_Pi_3_(raspberry-pi3)}}<br />
{{Owns device|Raspberry_Pi_4_(raspberry-pi4)}}</div>Blacklighthttps://wiki.postmarketos.org/index.php?title=User:Blacklight&diff=18658User:Blacklight2021-04-17T21:35:25Z<p>Blacklight: </p>
<hr />
<div>Github: https://github.com/BlackLight<br />
<br />
<br />
== Owns devices ==<br />
<br />
{{My devices}}<br />
{{Owns device|Nokia_N900_(nokia-n900)}}<br />
{{Owns device|Google_Nexus_5_(lg-hammerhead)|UBPorts}}<br />
{{Owns device|Google_Nexus_7_2013_(asus-flo)|UBPorts}}<br />
{{Owns device|OnePlus_6_(oneplus-enchilada)}}<br />
{{Owns device|Raspberry_Pi_Zero_(raspberry-pi0)}}<br />
{{Owns device|Raspberry_Pi_1_&_2_(raspberry-pi)}}<br />
{{Owns device|Raspberry_Pi_3_(raspberry-pi3)}}<br />
{{Owns device|Raspberry_Pi_4_(raspberry-pi4)}}</div>Blacklighthttps://wiki.postmarketos.org/index.php?title=User:Blacklight&diff=18657User:Blacklight2021-04-17T21:28:16Z<p>Blacklight: Created page with "Github: https://github.com/BlackLight {{My devices}} {{Owns device|Nokia_N900_(nokia-n900)}}"</p>
<hr />
<div>Github: https://github.com/BlackLight<br />
<br />
<br />
{{My devices}}<br />
{{Owns device|Nokia_N900_(nokia-n900)}}</div>Blacklighthttps://wiki.postmarketos.org/index.php?title=Nokia_N900_(nokia-n900)&diff=18656Nokia N900 (nokia-n900)2021-04-17T21:25:19Z<p>Blacklight: /* Keyboard layout */</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Nokia<br />
| name = N900<br />
| codename = nokia-n900<br />
| image = File:Nokia-rx51-cmus.jpg<br />
| imagecaption = Nokia N900 running cmus<br />
| releaseyear = 2009<br />
| category = community<br />
| originalsoftware = Maemo Fremantle on Linux 2.6<br />
| pmoskernel = Mainline Linux<br />
| chipset = TI OMAP 3430<br />
| cpu = 1x 600 MHz Cortex-A8<br />
| gpu = PowerVR SGX530<br />
| storage = 32 GB<br />
| display = 800x480 TFT resistive<br />
| memory = 256 MB<br />
| architecture = armv7<br />
| n-android = ✔<br />
| whet_dhry = 58.4<br />
| status_usbnet = Y<br />
| status_flashing = -<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = Y<br />
| status_mainline = Y<br />
| status_battery = Y<br />
| status_3d = -<br />
| status_accel = Y<br />
| status_audio = Y<br />
| status_bluetooth = N<br />
| status_camera = P<br />
| status_gps = P<br />
| status_mobiledata = Y<br />
| status_sms = Y<br />
| status_calls = P<br />
| status_otg = N<br />
| booting = yes<br />
}}<br />
[[File:I3wm-n900.jpg|thumb|right|Running i3wm]]<br />
[[File:20170724 0002.jpg|thumb|right|Splash screen]]<br />
<br />
=== Users owning this device ===<br />
{{Device owners}}<br />
<br />
=== Contributors ===<br />
* ''[[user:MartijnBraam|MartijnBraam]]''<br />
* ''[https://gitlab.com/craftyguy craftyguy]''<br />
* ''[https://github.com/pavelmachek Pavel Machek]''<br />
* ''[[user:Sicelo|sicelo]]''<br />
* ''[[user:drebrez|drebrez]]''<br />
* ''[https://github.com/fxkrait FXKrait]''<br />
* ''[[user:ollieparanoid|ollieparanoid]]''<br />
<br />
== Additional info ==<br />
Cameras are supported in the kernel, but have very complex media pipelines. [https://git.sr.ht/~martijnbraam/megapixels-compat Megapixels] has preliminary support for at least the rear/main camera.<br />
<br />
The GPU is a PowerVR SGX530 which does not have FOSS drivers, so there is no 3D acceleration. However, the required [https://gitlab.com/postmarketOS/pmaports/-/tree/master/non-free/sgx-ddk-um blobs] and [https://gitlab.com/postmarketOS/pmaports/-/tree/master/main/mesa-pvr-dri-classic patched mesa] have been merged into pmaports, so this should soon be usable.<br />
<br />
Voice calls work, but need https://gitlab.com/libcmtspeechdata/libcmtspeechdata to route the speech data. Due to very tight timings involved in the associated protocol, the audio is very low quality unless additional processing is performed (Nokia had closed-source Pulseaudio modules for this).<br />
<br />
There's bluetooth support at bluetooth-next, but that works on N950, not on N900. [https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=7bb318680e868cd049922f6761170b42ff89687d Bluetooth] . The driver compiles fine, but fails on loading the firmware.<br />
<br />
OTG might work since the kernel has support. However, like [[Wileyfox_Swift_(wileyfox-crackling)]], there is a hardware limitation that prevents the N900 from automatically detecting that there's a connected device, and also detecting the USB version/speed it supports. With some work, it most likely should work with manual activation<br />
<br />
== Installation ==<br />
We currently only support installing and running pmOS from the microSD card on the N900. Getting it to work with eMMC and 0xffff is harder to implement and has no real benefit since the built-in eMMC is quite slow and fragile.<br />
<br />
=== Flash postmarketOS to SD card ===<br />
==== From pre-built image (easy method) ====<br />
Official images of postmarketOS for the N900 are built at least every week. Download an image from the branch you want to use:<br />
<br />
* Branch ([[Releases|more]]):<br />
** '''[https://images.postmarketos.org/bpo/edge/nokia-n900/ edge]''': bleeding edge version (has latest features, but may break more often).<br />
** '''[https://images.postmarketos.org/bpo/v21.03/nokia-n900/ v21.03]''': first release on stable channel that will feature the N900 (not available yet)<br />
<br />
Then flash it to your SD as follows. Adjust the image name and the path to your SD card (you can figure it out with <code>lsblk</code>).<br />
<br />
<source lang="shell-session"><br />
$ xzcat 20210209-0034-postmarketOS-edge-i3wm-0.3-nokia-n900.img.xz | sudo dd of=/dev/mmcblk... status=progress bs=1M<br />
</source><br />
<br />
The first boot takes longer, as the root partition gets resized to fit the whole SD card. There is a lot of kernel output during boot, just wait patiently until i3wm shows up. Read [[#i3wm]] for the N900 specific keybindings, most importantly <code>Shift + Space</code>, then <code>t</code> to open a terminal. Use <code>sudo nmtui</code> to connect to a Wi-Fi network.<br />
<br />
==== With pmbootstrap (advanced) ====<br />
Instead of the pre-built images, you can use <code>pmbootstrap</code> to generate your own image. It allows to use full disk encryption, use another user interface (e.g. XFCE4) and other customizations.<br />
<br />
1. Initialize pmbootstrap<br />
: <source lang="shell-session">$ pmbootstrap.py init</source><br />
: Choose 'nokia-n900' as target device.<br />
<br />
2. Start the build process and install the completed image to a sdcard<br />
: (Replace /dev/sdX with the device for your sdcard)<br />
: <source lang="shell-session">$ pmbootstrap install --sdcard /dev/sdX</source><br />
<br />
=== Configure u-boot on eMMC to boot from the SD card ===<br />
# [http://maemo.org/downloads/product/Maemo5/u-boot-flasher/ Install u-boot from pali] on the n900 in Maemo. If this does not work from the graphical interface you may run <code>sudo apt-get install u-boot-flasher</code> in maemo terminal (see {{issue|16|wiki}} and {{issue|1371|pmbootstrap}}). See Additional Info below for instructions on configuring pmos to boot by default.<br />
# Place the sdcard into the n900 and boot it with the keyboard slide open<br />
# Choose the u-boot shell<br />
# enter <code>run sdboot</code> into the shell<br />
<br />
== Features ==<br />
<br />
=== Configuring U-boot (optional) ===<br />
<br />
In order to configure pmos to boot by default on the N900, using U-boot, you will need to boot into Maemo and create a <code>/etc/bootmenu.d/10-pmos.item</code> file as the root user with these contents:<br />
<br />
{{hc|/etc/bootmenu.d/10-pmos.item|<syntaxhighlight lang="ini"><br />
ITEM_NAME="postmarketOS"<br />
ITEM_SCRIPT="boot.scr"<br />
ITEM_DEVICE="${EXT_CARD}p1"<br />
ITEM_FSTYPE="ext2"<br />
</syntaxhighlight>}}<br />
It can be set to the default boot option by creating a symlink:<br />
<br />
<pre>root@Nokia-N900:~# ln -s /etc/bootmenu.d/10-pmos.item /etc/default/bootmenu.item</pre><br />
Finally, run <code>u-boot-update-bootmenu</code>:<br />
<br />
<pre>root@Nokia-N900:~# u-boot-update-bootmenu <br />
Default bootmenu entry is '/etc/bootmenu.d/10-pmos.item'<br />
Adding bootmenu entry for: 'Maemo 5 with attached kernel (Internal Nand)'<br />
<br />
Configuration file: /etc/bootmenu.d/10-pmos.item<br />
Adding bootmenu entry for: 'postmarketOS'<br />
Configuring this bootmenu entry as default<br />
<br />
Generating u-boot bootmenu script...<br />
</pre><br />
'''Note''': This will set pmos as the default boot option. Maemo will still be accessible when booting the N900 with the keyboard slide out and selecting the relevant boot option in the u-boot boot menu.<br />
<br />
=== Wifi ===<br />
The <code>device-nokia-n900-nonfree-firmware</code> package is required to provide the wl1251 firmware necessary for initializing the wifi device. ([https://github.com/postmarketOS/pmbootstrap/pull/1414 #1414])<br />
You get asked during <code>pmbootstrap init</code> if you would like to install that proprietary firmware package.<br />
<br />
Now you can use NetworkManager's console UI to connect to your network. Please note that <code>nmtui</code> does not work properly when started from <code>tmux</code>.<br />
<br />
<syntaxhighlight lang="shell-session"><br />
$ nmtui<br />
</syntaxhighlight><br />
<br />
==== WiFi settings do not work across reboots ====<br />
<br />
The MAC address of the N900 WiFi interface its being randomized at every boot, since the connection profile created with <code>nmtui</code> is bound to<br />
the MAC address, it won't work at the next boot.<br />
<br />
To solve this, after connecting you can use <code>nmtui</code> to edit the created profile, and remove the MAC address from the "Device" section<br />
<br />
==== Without NetworkManager ====<br />
If NetworkManager should not work for you, make sure that it is not running and run the following commands to connect to an encrypted network manually:<br />
<br />
<syntaxhighlight lang="shell-session"><br />
$ sudo su -<br />
# ip link set wlan0 up<br />
# iw wlan0 set type managed<br />
# wpa_passphrase $YOUR_SSID > /etc/wpa_supplicant/wpa_supplicant.conf<br />
<enter passphrase here and press Enter><br />
# exit<br />
</syntaxhighlight><br />
<br />
Connect to network using wpa_supplicant:<br />
<br />
<syntaxhighlight lang="shell-session"><br />
$ sudo rc-service wpa_supplicant restart<br />
</syntaxhighlight><br />
<br />
==== Power saving / ping times ====<br />
<br />
It should be possible to disable power saving for better ping times, see {{maemo-leste|172}}.<br />
<br />
<syntaxhighlight lang="shell-session"><br />
$ sudo su -<br />
# apk add iw<br />
# iw dev wlan0 set power_save off<br />
# exit<br />
</syntaxhighlight><br />
<br />
=== Sound ===<br />
Modules need not to be compiled, sound support is built into kernel. Install alsa-utils. <br />
<br />
<pre><br />
aplay /usr/share/sounds/alsa/Front_Left.wav<br />
</pre><br />
<br />
NikkSaan provided an advanced audio configuration in [https://github.com/postmarketOS/pmbootstrap/pull/702#issuecomment-380999740 #702 (comment)].<br />
<br />
=== Keyboard Backlight ===<br />
<br />
There are 6 keyboard backlight LEDs that can be adjusted, they are found under <code>/sys/class/leds/lp5523:kb{1-6}</code>. To adjust brightness, write a value, $VAL between 0 and 255, to the <code>brightness</code> parameter as the root user:<br />
<br />
<pre>for i in $(seq 1 6);<br />
do echo $VAL &gt; /sys/class/leds/lp5523\:kb$i/brightness<br />
done</pre><br />
<br />
=== Keyboard layout ===<br />
<br />
The keyboard layout is asked during <code>pmbootstrap init</code> after you select the <code>nokia-n900</code> device.<br />
<br />
Available keymaps:<br />
<div style="overflow:hidden"><br />
[[File:N900 keymap us.jpg|800px|thumb|left|us/rx51_us]]<br />
[[File:N900 keymap ch-de.jpg|800px|thumb|left|ch/rx51_ch]]<br />
[[File:N900 keymap se.jpg|800px|thumb|left|se/rx51_se and fi/rx51_fi (same for Swedish and Finnish).]]<br />
[[File:N900 keymap it.jpg|800px|thumb|left|it/rx51_it]]<br />
</div><br />
<br />
==== Console ====<br />
<br />
:'''NOTE:''' during installation pmbootstrap will typically ask you for the desired keymap. The following is only for experimentation: normally all should just work fine after setting up the SD card from pmbootstrap. The following section may be dated and pmbootstrap has already done the job for you.<br />
<br />
To obtain your desired language keymap file for the RX-51, [https://raw.githubusercontent.com/archlinuxarm-n900/n900-keymaps/master/rx51_us.map such as this one]:<br />
<br />
* On the N900, install <code>kbd-bkeymaps</code>, either by using <code>pmbootstrap install --add kbd-bkeymaps</code> on the host system or by running <code>apk add kbd-bkeymaps</code> on the device itself.<br />
<br />
* The keymap must be in binary format, bmap. This can be accomplished using the <code>loadkeys</code> tool:<br />
<br />
<source lang="shell">$ apk add kbd kbd-bkeymaps<br />
$ loadkeys -b rx51_us.map > rx51_us.bmap<br />
$ gzip rx51_us.bmap</source><br />
<br />
* Compress it and copy it to <code>/usr/share/bkeymaps/us/</code> on the N900.<br />
<br />
* Log into the N900, and run <code>sudo setup-keymap</code>, then select <code>us</code> and finally <code>rx51_us</code>.<br />
<br />
(TODO: Need to pull 'official' vconsole keymaps from Maemo5 if they exist..)<br />
<br />
==== X11 ====<br />
<br />
:'''NOTE:''' during installation pmbootstrap will typically ask you for the desired X11 xkb keymap. The following is only for experimentation: normally all should just work fine after setting up the SD card from pmbootstrap. The following section may be dated and pmbootstrap has already done the job for you.<br />
<br />
In X11 you can use <code>setxkbmap</code> to configure the desired layout.<br />
<br />
Right now it's configured to use the <code>nokiarx51/us</code> layout by default (see [https://github.com/postmarketOS/pmbootstrap/blob/a7afd519eff34237dfe2766634ac6b2c5076e9f5/aports/device/device-nokia-n900/keymaps/40-xkb.conf 40-xkb.conf]) then the pmbootstrap script will patch this file to set the <code>Option "XkbLayout"</code> to <code>"nn"</code> where "nn" is your country code.<br />
<br />
{{note| Info: Tab is ctrl+i}}<br />
<br />
==== Console switching ====<br />
<br />
You can use the <code>[[File:Nokia-n900-blue-arrow.PNG|30px]] blue arrow</code> key in combination with the <code>Volume Up/Down</code> to switch to a different virtual terminal.<br />
<br />
If you installed postmarketOS with a UI, you first have to enable again the other VT by editing the <code>/etc/inittab</code> file and uncomment the following lines:<br />
<syntaxhighlight lang="sh"><br />
...<br />
# Set up a couple of getty's<br />
tty1::respawn:/sbin/getty 38400 tty1<br />
tty2::respawn:/sbin/getty 38400 tty2<br />
tty3::respawn:/sbin/getty 38400 tty3<br />
tty4::respawn:/sbin/getty 38400 tty4<br />
tty5::respawn:/sbin/getty 38400 tty5<br />
tty6::respawn:/sbin/getty 38400 tty6<br />
...<br />
</syntaxhighlight><br />
<br />
=== Display ===<br />
<br />
With DRM enabled ({{MR|197|pmbootstrap}}), the display can be managed at this location: <code>/sys/devices/platform/omapdrm.0/graphics/fb0/</code><br />
<br />
For example, the display can be turned off by:<br />
<br />
<pre># echo 1 &gt; /sys/devices/platform/omapdrm.0/graphics/fb0/blank</pre><br />
<br />
To adjust brightness:<br />
<br />
<pre><br />
# # Replace $VAL with a value from 0 to 255:<br />
# echo $VAL > /sys/class/backlight/acx565akm/brightness<br />
</pre><br />
<br />
=== GUI ===<br />
<br />
==== i3wm ====<br />
'''[[I3wm]] is the recommended UI.''' It is lightweight and fast, and we have a custom N900 configuration that optimizes for its keyboard ([https://www.reddit.com/r/unixporn/comments/7wt8ig/i3gaps_n900_restored_to_glory/ photos]). The most important keybindings are described below, for details see [https://gitlab.com/postmarketOS/pmaports/-/blob/master/device/community/device-nokia-n900/i3wm/i3wm.conf i3wm.conf]. This file gets installed to <code>~/.i3/config</code> and of course you can customize it. If you have good additions, please make a merge request so everybody benefits from an improved default config.<br />
<br />
===== default mode =====<br />
* shift + space: switch to "command mode"<br />
<br />
===== command mode =====<br />
* t: open terminal<br />
* k: kill current program<br />
* w: workspace mode<br />
* r: restart i3wm (use after modifying the config)<br />
* q: go back to "default mode"<br />
<br />
===== workspace mode =====<br />
* a/s/d/f/g: switch to workspace 1/2/3/4/5<br />
* q: go back to "command mode"<br />
<br />
==== Xfce4 ====<br />
[[Xfce4]] does not have performance issues, but since this UI is not optimized for keyboard only usage or for touch screen usage, it is not as user-friendly as i3wm with the postmarketOS default config.<br />
<br />
==== Others ====<br />
There are also Mate, etc.<br />
<br />
==== Misc: Power button ====<br />
If you want to make use of the power button, bind <code>XF86PowerOff</code> to this script:<br />
<syntaxhighlight lang="sh"><br />
FILE=~/.screenoff<br />
if [ -f $FILE ]; then<br />
xinput set-prop 8 "Device Enabled" 1<br />
xinput set-prop 6 "Device Enabled" 1<br />
xinput set-prop 9 "Device Enabled" 1<br />
xset dpms force on<br />
rm ~/.screenoff<br />
else<br />
xinput set-prop 8 "Device Enabled" 0<br />
xinput set-prop 6 "Device Enabled" 0<br />
xinput set-prop 9 "Device Enabled" 0<br />
xset dpms force off<br />
touch ~/.screenoff<br />
fi<br />
</syntaxhighlight><br />
<br />
{{note|You cannot use this to turn the screen back on if i3lock or similar is running, as they would grab the keys}}<br />
<br />
==== Misc: Middle click and right click ====<br />
Obviously, you can't middle click with a touchscreen, but this can be annoying when it's one of the few ways to paste in the terminal.<br />
This script simulates a middle click:<br />
<syntaxhighlight lang="sh"><br />
xdotool mousedown --clearmodifiers 2<br />
xdotool mouseup 2<br />
xdotool keyup alt<br />
xdotool keyup ctrl<br />
xdotool keyup shift<br />
</syntaxhighlight><br />
<br />
For simulating right click button you can use this command:<br />
<syntaxhighlight lang="sh"><br />
xdotool click 3<br />
</syntaxhighlight><br />
<br />
You can bind it to any key you wish. <code>XF86WebCam</code> is a good choice since it's fairly easy to reach and isn't used for anything.<br />
<br />
=== Battery ===<br />
==== Charging ====<br />
<br />
Battery charging is fully supported by the kernel and does not need any special configuration.<br />
<br />
==== Capacity Reporting ====<br />
<br />
The current battery capacity can be found under <code>/sys/class/power_supply/bq27200-0/capacity</code>, and is represented as a percentage. For example, a value of <code>11</code> equates to <code>11%</code>. If <code>capacity</code> does not exist or contains erroneous information, then your battery needs to be calibrated. To calibrate the battery:<br />
<br />
1) Charge it up '''fully''', using a wall power adapter.<br />
<br />
2) Unplug the device and allow the battery to run all the way down until it powers off. This may take quite a while to happen (&gt;24hrs, but can be made shorter by running a CPU intensive workload). Do not let it charge at all during this time. This means you may not use USB for example, as this automatically causes the device to start charging, albeit slowly.<br />
<br />
3) When device eventually powers off, the battery charge gauge chip should then be calibrated. You may charge it up again to use the device.<br />
<br />
[http://www.ti.com/lit/ds/symlink/bq27200.pdf Datasheet for the bq27200 charge gauge chip]<br />
<br />
'''Hint: '''To disable the LED charging indication, disable the charging chip's status pin. <br />
<br />
<code>echo 0 > /sys/class/power_supply/bq24150a-0/stat_pin_enable</code>.<br />
<br />
[http://www.ti.com/lit/ds/symlink/bq24150.pdf Datasheet for the bq24150 charging chip]<br />
<br />
==== Battery Protection ====<br />
Currently, when battery gets below suitable operating voltage, the device dies. This is bad for the battery and the file system. [https://gist.github.com/NikkSaan/800c17d87dddfaa9edf5274130717d73 Here] is a script that monitors the battery, and powers the device off before the battery reaches critical state. For suggested usage, read the program's comments.<br />
<br />
=== Clock ===<br />
==== Setting the hardware clock ====<br />
<br />
Since 49fd9e0e4efcf030ca47344858bdc74370a78603 the hardware clock works. If your hardware clock doesn't have the time set you can set it with:<br />
<br />
<source lang="shell"># Get the system date in the right ballpark so ntpd works<br />
$ date -s "2017-08-14 16:34:50"<br />
<br />
# Write the current system time to the hardware clock<br />
$ hwclock -w</source><br />
<br />
==== Setting the hardware alarm clock ====<br />
<br />
Realtime clock at /dev/rtc0 is on the twl4030 (PMU), and allows setting an alarm to wake the device from sleep, poweroff states. <br />
<br />
Control trough <code>rtcwake</code> [https://linux.die.net/man/8/rtcwake (Manual Page)].<br />
<source lang="shell"><br />
# Suspends the device to memory for 10 seconds<br />
rtcwake --verbose --seconds 10 --mode mem<br />
<br />
# Power off the device and power it on after $TIME, where $TIME is the number of seconds since epoch (1970-01-01)<br />
rtcwake --verbose --time_t $TIME --mode no<br />
/sbin/poweroff<br />
</source><br />
<br />
Manual control from sysfs:<br />
<source lang="shell"><br />
# To set the wakealarm directly, set $TIME to number of seconds since epoch (1970-01-01). Then poweroff or suspend:<br />
echo $TIME > /sys/class/rtc/rtc0/wakealarm<br />
<br />
# To set new wakealarm time, first reset time to 0!<br />
echo 0 > /sys/class/rtc/rtc0/wakealarm<br />
</source><br />
<br />
{{note| When setting number of seconds since epoch, make sure you account for your timezone and see how your realtime clock keeps the time (utc or local)!}}<br />
<br />
=== SMS ===<br />
<br />
In order to use the ofono test scripts, you must install py-dbus, that is currently available only for python2.<br />
<br />
{{note|The N900 needs internet access to perform these steps. See the section above on setting up Wifi.}}<br />
{{note|Your date/time need to be correct in order for HTTPS to work. You can use ntpd to do this.}}<br />
<pre><br />
# apk add git py-dbus<br />
# git clone --depth 1 https://git.kernel.org/pub/scm/network/ofono/ofono.git<br />
</pre><br />
<br />
Here's an example using the test scripts to enable the modem and send a SMS:<br />
<pre><br />
# cd ofono/test<br />
# python3 enable-modem<br />
# python3 online-modem<br />
# python3 send-sms 5033784582 "I like pizza." 0 <br />
</pre><br />
<br />
=== USB Gadget ===<br />
==== Mass Storage ====<br />
The Mass Storage class exposes a block device as a flash drive on your host machine. <br />
<br />
For example, to use the "MyDocs" partition as Mass Storage Device, make sure you unmount the partition first (if mounted), then execute:<br />
<br />
<code><br />
echo /dev/mmcblk1p1 > /sys/devices/platform/68000000.ocp/480ab000.usb_otg_hs/musb-hdrc.0.auto/gadget/lun0/file<br />
</code><br />
<br />
If you only need read permissions on the partition, you can set the read-only flag before exporting it:<br />
<br />
<code><br />
echo 1 > /sys/devices/platform/68000000.ocp/480ab000.usb_otg_hs/musb-hdrc.0.auto/gadget/lun0/ro<br />
</code><br />
<br />
=== GPRS ===<br />
<br />
GPRS can be managed by [https://pkgs.alpinelinux.org/package/edge/testing/armhf/connman connman]. Either install connman using <code>apk</code> or add it when installing pmOS by passing <code>--add connman</code> to <code>pmbootstrap</code>.<br />
<br />
{{note|Once you perform the following steps, the GPRS connection will be established by connman automatically on every boot.}}<br />
<br />
It's '''VERY''' important that you add the following to <code>/etc/connman/main.conf</code> '''BEFORE''' starting connman, else it will take over all network connection handling and disconnect you if you are connected over SSH:<br />
<br />
{{hc|/etc/connman/main.conf|<nowiki><br />
NetworkInterfaceBlacklist = usb,wlan<br />
</nowiki>}}<br />
<br />
Configure connman to start at boot:<br />
<br />
<code>$ sudo rc-update add connman</code><br />
<br />
Stop ofono in order to set APN:<br />
<br />
<code>$ sudo rc-service ofono stop</code><br />
<br />
Edit APN, where <IMSI> should be replaced in the following commands with the IMSI from your SIM card. Replace <APN> with the relevant APN for your cellular carrier (e.g. fast.t-mobile.com).<br />
This file should be created when ofono starts, so you should only need to add the APN.<br />
<br />
{{hc|/var/lib/ofono/<IMSI>/gprs|<nowiki><br />
[Settings] <br />
Powered=true <br />
RoamingAllowed=false <br />
<br />
[context1] <br />
Name=Internet <br />
AccessPointName=<APN> <br />
Username= <br />
Password= <br />
AuthenticationMethod=chap <br />
Type=internet <br />
Protocol=ip <br />
</nowiki>}}<br />
<br />
Start ofono and power on modem.<br />
<br />
<pre><br />
$ sudo rc-service ofono start<br />
$ sudo connmanctl enable cellular<br />
</pre><br />
<br />
In some cases, it seems necessary to run a scan before the necessary service will show in connman, even though the scan is 'unsupported':<br />
<pre><br />
$ sudo connmanctl scan cellular <br />
Error /net/connman/technology/cellular: Not supported <br />
$ sudo connmanctl services<br />
cellular_340369959729712_context1<br />
</pre><br />
<br />
Connect to the cellular service:<br />
<br />
<pre> <br />
$ sudo connmanctl connect cellular_340369959729712_context1 <br />
Connected cellular_340369959729712_context1<br />
$ ip addr show gprs0<br />
10: gprs0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1400 qdisc pfifo_fast state UNKNOWN qlen 10<br />
link/[821] <br />
inet 33.238.141.172/32 brd 33.238.141.172 scope global gprs0<br />
valid_lft forever preferred_lft forever<br />
</pre><br />
<br />
=== GPS ===<br />
<br />
First, get network and date to work. Next, clone tui repository. it contains includes many goodies, including script for hardware testing, gps support, and graphical ofono control software.<br />
<br />
<pre><br />
mkdir /my<br />
cd /my<br />
git clone https://gitlab.com/tui/tui.git<br />
</pre><br />
<br />
Next, install packages necessary for compiling software and prepare gps2. enable-modem, online-modem and you should be able to run gps2. AGPS is not available, so expect long startup.<br />
<br />
<pre><br />
apk add gcc vala musl-dev make linux-headers gpsd<br />
cd /my/tui/ofone<br />
make gps2<br />
./gps2<br />
</pre><br />
<br />
gps2 reportedly can talk to gpsd. Needs further investigation.<br />
<br />
=== FM Transmitter ===<br />
<br />
The N900 contains an Si4713 FM transmitter, it's controlled by video4linux. To start transmitting:<br />
<br />
<source lang="shell-session"><br />
$ v4l2-ctl -d /dev/radio0 --set-ctrl=mute=0 --set-freq=95.21<br />
Now there should be silence on 95.21Mhz instead of noise when tuning in with a radio<br />
$ aplay -vv some-very-good-music.wav<br />
</source><br />
<br />
== Resources ==<br />
* {{Device package|nokia-n900|community}}<br />
* {{Kernel package|nokia-n900|community}}<br />
* [https://kernel.org Kernel source]<br />
* [https://web.archive.org/web/20131117073524/http://skeiron.org/tablets-dev/nokia_N900/ Images and Flashers for Maemo]<br />
* {{issue|1617}} issue about Wi-Fi Setup and Keyboard layout<br />
* [[User:Ollieparanoid/Dogfooding:N900|ollieparanoid's efforts to use the N900 as music player]]<br />
* [https://n900.quitesimple.org/rescueOS/rescueOS-1.3/ N900 rescueOS]<br />
<br />
== Helpful Links for Porting ==<br />
* [https://neo900.org/stuff/block-diagrams/n900/n900.html Device schematic]<br />
* [http://plan9.stanleylieber.com/hardware/n900/n900.schematics.pdf Very detailed schematic]<br />
* [https://github.com/archlinuxarm-n900/alarm-n900/wiki/Hardware-support Arch Linux ARM - N900 hardware components list]<br />
* [http://mlab.taik.fi/paja/?p=1263 N900 sensor access in Maemo]<br />
* [http://natisbad.org/N900/n900-commented-hardware-specs.html Hardware component specs / list]<br />
* [http://elinux.org/N900 Kernel status]</div>Blacklighthttps://wiki.postmarketos.org/index.php?title=File:N900_keymap_it.jpg&diff=18655File:N900 keymap it.jpg2021-04-17T21:24:50Z<p>Blacklight: Nokia N900 it/rx51_it layout</p>
<hr />
<div>== Summary ==<br />
Nokia N900 it/rx51_it layout</div>Blacklighthttps://wiki.postmarketos.org/index.php?title=File:It.jpg&diff=18654File:It.jpg2021-04-17T21:20:43Z<p>Blacklight: Nokia N900 rx51_it layout</p>
<hr />
<div>== Summary ==<br />
Nokia N900 rx51_it layout</div>Blacklight