Halium / projectmanagement

141 stars 32 forks source link

[device-port] [espresso3g/espressowifi] Samsung Galaxy Tab 2 #238

Open MightyM17 opened 3 years ago

MightyM17 commented 3 years ago

Tree: halium-7.1

=== Sensor 1 == Name: MS-3E (YAS530) Magnetic Sensor Vendor: Yamaha Corporation Version: 0x1 Handle: 0x2 Type: 2 maxRange: 800.0 resolution: 0.300000 power: 4.0 mA minDelay: 10000

=== Sensor 2 == Name: MS-x Orientation Sensor Vendor: Yamaha Corporation Version: 0x1 Handle: 0x3 Type: 3 maxRange: 360.0 resolution: 0.100000 power: 0.0 mA minDelay: 10000

=== Sensor 3 == Name: GP2AP002 Light Sensor Vendor: Sharp Version: 0x1 Handle: 0x4 Type: 5 maxRange: 0.0 resolution: 0.0 power: 0.0 mA minDelay: 0

=== Sensor 4 == Name: GP2AP002 Proximity Sensor Vendor: Sharp Version: 0x1 Handle: 0x5 Type: 8 maxRange: 5.0 resolution: 0.0 power: 0.0 mA minDelay: 0

  * [ ] test_audio

phablet@ubuntu-phablet:~$ test_audio Audio device API version 0200 doesn't match platform current 3004.test_audio: test_audio.c:71: main: Assertion `audiohw->common.version == AUDIO_DEVICE_API_VERSION_CURRENT' failed. Aborted

  * [ ] test_camera

phablet@ubuntu-phablet:~$ test_camera Problem connecting to camera

  * [x] test_input

phablet@ubuntu-phablet:~$ test_input fatal error opening "/sys/power/wake_lock": Permission denied fatal error opening "/sys/android_power/acquire_partial_wake_lock": No such file or directory

  * [ ] test_recorder

^Cphablet@ubuntu-phablet:~$ test_recorder Test application for video recording using the camera Recording start with volume up button. And stops with volume down. The result is stored to /root/test_video.avi



<!-- 
Other information goes below this comment. Possible topics of comment may 
include special flashing or building instructions, such as manual effort to
change vendor files.
-->
MightyM17 commented 1 year ago

Wdym not recognised by ADB? Can you telnet in?

massimo1980 commented 1 year ago

Wdym not recognised by ADB? Can you telnet in?

I've followed the procedure described on the docs for debugging the lsusb loop show me this:

  iSerial                 4 GNU/Linux Device on rndis0 10.15.19.82
  iSerial                 3 6D8C3086495
  iSerial                 1 0000:00:14.0

once configured the interfaces on my pc, i've tried to telnet into, but seems that the telnet service isn't loaded

(base) massimo@MILLENNIUM:~$ telnet 10.15.19.82
Trying 10.15.19.82...
telnet: Unable to connect to remote host: Connection refused

(base) massimo@MILLENNIUM:~$ nmap -p- 10.15.19.82
Starting Nmap 7.80 ( https://nmap.org ) at 2022-12-21 16:21 CET
Nmap scan report for 10.15.19.82
Host is up (0.021s latency).
All 65535 scanned ports on 10.15.19.82 are closed

Nmap done: 1 IP address (1 host up) scanned in 7.22 seconds

EDIT: ok...I don't know why...but i rebuilded the image and now: telnet doesn't respond...but i can SSH into:

root@ubuntu-phablet:~# lsmod
Module                  Size  Used by
omaplfb                18223  0
pvrsrvkm              316454  1 omaplfb
root@ubuntu-phablet:~#

and maybe the issue is related to the fact that some directory are missing...

lrwxrwxrwx    1 root root    16 Dec 22 09:35 factory -> /android/factory
lrwxrwxrwx    1 root root    17 Dec 22 09:35 firmware -> /android/firmware
lrwxrwxrwx    1 root root    17 Dec 22 09:35 metadata -> /android/metadata
lrwxrwxrwx    1 root root    12 Dec 22 09:35 odm -> /android/odm
lrwxrwxrwx    1 root root    16 Dec 22 09:35 persist -> /android/persist
lrwxrwxrwx    1 root root    16 Dec 22 09:35 product -> /android/product

the symlinks are broken cause that directories doesn't exists...

MightyM17 commented 1 year ago

Lmao seems like rebuilds are fixing everything xD Now that you can SSH in can you get the logs again? coz pvrsrvkm seems to be working fine, also where is the vendor directory :o

massimo1980 commented 1 year ago

Sure! here it is! Anyway i have some doubts about what i'm building on the "system image" phase, cause actually on the device the file: /var/lib/lxc/android/rootfs/fstab.espresso still has the "/dev/block/platform/omap_hsmmc.1/by-name/" string and not the " /dev/mmcblk0pX" can't understand if it's correct or not Same for directory "/lib/modules" ( in the docs says that i have to find the driver bcmdhd.ko in there...but there isn't .. )

