Generic RIL to give PPP and SMS

The Olimex supplier RIL Daemon gives you PPP with a GPRS modem connected but I could not get the SMS or USSD to work. I could send SMS but never receive anything.

I found a Huawei Generic RIL on the internet here

https://github.com/DerArtem/huaweigeneric-ril

This compiled OK but I could not get it to dial out on PPP, it just kept failing to get a connection.  I finally had to modify this to use the SCRIPT method of connection and now I have a working RIL. This is in the latest source that I uploaded.

You can look into the code and see how I did this but for now I will explain how to build the system to use it. It requires nothing more than to open and edit the SYSTEM.PROP file in the following directory

android4.2/device/softwinner/olinuxino-a20/

In here you will see these lines

rild.libargs=-d /dev/ttyUSB2 -v /dev/ttyUSB1
rild.libpath=/system/lib/libhuaweigeneric-ril.so
#rild.libargs=-d /dev/ttyUSB2
#rild.libpath=/system/lib/libsoftwinner-ril.so

In the sample above,the Huawei Generic library is selected. If you want to switch back to the softwinner one, simple comment and uncomment as required.

With this and using the Huawei library, build the system and you should now have SMS send and receive. You can also do USSD from the phone app too.

NOTE The last thing I am working on is the fact that the messages appear to remain in the SIM memory so once this fills up, the system won’t receive any more. On boot up, I have added a delete of all existing SMS. This is done well before the device is on the network so any new outstanding messages will arrive as normal. It’s still work in progress to sort this out so that the SIM messages are deleted once they are read by the Android system. I’ll update here once the fix is found but if anyone else works it out, let me know.

By Dave McLaughlin