GloDroid / glodroid_manifest

Android port that aims to bring both user- and developer-friendly experience in using AOSP with a set of single-board computers (SBC), phones and other devices.
471 stars 67 forks source link

SIM card usage #70

Closed swedneck closed 3 years ago

swedneck commented 4 years ago

Is it possible to use the SIM card for mobile data and calling? If so, what do i need to do to enable it?

rsglobal commented 4 years ago

Hi, SIM is not yet supported by GloDroid. Currently you can play with modem only at low level: https://xnux.eu/devices/feature/modem-pp.html

Supporting it by OS require quectel RIL library at least, and... some additional tuning.

swedneck commented 4 years ago

Anything (aside from programming) i could to to help bring SIM support?

rsglobal commented 4 years ago

First step I believe is to insert sim card and make a call using echo ATxxx > /devttyUSB2 After you can confirm it is working, next step is to setup audio paths (to modify XML file).

Remaining steps depends on how much experience in Android development do you have. I also hope to avoid any programming.

Anyway, at first you have to sync with the next branch. Or I can provide you latest integration build tomorrow.

swedneck commented 4 years ago

I have 0 experience with android development, but i can certainly test things and report back with results. How would i run commands? Should i install termux?

rsglobal commented 4 years ago

I do not have any experience with this modem. Sorry, but I can't help now. I will back to enabling modem support when I will have got more free time. So only thing you can help for now is to "dig": i mean read forums, experiment using Linux distros on PP, etc, and sharing the results.

rsglobal commented 4 years ago

Mobile data support: https://xnux.eu/devices/feature/modem-pp-data.html

swedneck commented 4 years ago

how would i run commands in android?

rsglobal commented 4 years ago

Use latest integration build or build the next branch. (It includes modem power manager driver module) https://github.com/GloDroid/glodroid_manifest/issues/58

Use adb shell from your HOST PC to open console $ su to enter superuser mode After that you should be able to wakeup the modem.

swedneck commented 4 years ago

i will test!

rsglobal commented 4 years ago

Android has microcom app, you can try:

su
microcom -s 115200 /dev/ttyUSB2

Exit from microcom: CTRL+ ] There is no echo, but if you type AT and press enter, you should have OK response.

rsglobal commented 4 years ago

This utility can be used to configure qmi: https://git.openwrt.org/?p=project/uqmi.git;a=summary

@matviizorin , can you add Android.bp to compile it? Just like https://github.com/rpetrovski/android-x86-external-uqmi for earlier vesion.

matviizorin commented 4 years ago

@rsglobal Yes, I can. I'm going to try it after completing the other available activities.

rsglobal commented 4 years ago

@bauner is currently WIP on similar activity: https://github.com/bauner/glodroid_device/commits/ril-gps

rsglobal commented 3 years ago

Turn on GPS and listen for data:

adb shell
$ su
# echo 1 > /sys/class/modem-power/modem-power/device/powered
# cat /dev/ttyUSB1 &
# echo AT+QGPS=1,30,50,0,2 > /dev/ttyUSB2

You should see GPS data on the screen.

To disable GPS:
# echo AT+QGPSEND > /dev/ttyUSB2
itsoke commented 3 years ago

Is it realistic that it might work in a future release?

rsglobal commented 3 years ago

Initial SIM card support is implemented in next branch. It based on Google cuttlefish (emulator) RIL library, therefore isn't 100% compatible with QC25 modem.