root@ubuntu-phablet:/# ls -al ./android/system/lib/modules
total 444
drwxr-xr-x. 2 root root   4096 Dec 16 09:32 .
drwxr-xr-x. 6 root root   8192 Dec 16 09:31 ..
-rw-r--r--. 1 root root  29112 Dec 16 09:32 omaplfb.ko
-rw-r--r--. 1 root root 409492 Dec 16 09:32 pvrsrvkm.ko
root@ubuntu-phablet:/#

for the "unity" error, i've this in the log /var/log/lightdm/unity-system-compositor.log but i think that the real issue is that there isn't the right partition mounted....so no driver...no firmware...etc etc

[2022-12-26 17:40:24.435455] <information> mirserver: Starting
[2022-12-26 17:40:24.438354] < - debug - > mirserver: Using Linux VT subsystem for session management
[2022-12-26 17:40:24.439422] <information> mircommon: Loading modules from: /usr/lib/arm-linux-gnueabihf/mir/server-platform
[2022-12-26 17:40:24.439727] <information> mircommon: Loading module: /usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-android.so.15
[2022-12-26 17:40:24.439880] <information> mircommon: Loadi
[dmesg.txt](https://github.com/Halium/projectmanagement/files/10304395/dmesg.txt)
ng module: /usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-android-caf.so.15
[2022-12-26 17:40:24.440124] <information> mircommon: Loading module: /usr/lib/arm-linux-gnueabihf/mir/server-platform/input-evdev.so.7
[2022-12-26 17:40:24.452087] <information> mirserver: Found graphics driver: mir:android (version 1.8.0) Support priority: 0
[2022-12-26 17:40:24.452636] <information> mirserver: Found graphics driver: mir:android-caf (version 1.8.0) Support priority: 0
ERROR: /build/mir-1.8.1ubports1+0~20220201204900.42~1.gbp6bbdac/src/server/graphics/default_configuration.cpp(182): Throw in function mir::DefaultServerConfiguration::the_graphics_platform()::<lambda()>
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Exception while creating graphics platform
ERROR: /build/mir-1.8.1ubports1+0~20220201204900.42~1.gbp6bbdac/src/server/graphics/platform_probe.cpp(119): Throw in function std::shared_ptr<mir::SharedLibrary> mir::graphics::module_for_device(const std::vector<std::shared_ptr<mir::SharedLibrary> >&, const mir::options::ProgramOption&, const std::shared_ptr<mir::ConsoleServices>&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Failed to find platform for current system

EDIT: the "vendor" directory is there...what i pasted were the broken links. here's the root dir:

root@ubuntu-phablet:/# ls -al
total 92
drwxr-xr-x   24 root root  4096 Dec 26 16:33 .
drwxr-xr-x   24 root root  4096 Dec 26 16:33 ..
drwxrwxrwt    9 root root   200 Dec 26 17:40 android
drwxr-xr-x    2 root root  4096 Dec 20 23:14 bin
drwxr-xr-x    2 root root  4096 Apr 12  2016 boot
lrwxrwxrwx    1 root root    14 Dec 26 16:33 cache -> /android/cache
lrwxrwxrwx    1 root root    13 Dec 26 16:33 data -> /android/data
drwxr-xr-x    3 root root  4096 Dec 20 23:09 debian
drwxr-xr-x   14 root root  4240 Dec 26 17:40 dev
drwxr-xr-x  113 root root  4096 Dec 26 16:33 etc
lrwxrwxrwx    1 root root    16 Dec 26 16:33 factory -> /android/factory
lrwxrwxrwx    1 root root    17 Dec 26 16:33 firmware -> /android/firmware
drwxr-xr-x    3 root root  4096 Nov 19 23:08 home
-rwxr-xr-x    1 root root  9647 May 30  2022 init
drwxr-xr-x   19 root root  4096 Dec 26 16:33 lib
drwx------    2 root root 16384 Dec 26 16:33 lost+found
drwxrwxrwt    2 root root    40 Dec 26 17:40 media
lrwxrwxrwx    1 root root    17 Dec 26 16:33 metadata -> /android/metadata
drwxr-xr-x    2 root root  4096 Dec 20 23:04 mnt
lrwxrwxrwx    1 root root    12 Dec 26 16:33 odm -> /android/odm
drwxr-xr-x    3 root root  4096 Dec 20 23:12 opt
lrwxrwxrwx    1 root root    16 Dec 26 16:33 persist -> /android/persist
dr-xr-xr-x  159 root root     0 Jan  1  1970 proc
lrwxrwxrwx    1 root root    16 Dec 26 16:33 product -> /android/product
drwx------    2 root root  4096 Dec 20 23:14 root
drwxr-xr-x   24 root root   780 Dec 26 17:59 run
drwxr-xr-x    2 root root  4096 Dec 20 23:14 sbin
drwxr-xr-x    2 root root  4096 Dec 20 23:04 srv
dr-xr-xr-x   15 root root     0 Dec 26 17:39 sys
lrwxrwxrwx    1 root root    15 Dec 26 16:33 system -> /android/system
drwxrwxrwt    4 root root    80 Dec 26 17:54 tmp
drwxr-xr-x.   7 root root  4096 Dec 26 17:38 userdata
drwxr-xr-x   10 root root  4096 Dec 20 23:04 usr
drwxr-xr-x   11 root root  4096 Dec 20 23:14 var
lrwxrwxrwx    1 root root    22 Dec 26 16:33 vendor -> /android/system/vendor
root@ubuntu-phablet:/#

syslog.log

massimo1980 commented 1 year ago

and this is the "dmesg" if can help... dmesg.txt

MightyM17 commented 1 year ago

Same issue with PowerVR here :(

[   18.908538] PVR_K:(Error): GetHandleStructure: Handle index out of range (4294967295 >= 256)
[   18.908569] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
[   18.908599] PVR_K:(Error): PVRSRV_BridgeDispatchKM: Invalid kernel services handle (149)
[   19.010528] init: Service 'logd-reinit' (pid 21) exited with status 0
[   19.307800] serio: Serial port ttyO3
[   19.412475] PVR_K:(Error): GetHandleStructure: Handle index out of range (4294967295 >= 256)
[   19.412506] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
[   19.412536] PVR_K:(Error): PVRSRV_BridgeDispatchKM: Invalid kernel services handle (149)
[   19.941558] PVR_K:(Error): GetHandleStructure: Handle index out of range (4294967295 >= 256)
[   19.941589] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
[   19.941619] PVR_K:(Error): PVRSRV_BridgeDispatchKM: Invalid kernel services handle (149)

Never faced such an issue before, maybe broken sources, I hope you've used the ones I mentioned before :D

massimo1980 commented 1 year ago

Same issue with PowerVR here :(

[   18.908538] PVR_K:(Error): GetHandleStructure: Handle index out of range (4294967295 >= 256)
[   18.908569] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
[   18.908599] PVR_K:(Error): PVRSRV_BridgeDispatchKM: Invalid kernel services handle (149)
[   19.010528] init: Service 'logd-reinit' (pid 21) exited with status 0
[   19.307800] serio: Serial port ttyO3
[   19.412475] PVR_K:(Error): GetHandleStructure: Handle index out of range (4294967295 >= 256)
[   19.412506] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
[   19.412536] PVR_K:(Error): PVRSRV_BridgeDispatchKM: Invalid kernel services handle (149)
[   19.941558] PVR_K:(Error): GetHandleStructure: Handle index out of range (4294967295 >= 256)
[   19.941589] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
[   19.941619] PVR_K:(Error): PVRSRV_BridgeDispatchKM: Invalid kernel services handle (149)

Never faced such an issue before, maybe broken sources, I hope you've used the ones I mentioned before :D

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
        <remote  name="espresso" fetch="https://github.com/Unlegacy-Android/" />
        <remote  name="device-sample" fetch="https://android.googlesource.com/" />
        <remote  name="mighty" fetch="https://github.com/MightyM17/" />

        <project path="device/samsung/espresso" name="android_device_samsung_espresso" remote="mighty" revision="aosp-7.1" />
        <project path="device/samsung/espresso3g" name="android_device_samsung_espresso3g" remote="mighty" revision="aosp-7.1" />
        <project path="device/sample" name="device/sample" remote="device-sample" revision="6db217d921e67d40f0abffed646f1e81c2451420" />
        <project path="hardware/ti/omap4" name="android_hardware_ti_omap4" remote="mighty" revision="stable" />
        <project path="kernel/ti/omap4" name="android_kernel_ti_omap4" remote="mighty" revision="halium" />
        <project path="vendor/samsung" name="proprietary_vendor_samsung" remote="mighty" revision="cm-14.1" />
        <project path="vendor/ti" name="proprietary_vendor_ti" remote="them" revision="master" />
    <!--   <project path="vendor/ti" name="proprietary_vendor_ti" remote="espresso" revision="aosp-7.0" /> -->
</manifest>

This is the manifest i have used for "proprietary_vendor_ti" i've tried both Unlegacy-Android and TheMuppets repo ....same result

MightyM17 commented 1 year ago

https://github.com/Halium/projectmanagement/issues/238#issuecomment-1320924158 If I remember correctly this worked for me, I'll still go through the issue to find if I updated it

Sources from somewhere around here will work as well

massimo1980 commented 1 year ago

well...after a lot of struggling...

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
        <remote  name="espresso" fetch="https://github.com/Unlegacy-Android/" />
        <remote  name="device-sample" fetch="https://android.googlesource.com/" />
        <remote  name="mighty" fetch="https://github.com/MightyM17/" />

        <project path="device/samsung/espresso" name="android_device_samsung_espresso" remote="espresso" revision="aosp-7.1" />
        <project path="device/samsung/espresso3g" name="android_device_samsung_espresso3g" remote="espresso" revision="aosp-7.1" />

        <project path="device/sample" name="device/sample" remote="device-sample" revision="nougat-release" />
        <project path="hardware/ti/omap4" name="android_hardware_ti_omap4" remote="espresso" revision="stable" />
        <project path="kernel/ti/omap4" name="android_kernel_ti_omap4" remote="mighty" revision="halium" />
        <project path="vendor/samsung" name="proprietary_vendor_samsung" remote="espresso" revision="aosp-7.1" />
        <project path="vendor/ti" name="proprietary_vendor_ti" remote="espresso" revision="stable" />
</manifest>

with this manifest finally seems that the ubuntu logo appear on screen...so the PowerVR seems to work this time. i have to manually put the "bcmdhd.ko" driver anyway, seems that isn't shipped during the "mka" process, but in the end the wifi works good. now ...let's try to load the UI 🀣

PS. still i can't understand if this file is needed or not!!! rproc remoteproc0: error -62 requesting firmware ducati-m3-core0.xem3

dmesg.txt

syslog.txt

MightyM17 commented 1 year ago

rproc remoteproc0: error -62 requesting firmware ducati-m3-core0.xem3 Thats for the M3 cores used for image processing, video decoding etc. Yeah it is needed, not for booting/ui tho.

init: finit_module for "/system/lib/modules/bcmdhd.ko" failed: File exists bcmdhd should work out of the box πŸ€”

Yes from the logs it looks like PVR booted without issues πŸŽ‰ Maybe give it some time to load for the ui

massimo1980 commented 1 year ago

i let the device loading all night 🀣 but no changes.. the strange thing is that, with this manifest, seems that this file "ducati-m3-core0.xem3" is not even builded the only one is "ducati-m3.bin" that i believe isn't even loaded.. ( at this point ) just to be sure...can u confirm me that the "revisions" in the last manifest are correct? -- in the end the only change i made was from this: <project path="vendor/ti" name="proprietary_vendor_ti" remote="espresso" revision="aosp-7.0" /> to this: <project path="vendor/ti" name="proprietary_vendor_ti" remote="espresso" revision="stable" />

MightyM17 commented 1 year ago

i let the device loading all night 🀣 but no changes.. the strange thing is that, with this manifest, seems that this file "ducati-m3-core0.xem3" is not even builded the only one is "ducati-m3.bin" that i believe isn't even loaded.. ( at this point ) just to be sure...can u confirm me that the "revisions" in the last manifest are correct? -- in the end the only change i made was from this: <project path="vendor/ti" name="proprietary_vendor_ti" remote="espresso" revision="aosp-7.0" /> to this: <project path="vendor/ti" name="proprietary_vendor_ti" remote="espresso" revision="stable" />

Hm that is pretty weird, nothing more in logs? The kernel seems fine, I'll go through the syslog again. The ducati files wouldnt affect the booting of device neither the ui, its an error yes unrealted to our issue though. ducati-m3-core0.xem3 is used in the 3.0 kernel while ducati-m3.bin is used in the 3.4 kernel. https://github.com/TheMuppets/proprietary_vendor_ti/blob/master/omap4/proprietary/vendor/firmware/ducati-m3-core0.xem3 here it is though

massimo1980 commented 1 year ago

this is better than the "The Lord of the Rings" 🀣

ok ...so i mounted the system.img file and did some cleaning cause the space wasn't enough to copy the file "ducati-m3-core0.xem3" ( i continue to think that this is the issue why the wifi driver and other files are not shipped in the system.img file.....maybe there isn't enough space ?!? )

Device booted.....same ubuntu logo that continue to run ....and after 2 minutes the device stucked🀣 no ping...no connection.... and no logs!! only way is to reboot. But after another 2 minutes...same status

dmesg_withnewducati.txt

MightyM17 commented 1 year ago

Ducati is not an issue, something else is preventing the ui to load.

Dec 28 22:53:24 ubuntu-phablet kernel: [  126.546447] request_suspend_state: sleep (0->3) at 126524566692 (2022-12-28 22:53:24.435150146 UTC)
Dec 28 22:53:24 ubuntu-phablet kernel: [  126.608062] DSSCOMP: dsscomp_early_suspend
Dec 28 22:53:24 ubuntu-phablet kernel: [  126.621643] DSSCOMP: blanked screen

I may be wrong here, but even pressing the power button to force it to load doesnt work? Maybe its time to ask in halium/ubuntu touch support chats.

massimo1980 commented 1 year ago
Dec 28 22:53:24 ubuntu-phablet kernel: [  126.546447] request_suspend_state: sleep (0->3) at 126524566692 (2022-12-28 22:53:24.435150146 UTC)
Dec 28 22:53:24 ubuntu-phablet kernel: [  126.608062] DSSCOMP: dsscomp_early_suspend
Dec 28 22:53:24 ubuntu-phablet kernel: [  126.621643] DSSCOMP: blanked screen

I may be wrong here, but even pressing the power button to force it to load doesnt work? Maybe its time to ask in halium/ubuntu touch support chats.

Nope...nothing change...i tried to touch the screen every seconds during the boot to avoid the screensaver...but nothing... i also tried to use the "halium" filesystem instead the "ubports" one ...but no luck ( don't even mount all the partition )

i've trie to ask on the IRC channel...but no answer 🀣 maybe i'll try after the festivities

MightyM17 commented 1 year ago

Not the IRC, ig they're on telegram now :/ I wonder if i should give it a go again in a few days

massimo1980 commented 1 year ago

I'll be more than happy if you'll give it a go in this way i can finally understand what i'm doing wrong 🀣 I've also tried with another tablet ( espresso-wifi ....same model without modem ) but the result it's the same:

MightyM17 commented 1 year ago

Give me a day or two, gotta download all sources and give it a go

MightyM17 commented 1 year ago

Well its stuck on the Ubuntu logo now 10 mins later it works

massimo1980 commented 1 year ago

😨 so it works for you ? well...i don't know...i've waited more then 1 hour watching that screen can u please send me "dmseg" and "syslog" ? so i can compare it with mine P.S.: halium-boot right ? not hybris also everything well with wifi driver ?

MightyM17 commented 1 year ago

IMG_20230104_190537 Proof :D

MightyM17 commented 1 year ago

https://docs.halium.org/en/latest/porting/debug-build/wifi.html#broadcom-bcmdhdhttps://docs.halium.org/en/latest/porting/debug-build/wifi.html#broadcom-bcmdhd for wifi

massimo1980 commented 1 year ago

IMG20230104144710

😭😭😭

MightyM17 commented 1 year ago

IMG20230104144710

😭😭😭

How long? Took quite a while (20 mins) for me

massimo1980 commented 1 year ago

passed about 15 minutes....i'm constantly checking on syslog but only this:

Jan  4 13:56:32 ubuntu-phablet wpa_supplicant[772]: rfkill: WLAN unblocked
Jan  4 13:56:35 ubuntu-phablet kernel: [  824.035369] hub 1-0:1.0: hub_suspend
Jan  4 13:56:35 ubuntu-phablet kernel: [  824.035430] usb usb1: bus auto-suspend, wakeup 1
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.441345] PM: suspend entry 2023-01-04 13:56:43.779445429 UTC
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.441375] PM: Syncing filesystems ... done.
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.442382] PM: Preparing system for mem sleep
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.442779] Freezing user space processes ... (elapsed 0.002 seconds) done.
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.445159] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.446807] PM: Entering mem sleep
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.446807] LDO3: No configuration
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.446838] LDO4: No configuration
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.447784] LDO1: No configuration
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.447814] LDO5: No configuration
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.447814] VANA: No configuration
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.448028] Suspending console(s) (use no_console_suspend to debug)
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.650024] usb usb1: usb auto-resume
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.667877] hub 1-0:1.0: hub_resume
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.667938] hub 1-0:1.0: hub_suspend
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.667968] usb usb1: bus suspend, wakeup 0
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.668457] dpm_run_callback(): platform_pm_suspend+0x0/0x64 returns -22
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.668457] PM: Device omap_hsmmc.4 failed to suspend: error -22
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.668487] PM: Some devices failed to suspend
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.668823] usb usb1: usb resume
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.691314] hub 1-0:1.0: hub_resume
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.692749] PM: resume of devices complete after 24.261 msecs
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.697418] PM: Finishing wakeup.
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.697448] Restarting tasks ...
Jan  4 13:56:44 ubuntu-phablet kernel: [  832.698028] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000
Jan  4 13:56:44 ubuntu-phablet wpa_supplicant[772]: rfkill: WLAN unblocked
Jan  4 13:56:44 ubuntu-phablet wpa_supplicant[772]: rfkill: WLAN unblocked
Jan  4 13:56:46 ubuntu-phablet kernel: [  835.035675] hub 1-0:1.0: hub_suspend
Jan  4 13:56:46 ubuntu-phablet kernel: [  835.035827] usb usb1: bus auto-suspend, wakeup 1
Jan  4 13:56:46 ubuntu-phablet kernel: [  835.579193] PM: suspend entry 2023-01-04 13:56:46.917232294 UTC
Jan  4 13:56:46 ubuntu-phablet kernel: [  835.579223] PM: Syncing filesystems ... done.
Jan  4 13:56:46 ubuntu-phablet kernel: [  835.582122] PM: Preparing system for mem sleep
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.592590] Freezing user space processes ... (elapsed 0.001 seconds) done.
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.594543] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.595977] PM: Entering mem sleep
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.596008] LDO3: No configuration
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.596008] LDO4: No configuration
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.596954] LDO1: No configuration
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.596984] LDO5: No configuration
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.596984] VANA: No configuration
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.597198] Suspending console(s) (use no_console_suspend to debug)
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.799163] usb usb1: usb auto-resume
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.816314] hub 1-0:1.0: hub_resume
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.816375] hub 1-0:1.0: hub_suspend
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.816406] usb usb1: bus suspend, wakeup 0
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.816833] dpm_run_callback(): platform_pm_suspend+0x0/0x64 returns -22
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.816833] PM: Device omap_hsmmc.4 failed to suspend: error -22
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.816864] PM: Some devices failed to suspend
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.817169] usb usb1: usb resume
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.839752] hub 1-0:1.0: hub_resume
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.841156] PM: resume of devices complete after 24.291 msecs
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.845794] PM: Finishing wakeup.
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.845794] Restarting tasks ...
Jan  4 13:56:47 ubuntu-phablet kernel: [  835.846435] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000
Jan  4 13:56:47 ubuntu-phablet wpa_supplicant[772]: rfkill: WLAN unblocked
Jan  4 13:56:47 ubuntu-phablet wpa_supplicant[772]: rfkill: WLAN unblocked
MightyM17 commented 1 year ago

