Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Dev repo and test bed for the B2G JS RIL (canonical location is mozilla-central!)
JavaScript Python
branch: master

This branch is 2 commits ahead, 15 commits behind ferjm:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
python Adding python script from b2g-dialer-daemon
README.org
TODO
adb.html
adb.js
audiomanager.js
bootstrap.js
chrome.manifest
dom_telephony.js
install.rdf
pdu.js
pdureadertest.html
pduwritertest.html
ril_consts.js
ril_vars.js
ril_worker.js
sms_errors.js
socket.js
test.html
test.js

README.org

b2g-js-ril

This repository houses the JavaScript code for accessing the android radio interface layer (RIL) protocol. Using this project, along with the b2g-dialer-daemon (http://www.github.com/kmachulis-mozilla/b2g-dialer-daemon), on top of the gonk backend of B2G, the phone radio can be accessed from a desktop instance of Firefox for testing and development.

Development notes

Running tests

Using the ‘js’ interpreter executable from a Firefox build:

js test.js

Port forwarding

To forward the socket on the phone to the desktop (for desktop development), you first need to get rilproxy to expose it as such, rather than exposing it to Gecko:

adb shell $ touch /data/local/rilproxyd $ ps <look for rilproxyd_pid> $ kill <rilproxyd_pid>

Now on the desktop, run the following command:

adb forward tcp:6200 localreserved:rilproxyd

Interactive testing in Firefox

This directory can be installed as a Firefox add-on. Simply drop a proxy file (https://developer.mozilla.org/en/Setting_up_extension_development_environment#Firefox_extension_proxy_file) called ‘b2g-js-ril@mozilla.org’ into your profile’s ‘extension’ dir. Then open the testing page at ‘chrome://ril/content/test.html’ which is able to connect to the forwarded socket, thus mimicking the RIL IPC thread, and run the RIL worker code.

Something went wrong with that request. Please try again.