BCM4752 GPS

378 views
Skip to first unread message

Jose Luis s

unread,
Aug 3, 2017, 11:38:41 AM8/3/17
to Android-x86
Hi all.

I'm trying to get this device working in android-x86 in my tablet.

By now, I've  got the patches from Android-IA (is a common intel platform device for android-ia) for this device, and try to apply them (manually) to 4.13-rc3 kernel source (from Maurossi git). Is a ACPI device AFAIK controlled by GPIO pins. In Android-IA this device is builtin in a 3.12 kernel from intel. and the driver create a ttyGPS and a ttyControlGPS devices under /dev/GPS and there is a GPS.xml and a gps.rc files to integrate them.

The patches assumes a ACPI-ID name of BCM4752, but in my tablet this name is different HAMP4752 so I arrrange the patches acordingly.

No I compile the kernel sucessfully (first with dgnss as a module) and the module seem to be loaded but no device is created, but I can see under /sys/bus/acpi the device with the proper module binded, but it does not work at all.

Then I gave a try to builtin module, and the same results.


Searching in dmesg I've found this with builtin module:

[  237.865142] type=1400 audit(1501773112.893:1351): avc: denied { getattr } for pid=2219 comm="ngs.android.pop" path="/sys/bus/acpi/devices/HAMP4752:00" dev="sysfs" ino=2338 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:sysfs:s0 tclass=lnk_file permissive=1


And something similar in the case of a loadable module.

Seems to be a SElinux issue?


Can somebody help?

Chih-Wei Huang

unread,
Aug 4, 2017, 1:42:51 AM8/4/17
to Android-x86
Nope.
We set SELinux in permissive mode
so it's just a warning.
Unless you run the enforce mode in your build.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Jose Luis s

unread,
Aug 4, 2017, 10:54:47 AM8/4/17
to Android-x86
I made a little progress.

Now I can see a ttp port attached to dgnss module, it's ttyS2. Is a different port that one created in Android-ia ttymfd1.

The ports ttyGPS and ttyControlGPS are only symlinks created by init.gps.rc.

Now, can anybody point me to get the GPS working in Android-x86? What do I need to do?, maybe edit properties file?.

Thanks

Jose Luis s

unread,
Aug 4, 2017, 11:51:58 AM8/4/17
to Android-x86
Android-ia seems to use gpsd to integrate serial gps, so the service uses gps.xml with parameters.

Does Android-x86 use the same? this way maybe is only a matter of include the same configuration files.

Thanks

Jose Luis s

unread,
Aug 4, 2017, 11:56:01 AM8/4/17
to Android-x86
I've read the threads and the source of hardware/gps and seems to be as easy as adding some entries in build.properties with port and baudrate, I'll try it, but what about powering off the GPS hardware with this kind of service? in android-ia there is a dev file to power control the GPS.

Any help would be great.

Kitsune