Did you set up udev rules? https://docs.halium.org/en/latest/porting/debug-build/udev.html On another note bcmdhd module is missing in my build where is it for you?

massimo1980 commented 1 year ago

yep... followed that guide for both udev rules and wifi driver issue

MightyM17 commented 1 year ago

yep... followed that guide for both udev rules and wifi driver issue

Where is bcmdhd.ko in your device?

massimo1980 commented 1 year ago

that file wasn't inside the image builded. I had to manually copy into /lib/modules/

massimo1980 commented 1 year ago

I can't believe It .. After redoing the udev rules It works!! Mighty you are really awesome man!! Thanks again!!! 1672841497441692566629764005763

MightyM17 commented 1 year ago

that file wasn't inside the image builded. I had to manually copy into /lib/modules/

Weird why it didnt exist? You got it from out?

MightyM17 commented 1 year ago

Congrats it works!!!

massimo1980 commented 1 year ago

that file wasn't inside the image builded. I had to manually copy into /lib/modules/

Weird why it didnt exist? You got it from out?

yep...from: ./out/target/product/espresso3g/obj/KERNEL_OBJ/drivers/net/wireless/bcmdhd/bcmdhd.ko

cause i searched in every partitions and img file ...but not found so in the end i copied manually and modified the .rc script to load the driver

