Hi folks,
I recently bought a Getac V110 laptop and this came pre-installed with a Sierra Wireless EM7305 4G modem. I am currently dual-booting this between Windows 10 and Android 7.1 (due to needing applications in both OS).
In Windows 10 the EM7305 works perfectly (and provides stable connectivity and fast throughput, 100 mbit download speed, 25 mbit upload speed) with a Virgin Mobile SIM card here in the UK.
In Android however I am struggling to get it to work. Through lots of trial and error I have managed to get the modem at least visible to the Android 7.1 OS using the source code and instructions within Android 7.1 RIL Software Version 7.1.6.0. I tried the 10.x release however this was even worse.
I’m building Android 7.1 OS (I am forced to use this version) with a custom-made device.mk file that enables dhcpcd-6.8.2 and installs Sierra’s pre-built files into /system/{bin,etc,lib,lib64}. I have also installed the relevant Kernel modules. These all build fine with no errors after all the relevant SWISTART → SWISTOP were merged in place. I have /dev/ttyUSB0 and /dev/ttyUSB1 present in the OS after correctly merging these in.
I am also hard-coding the following prop values:
persist.sys.ril.type=QMI
rild.libpath=/system/lib64/libsierra-ril.so
persist.sierra.sim_ready_delay=15
The first major problem I had that isn’t documented anywhere is the modem does NOT respond (there is an IO error from the OS) to AT commands sent to /dev/ttyUSB1 and /dev/qcqmi0 is missing until this command is run in the boot phase of the OS (where “${USBID}” is automatically determined by a shell script I wrote):
echo 1 > /sys/bus/usb/devices/"${USBID}"/bConfigurationValue
This also results in /dev/qcqmi0 also appearing (it did not before). I then added the following to happen after a 1000 ms delay:
echo -ne 'at!entercnd="A710"\r\n' > /dev/ttyUSB1
This then opens the modem up to other AT commands. I hope the above information helps someone.
My problems are now that the Android 7.1 RIL is silently crashing with exit code 1, even though it is being launched in the init phase with the following command:
/system/bin/rild -l /system/lib64/libsierra-ril.so -- -a -i wwan0
I can see that wwan0 does not exist and dhcpcd is not running either. I’m unsure of the ordering here (whether dhcpcd creates wwan0 etc). Suffice to say, the Android OS does not detect the modem properly (insisting I insert a SIM card, even though one is present and everything works in Windows).
After poking in some AT commands I can see the modem is up / online, connected to my cellular provider and with the correct APN set. Grabbing logs from this system is difficult but I have uploaded some photos below to show certain progress…
It’s worth noting that selinux is set to permissive and not enforcing. I don’t believe the selinux errors are causing rild to bomb out because if I call it directly I get the same problem.