unread,
Dec 19, 2017, 4:38:38 AM12/19/17
to Android-x86
I'm also now try fix BCM4752. I'm add https://github.com/Asus-T100/kernel/commit/6a6f5775d6aa312e7ea0c4077ef786665fd86135 driver. GPS not work. In /sys/module/ is driver folder dgnss ( https://drive.google.com/open?id=1OnO_uAYEzLXLHpX31lVxr1yfyzp8ox3_ ).
And i'm add in build.prop:
ro.kernel.android.gps=ttyS2
ro.kernel.android.gpsttybaud=9600
No interrupts for ttyS2 port ( https://drive.google.com/open?id=1pPhe3JStFMKKH4HBSDgby9K8drQonTLk )
I don't know what doing next. Big thanks for any help.

Jose Luis s

unread,
Dec 27, 2017, 5:13:34 AM12/27/17
to Android-x86
Hello.

In my experience it would be not so easy to fix issues with BCM4752. I can get the driver (from android-ia) loaded and binded, create /dev/ttyS2, with modified entry in acpi_pnp.c, in dgnss.c and rfkill-gpio.c acording to the acpi name of the device, in my case HAMP4752, but the default baudrate is 921600, not supported by gps.c in android-x86 source.
I've tried to read directly from /dev/ttyS2 (cat /dev/ttyS2) after changing the default baudrate (stty -F /dev/ttyS2 921600) but no luck, maybe the driver is "incomplete", or it's needed to "enable" the hw via gpio pin, or acpi, don't know. I've found the file apparently controlling the device (as in android-ia) in HAMP4752/dgnss/enable but I don't know how to use it

Android-x86 does not use the standar android gps HW approach with gpsd, (used in android-ia), so I don't know if we will ever use this gps chip in android-x86.

GPS is essential for my needs so I've researching another options like found a gpsd client for android (mockd as far as I know is the solution but dissapear from google play) or using a local vk-172 usb ublox7 gps but I need to solve the OTG and simultaneous charging problem.

Kitsune

unread,
Dec 27, 2017, 7:32:37 AM12/27/17
to Android-x86
Hello! Thanks for answer, now i'm experimenting with sound, but next in my plans is gps.

Android ia gps work or no? You trying it?
Is driver for kernel 3.10 may be you can use it, or porting. I think this is full driver.


среда, 27 декабря 2017 г., 12:13:34 UTC+2 пользователь Jose Luis s написал:

YoungJoon Lee

unread,
Dec 27, 2017, 7:54:06 AM12/27/17
to Android-x86
Here is example of activating GPS of mine.

File : android-oreo-x86_android-auto/device/generic/x86_64/android_x86_64.mk
Add next strings.

PRODUCT_PROPERTY_OVERRIDES := \
    ro.kernel.android.gps=ttyUSB0 \
    ro.kernel.android.gpsttybaud=4800

Related files : 
./hardware/gps/
./device/common/gps/

Best regards.

2017년 12월 27일 수요일 오후 9시 32분 37초 UTC+9, Kitsune 님의 말:

Chih-Wei Huang

unread,
Dec 27, 2017, 9:44:05 PM12/27/17
to Android-x86
2017-12-27 20:54 GMT+08:00 YoungJoon Lee <get...@gmail.com>:
> Here is example of activating GPS of mine.
>
> File : android-oreo-x86_android-auto/device/generic/x86_64/android_x86_64.mk
> Add next strings.
>
> PRODUCT_PROPERTY_OVERRIDES := \
> ro.kernel.android.gps=ttyUSB0 \
> ro.kernel.android.gpsttybaud=4800

Could you provide an official patch?
Not like the above, but a patch to init.sh
to detect your model and set these properties.
You may add that to function init_hal_gps() of init.sh.

YoungJoon Lee

unread,
Dec 27, 2017, 10:43:20 PM12/27/17
to andro...@googlegroups.com
Ok, I will check other init.sh functions and make patch. But I don't think same patch work on bcm4752 because, device name and spec is not same as mine. 

Jose Luis s

unread,
Dec 28, 2017, 6:09:27 AM12/28/17
to Android-x86
Hello.
You're taking about a usbGPS device true?
BCM4752 is an integrated GPS used in x86 tablets and other devices, in most cases gpsd is used.
I can integrate my usb vk-172 adding these properties modified acordingly.

Jose Luis s

unread,
Jan 10, 2018, 7:21:40 AM1/10/18
to Android-x86
Still trying to make it work, I've seen that rfkill command does not show the GPS device even I patched the rfkill-gpio.c source, maybe is the reason. When I try to get data from ttyS2 (the serial port created with dgnss.ko driver) I get nothing maybe because gps.c (serial gps support in android-x86) does not support the 920.600 baud rate (as showed in ACPI tables for the gps device).

Can anybody help?



El jueves, 3 de agosto de 2017, 17:38:41 (UTC+2), Jose Luis s escribió:

Kitsune

unread,
May 20, 2018, 3:43:42 PM5/20/18
to Android-x86
Seems default BCM4752 baudrate is 115200 (http://forums.debian.net/viewtopic.php?f=8&t=132661) Android x86 support it, but it no so important, some data can get with false baudrate.
I'm think we will need WL128X driver https://github.com/lenovo-yt2-dev/android_kernel_lenovo_baytrail/tree/cm-12.1/drivers/external_drivers/drivers/gps/wl128x and find right gpio for gps chip enabling (Different values will be on different tablets)
Reply all
Reply to author
Forward
0 new messages