MightyM17 commented 1 year ago

Ah nice, next thing to fix would be bluetooth ig?

massimo1980 commented 1 year ago

Ah nice, next thing to fix would be bluetooth ig?

i'm watching right now...but seems a little bit strange

phablet@ubuntu-phablet:~$ dmesg | grep -i blue
[    0.379943] Bluetooth: Core ver 2.16
[    0.380096] Bluetooth: HCI device and connection manager initialized
[    0.380126] Bluetooth: HCI socket layer initialized
[    0.380157] Bluetooth: L2CAP socket layer initialized
[    0.380218] Bluetooth: SCO socket layer initialized
[    2.337036] Bluetooth: RFCOMM TTY layer initialized
[    2.337310] Bluetooth: RFCOMM socket layer initialized
[    2.337463] Bluetooth: RFCOMM ver 1.11
[    2.337585] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.337738] Bluetooth: BNEP filters: protocol multicast
[    2.337890] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[   20.540832] [BT] Bluetooth Power On.
phablet@ubuntu-phablet:~$
phablet@ubuntu-phablet:~$ sudo rfkill list
0: bcm4330 Bluetooth: Bluetooth
        Soft blocked: no
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
2: brcmfmac-wifi: Wireless LAN
        Soft blocked: no
        Hard blocked: no
