Replicant: Issueshttps://redmine.replicant.us/https://redmine.replicant.us/favicon.ico?15984615062021-01-09T00:41:02ZReplicant
Redmine Replicant - Feature #2206 (New): Note 2 LTE modem on mainline kernelhttps://redmine.replicant.us/issues/22062021-01-09T00:41:02ZJoey Hewitt
<p>I'll track work on LTE modems on mainline kernel. The attached patch goes in the kernel. Build and install <a class="external" href="https://github.com/technexion-android/platform_external_libgpiod">https://github.com/technexion-android/platform_external_libgpiod</a>, then run the following script:</p>
<pre><code class="shell syntaxhl">pin_name<span class="o">()</span> <span class="o">{</span>
<span class="nb">sed</span> <span class="s1">'s/-/ /'</span> /sys/firmware/devicetree/base/soc/pinctrl@<span class="k">*</span>/<span class="nv">$1</span>/samsung,pins
<span class="o">}</span>
gpioset <span class="si">$(</span>pin_name ap2mdm-soft-reset-n<span class="si">)</span><span class="o">=</span>0
<span class="nb">sleep</span> .005
gpioset <span class="si">$(</span>pin_name ap2mdm-soft-reset-n<span class="si">)</span><span class="o">=</span>1
<span class="nb">sleep</span> .010
gpioset <span class="si">$(</span>pin_name ap2mdm-status<span class="si">)</span><span class="o">=</span>1
</code></pre>
<p>The modem should now appear in lsusb, in QDL mode. I am trying to figure out how to boot it. I'm using <a class="external" href="https://git.replicant.us/contrib/scintill/external_modem-boot/">https://git.replicant.us/contrib/scintill/external_modem-boot/</a> with some obsolete pieces stripped out, but now the modem sends a non-existent command 0. I don't know why, but some guesses are that the HSIC is buggy in this kernel, or the old kernel does something I don't know about to get the modem in the right state.</p> Replicant - Feature #1958 (In Progress): Note II LTE modem (ofono Java RIL)https://redmine.replicant.us/issues/19582019-10-04T23:11:23ZJoey Hewitt
<p>I'm working on porting my oFono-based Java RIL to Replicant 6 on Note II LTE (which should also apply to Galaxy S III). I've had some success with SMS and calls, but am going to be too busy for the next few weeks so I'm logging some progress.</p>
<p>See <a class="external" href="https://redmine.replicant.us/projects/replicant/wiki/QMI-RIL">https://redmine.replicant.us/projects/replicant/wiki/QMI-RIL</a> for some background information on speaking to the modem. I'm using Wolfgang's work as a foundation for mine.</p>
<p>My code is at <a class="external" href="https://git.replicant.us/contrib/scintill/manifest/log/?h=replicant-6.0">https://git.replicant.us/contrib/scintill/manifest/log/?h=replicant-6.0</a> . To try on GT-I9305 etc., you should just need that manifest and add a patch like <a class="external" href="https://git.replicant.us/contrib/scintill/device_samsung_t0lte/commit/?h=replicant-6.0&id=e11c95a091cd8b1dbdda8307565283b0c2377de2">https://git.replicant.us/contrib/scintill/device_samsung_t0lte/commit/?h=replicant-6.0&id=e11c95a091cd8b1dbdda8307565283b0c2377de2</a> plus its parent patch to your device's tree.</p>
<a name="TODO"></a>
<h1 >TODO<a href="#TODO" class="wiki-anchor">¶</a></h1>
<ul>
<li>Cycle like this in kernel logs every 1-2 seconds. The spam is annoying, and it seems like it could be bad for correct modem operation or battery life. Is the modem cycling the USB link? Why? Need to run an RMNET-based kernel to see if it does this.<br /><pre>
<7>[ 122.340699] c0 usb 1-2: unlink qh2-0001/e820ce00 start 1 [2/0 us]
<6>[ 122.347539] c0 read_hsic_cb: status:-2 actual:0
<7>[ 122.353599] c0 usb 1-2: usb auto-suspend
<7>[ 122.370253] c0 hub 1-0:1.0: hub_suspend
<7>[ 122.372738] c0 usb usb1: bus auto-suspend
<7>[ 122.377120] c0 s5p-ehci s5p-ehci: suspend root hub
<6>[ 122.383829] c0 s5p-ehci s5p-ehci: host_phy_susp
<6>[ 122.388050] c0 request_active_lock_release
<6>[ 122.595921] c0 mdm_hsic_irq_handler: detect Rising edge
<6>[ 122.599878] c0 mdm_hsic_rpm_check
<6>[ 122.603592] c0 request_active_lock_set
<6>[ 122.608000] c0 s5p-ehci s5p-ehci: host_phy_resume
<7>[ 122.613249] c0 usb usb1: usb auto-resume
<7>[ 122.617389] c0 s5p-ehci s5p-ehci: resume root hub
<6>[ 122.660968] c0 mdm_hsic_irq_handler: detect Falling edge
<7>[ 122.675187] c0 hub 1-0:1.0: hub_resume
<7>[ 122.677644] c0 s5p-ehci s5p-ehci: GetStatus port:2 status 001005 0 ACK POWER sig=se0 PE CONNECT
<7>[ 122.687623] c0 hub 1-0:1.0: port 2: status 0503 change 0004
<7>[ 122.693642] c0 hub 1-0:1.0: state 7 ports 3 chg 0004 evt 0000
<7>[ 122.699753] c0 s5p-ehci s5p-ehci: GetStatus port:2 status 001005 0 ACK POWER sig=se0 PE CONNECT
<7>[ 122.709054] c0 s5p-ehci s5p-ehci: GetStatus port:2 status 001005 0 ACK POWER sig=se0 PE CONNECT
<6>[ 122.718199] c0 mif: usb_port_resume: 1283, 4
<7>[ 122.722833] c0 usb 1-2: finish resume
<6>[ 122.729875] c0 usb 1-2: read_hsic:
<7>[ 122.733547] c0 s5p-ehci s5p-ehci: reused qh e820ce00 schedule
<7>[ 122.737956] c0 usb 1-2: link qh2-0001/e820ce00 start 1 [2/0 us]
<7>[ 122.746082] c0 hub 1-0:1.0: resume on port 2, status 0
<7>[ 122.749870] c0 hub 1-0:1.0: port 2, status 0503, change 0004, 480 Mb/s
<7>[ 123.255691] c0 usb 1-2: unlink qh2-0001/e820ce00 start 1 [2/0 us]
<6>[ 123.262380] c0 read_hsic_cb: status:-2 actual:0
<7>[ 123.267623] c0 usb 1-2: usb auto-suspend
<7>[ 123.285240] c0 hub 1-0:1.0: hub_suspend
<7>[ 123.287727] c0 usb usb1: bus auto-suspend
<7>[ 123.292111] c0 s5p-ehci s5p-ehci: suspend root hub
<6>[ 123.298786] c0 s5p-ehci s5p-ehci: host_phy_susp
<6>[ 123.302931] c0 request_active_lock_release
</pre></li>
<li>Voice calls - audio doesn't work (hopefully just needs correct muxing) and call partially disconnects after several seconds. The latter might be related to USB-link power cycling (see above).</li>
<li>Data doesn't work. Might need correct interface name and raw IP mode. Look at Wolfgang's code on this.</li>
<li>It seems slow to register to the network after boot</li>
</ul>