phablet@ubuntu-phablet:~$
phablet@ubuntu-phablet:~$ hcitool dev
Devices:
phablet@ubuntu-phablet:~$
MightyM17 commented 1 year ago

No clues, maybe the wiki has some ideas?

massimo1980 commented 1 year ago

No clues, maybe the wiki has some ideas?

actually there's no module loaded for bluetooth :) that's for sure a start point https://docs.ubports.com/en/latest/porting/configure_test_fix/Bluetooth.html

MightyM17 commented 1 year ago

No clues, maybe the wiki has some ideas?

actually there's no module loaded for bluetooth :) that's for sure a start point

Ugh half the modules are just not loaded :/

massimo1980 commented 1 year ago

No clues, maybe the wiki has some ideas?

actually there's no module loaded for bluetooth :) that's for sure a start point

Ugh half the modules are just not loaded :/

maybe i've just said a BS ....seems that the chip is the same as the wifi in fact in the syslog seems to be loaded correctly

phablet@ubuntu-phablet:~$ sudo cat /var/log/syslog | grep -i tooth
Jan  3 20:50:35 ubuntu-phablet kernel: [    1.105743] Bluetooth: Core ver 2.16
Jan  3 20:50:35 ubuntu-phablet kernel: [    1.105895] Bluetooth: HCI device and connection manager initialized
Jan  3 20:50:35 ubuntu-phablet kernel: [    1.105926] Bluetooth: HCI socket layer initialized
Jan  3 20:50:35 ubuntu-phablet kernel: [    1.105957] Bluetooth: L2CAP socket layer initialized
Jan  3 20:50:35 ubuntu-phablet kernel: [    1.106018] Bluetooth: SCO socket layer initialized
Jan  3 20:50:35 ubuntu-phablet kernel: [    3.053131] Bluetooth: RFCOMM TTY layer initialized
Jan  3 20:50:35 ubuntu-phablet kernel: [    3.053314] Bluetooth: RFCOMM socket layer initialized
Jan  3 20:50:35 ubuntu-phablet kernel: [    3.053558] Bluetooth: RFCOMM ver 1.11
Jan  3 20:50:35 ubuntu-phablet kernel: [    3.053710] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Jan  3 20:50:35 ubuntu-phablet kernel: [    3.053955] Bluetooth: BNEP filters: protocol multicast
Jan  3 20:50:35 ubuntu-phablet kernel: [    3.054107] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Jan  3 20:50:36 ubuntu-phablet bluetoothd[848]: Bluetooth daemon 5.41
Jan  3 20:50:36 ubuntu-phablet bluetoothd[848]: Starting SDP server
Jan  3 20:50:36 ubuntu-phablet bluetoothd[848]: Bluetooth management interface 1.0 initialized
Jan  3 20:50:42 ubuntu-phablet NetworkManager[1183]: <info>  [1672779042.2824] Loaded device plugin: NMBluezManager (/usr/lib/arm-linux-gnueabihf/NetworkManager/libnm-device-plugin-bluetooth.so)
Jan  3 20:50:42 ubuntu-phablet URfkill[776]: Setting device 0 (BLUETOOTH) to unblocked
Jan  3 20:50:42 ubuntu-phablet URfkill[776]: set_soft: Setting BLUETOOTH to unblocked
Jan  3 20:50:42 ubuntu-phablet kernel: [   21.501281] [BT] Bluetooth Power On.
Jan  3 20:50:42 ubuntu-phablet URfkill[776]: device_changed_cb: bcm4330 Bluetooth
MightyM17 commented 1 year ago

Have a look at the wiki i linked above, maybe that'll make it work

massimo1980 commented 1 year ago

I searched in the Halium's docs but only this one: https://docs.halium.org/en/latest/porting/common-system-build-errors.html?highlight=bluetooth#undefined-or-missing-bluetooth-headers don't think that it's our case cause as i said, seems that the bt module is loaded at boot following this one, instead: https://docs.ubports.com/en/latest/porting/configure_test_fix/Bluetooth.html says that there's this file /etc/init/bluetooth-touch-android.conf where you can configure adaptations for you bt thourgh HCI tools, this is an example for Nexus 6P https://github.com/Flohack74/android_device_huawei_angler/blob/halium-7.1/ubuntu/bluetooth/bluetooth-touch-android.conf i've found this old one from a repo: https://github.com/yacuken/droid-config-espresso3g/blob/master/sparse/lib/systemd/system/hciattach.service

Following this one, i've tried to adapt the command to my device:

root@ubuntu-phablet:~# /usr/bin/hciattach -f /android/vendor/firmware ttyO1 bcm43xx 4000000 noflow sleep /android/efs/bluetooth/bt_addr
bcm43xx_init
Patch not found, continue anyway
Set BDADDR UART: /android/efs/bluetooth/bt_addr
Incorrect bdaddr
Set Controller clock (1)
Set Controller UART speed to 4000000 bit/s
Can't set line discipline: Invalid argument
Can't initialize device: Invalid argument
root@ubuntu-phablet:~#
root@ubuntu-phablet:~# /usr/bin/hciattach -f /android/vendor/firmware ttyO0 bcm43xx 4000000 noflow sleep /android/efs/bluetooth/bt_addr
bcm43xx_init
Initialization timed out.

with no luck...

EDIT: even "bluetoothhctl" seems not working:

root@ubuntu-phablet:~# /usr/bin/bluetoothctl power off
[bluetooth]# nnect to bluetoothd...

and get stuck there...

MightyM17 commented 1 year ago

What does dmesg say? The old repo looks like SailfishOS lol

massimo1980 commented 1 year ago

What does dmesg say? The old repo looks like SailfishOS lol

phablet@ubuntu-phablet:~$ dmesg | grep -i blue [ 0.379943] Bluetooth: Core ver 2.16 [ 0.380096] Bluetooth: HCI device and connection manager initialized [ 0.380126] Bluetooth: HCI socket layer initialized [ 0.380157] Bluetooth: L2CAP socket layer initialized [ 0.380218] Bluetooth: SCO socket layer initialized [ 2.337036] Bluetooth: RFCOMM TTY layer initialized [ 2.337310] Bluetooth: RFCOMM socket layer initialized [ 2.337463] Bluetooth: RFCOMM ver 1.11 [ 2.337585] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 2.337738] Bluetooth: BNEP filters: protocol multicast [ 2.337890] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 20.540832] [BT] Bluetooth Power On.

MightyM17 commented 1 year ago

What does dmesg say? The old repo looks like SailfishOS lol

phablet@ubuntu-phablet:~$ dmesg | grep -i blue [ 0.379943] Bluetooth: Core ver 2.16 [ 0.380096] Bluetooth: HCI device and connection manager initialized [ 0.380126] Bluetooth: HCI socket layer initialized [ 0.380157] Bluetooth: L2CAP socket layer initialized [ 0.380218] Bluetooth: SCO socket layer initialized [ 2.337036] Bluetooth: RFCOMM TTY layer initialized [ 2.337310] Bluetooth: RFCOMM socket layer initialized [ 2.337463] Bluetooth: RFCOMM ver 1.11 [ 2.337585] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 2.337738] Bluetooth: BNEP filters: protocol multicast [ 2.337890] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 20.540832] [BT] Bluetooth Power On.

Everything seems fine here, sorry wont be working a lot on halium as Oreo is the focus now :D But, as the guide suggests you'll have to do some backporting of drivers to our 3.4 kernel. The BCM4430 chipset used is quite common so you should be able to get similar devices in halium and look at how they made bluetooth work