AsteroidOS IRC Logs

Privacy Policy

Search:

01:21:52kidoI think I digged as far as one possibly can on the bluetooth/uart/dma/wakelock/battery issue. I ended up reading the broadcom's and qualcomm's respective IPs datasheets and it appears I don't get correct "host wake" IRQs from the BT controller because brcm_patchram_plus doesn't provide a full low power mode initialization sequence. once again this part is implemented in the android's userspace with the
01:21:53kidolpm_param structure of this file http://crypto.nknu.edu.tw/AOSP/Android6/hardware/broadcom/libbt/src/hardware.c sent with hw_lpm_enable(turn_on)
01:23:32kidobasically we can continue using brcm_patchram_plus without --enable_lpm, the BT chip will never enter sleep mode, the host wake IRQ line will never be asserted, the msm_serial_hs_dma wakelock will never be released and the CPU will never enter sleep mode
01:24:34kidoor we can try to reproduce more code from libbt-vendor inside brcm_patchram_plus and see if we can configure the BT chip correctly so that the host wake IRQ is correctly asserted and nitrous/bluesleep can work accordingly
01:28:28kidoone very last alternative I would have had in mind comes from the qualcomm's doc https://developer.qualcomm.com/qfile/28819/lm80-p0436-5_peripherals_programming_guide.pdf and would have been to use "in band sleep" instead of "out of band sleep" but it means we would loose every first byte of an RX transaction, they seem to be guessing it from TI's HCILL protocol but on asteroid with BLE we can not predict
01:28:30kidothe lost byte so it's unsable
01:28:36kidounusable*
01:30:49kidomore references on the IRQ in http://www.cypress.com/file/298081/download with BT_HOST_WAKE
01:49:45kidoone very last alternative would be to integrate bluedroid instead of bluez but it'd be a lot of work
01:52:44kidoat this point the wisest decision is to classify the issue, document the problem properly, give up on the current asteroid-btsyncd, asteroidossync asteroid-weather, asteroid-music, dory, anthias and move everything to wifi
02:02:35kidoactually only a few parts of asteroidossync and asteroid-btsyncd will need to be rewritten (they were buggy and needed to be rewritten anyway) and dory and anthias will still be able to fallback to BT PAN (the battery problem will still be there but at least they will be kind of supported)... Now, time to drink and forget this horrible bt stack
02:04:04Koraklol, sorry that didn't go so well for you
02:04:20kido:)
02:04:30Korakdoes sound like you have pretty well beatten that issue to death
02:06:26Korakand so I take it this issue is with bluetooth on all watches?
02:06:27kidowell, ble was a bad decision on so many levels. everything is buggy and patched from the kernel stack to the user apps with everything in between
02:06:52kidono it's only a problem on qu
02:07:05kidosmartwatches with qualcomm soc and broadcomm bt
02:07:45Korakah, ok
02:07:46kidobut it's pretty much every android wear watch
02:08:21kidosony sw3 has a broadcom soc so the problem shouldn't be there but it also has wifi so let's use it instead
02:09:15Korakso useing wifi to do ad-hoc network and send notifications that way?
02:10:31kidoyarp, I still need to think about it as I just gave up on bt and I'm not extremely proficient with network
02:10:53kidoany suggestion (and help) is welcome
02:11:19kidoI have to admit my motivation is pretty low right now... :|
02:11:28KorakYeah, I will let you know if I have any ideas, not really sure what I think of that currently
02:11:50KorakWell, don't let it get you down.
02:12:33KorakAsteroid is a great system so far. Bound to be a bump or two along the way.
02:13:26Korakand Hey, document it all out like you planned, that will give someone a head start, who knows, might have someone come along willing to write a custom bluetooth for it.
02:14:40kidoactually I feel bad for having spent months working in a wrong direction and now the dory users won't get proper support because of an incorrect decision
02:15:20kidobut yes I assume I don't have much choice
02:15:29KorakNah, doing stuff like this sometimes you go down the wrong path,
02:15:51KorakAnd, you did learn a lot doing it
02:15:56Korakso it wasn't a waste
02:16:09kidowell, enough for today, I need to get some sleep now :)
02:16:19KorakYep, me too
02:16:42Korakyou get some sleep, things always look better after good night sleep
07:59:23locusfWow thats some epic digging
14:34:12kidoholy guacamole!!
14:34:31kidoladies and gentlemen: result of more than 100 hours of work
14:34:33kido- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
14:34:35kido+ 0x01, 0x0A, 0x0A, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
14:34:44kidoand battery life is saved
14:36:18SylvieLorxuDamn...
14:36:25SylvieLorxuThat fixed the suspending issues?
14:37:10kidoyes, I still need to check everything in depth but the interrupts are correct now and the bt's clock goes off now
14:37:38dadukecongrats, that's awesome!
14:38:44kidocan't believe it, I had just given up and I woke up with this in mind :)
14:38:45SylvieLorxuHow the hell did you even find this out
14:39:00kidoI'll document it properly
14:41:32danialbehzadikido: Miracle! :D
14:42:08kido:D
14:44:29kidoyes I can confirm it fully works, watch suspends and I can connect from my phone
14:44:40kidolet's patch it properly now
15:22:06AsteroidBot[brcm-patchram-plus] FlorentRevest pushed 1 commit(s) to master: https://git.io/vDiEk
15:22:06AsteroidBotFlorent Revest: Support per-device Low Power Mode configuration (https://git.io/vDiEI)
15:23:49AsteroidBot[meta-asteroid] FlorentRevest pushed 1 commit(s) to master: https://git.io/vDiE0
15:23:49AsteroidBotFlorent Revest: brcm-patchram-plus: Bump SRCREV (https://git.io/vDiEE)
15:29:53bencord0W. T. F
15:36:04AsteroidBot[meta-anthias-hybris] FlorentRevest pushed 2 commit(s) to master: https://git.io/vDizW
15:36:05AsteroidBotFlorent Revest: brcm-patchram-plus: Select anthias' Low Power Mode configuration (https://git.io/vDizl)
15:36:05AsteroidBotFlorent Revest: brcm-patchram-plus: Enable LPM (https://git.io/vDiz8)
15:36:25AsteroidBot[meta-dory-hybris] FlorentRevest pushed 2 commit(s) to master: https://git.io/vDizE
15:36:25AsteroidBotFlorent Revest: brcm-patchram-plus: Select dory's Low Power Mode configuration (https://git.io/vDizu)
15:36:25AsteroidBotFlorent Revest: brcm-patchram-plus: Enable LPM (https://git.io/vDizz)
15:36:45AsteroidBot[meta-bass-hybris] FlorentRevest pushed 2 commit(s) to master: https://git.io/vDizV
15:36:45AsteroidBotFlorent Revest: brcm-patchram-plus: Select bass' Low Power Mode configuration (https://git.io/vDizw)
15:36:45AsteroidBotFlorent Revest: brcm-patchram-plus: Enable LPM (https://git.io/vDizr)
15:37:05AsteroidBot[meta-sparrow-hybris] FlorentRevest pushed 1 commit(s) to master: https://git.io/vDizP
15:37:05AsteroidBotFlorent Revest: brcm-patchram-plus: Select sparrow's Low Power Mode configuration (https://git.io/vDizX)
15:37:22AsteroidBot[meta-tetra-hybris] FlorentRevest pushed 1 commit(s) to master: https://git.io/vDiz9
15:37:22AsteroidBotFlorent Revest: brcm-patchram-plus: Select tetra's Low Power Mode configuration (https://git.io/vDizH)
15:40:07AsteroidBot[meta-sturgeon-hybris] FlorentRevest pushed 2 commit(s) to master: https://git.io/vDigt
15:40:08AsteroidBotFlorent Revest: brcm-patchram-plus: Select sturgeon' Low Power Mode configuration (https://git.io/vDigq)
15:40:08AsteroidBotFlorent Revest: brcm-patchram-plus: Enable LPM (https://git.io/vDigm)
15:44:01AsteroidBot[meta-dory-hybris] FlorentRevest pushed 1 commit(s) to master: https://git.io/vDig9
15:44:02AsteroidBotFlorent Revest: README-system-dir: Adds an instruction for the execution permission of /system/bin/* which could oth (https://git.io/vDigH)
16:23:10KorakWOOT!!
16:23:24KorakWay to go kido
16:24:48KorakI am exctied to build that and give it a go. I have been running a build with bluetooth broken, been enjoying the batterylife but missing my notifications
16:25:48Stskeepskido: congrats
16:26:01kido:)
16:26:11kidoKorak: hold on, there is still a kernel patch coming
16:30:32KorakCool, I can't do a build till later today anyways.
16:31:11KorakStuck at work with this whimpy MacBook. Building will have to wait till I get home :)
17:08:49AsteroidBot[meta-bass-hybris] FlorentRevest pushed 1 commit(s) to master: https://git.io/vDiHe
17:08:50AsteroidBotFlorent Revest: linux-bass: Patches the bluesleep driver to use kernel's HCI events (https://git.io/vDiHf)
17:09:50AsteroidBot[meta-dory-hybris] FlorentRevest pushed 1 commit(s) to master: https://git.io/vDiHE
17:09:50AsteroidBotFlorent Revest: linux-dory: Patches the bluesleep driver to use kernel's HCI events (https://git.io/vDiHu)
17:09:57kidonow it should be fine
17:11:39Korakawesome, I am excited to try that out, will have to kick off a build soon as I get to my desktop.
17:11:50kidocool, keep me updated
17:12:59KorakWill do, I have also been reading up on things and studying the app code, from what I understand so far it does look like some pretty big changes need to be made
17:13:16kidodefinitely
17:14:10Korakplan on playing with some of that and will let you know if I come up with anything useful
17:17:34kidosure, keep me updated
17:17:53KorakSense my girlfriend is about to go back to school I am probably going to find myself with lots of time sitting in a library soon
17:18:01kido:)
17:18:14Korakshe really needs to get a license :)
17:24:14sigma110_kido: congrats.. thanks for all your hard work. Super excited to try this out on bass
17:25:05SylvieLorxuI hope someone else will make a dory build, the only device I can build on is an old x200 and that's not pleasant lol
17:25:37KorakSylvieLorxu: I have a Dory and will be making a build this evening
17:26:12SylvieLorxuNice
17:26:21kidosigma110_: you're welcome, the harder the problem, the more rewarding the solution is :)
17:55:10TheAppleManw00t!
19:12:05nielsthoSylvieLorxu, Korak I almost finished building the image (dory)
19:12:22nielsthoi will post an link when finished
19:12:47nielsthoit's at 97% at the moment
19:15:41SylvieLorxuNice :)
19:16:08kidoI lost 5% in two hours with bluetooth on on bass
19:17:27kido2% in two hours with bluetooth off on dory but this should be checked again
19:28:56Koraksweet
19:30:40KorakWe should setup a place for nightly builds sometime.
19:31:09nielsthoindeed. it's uploading at the moment
19:31:56kidoKorak: ping Nokius
19:32:16kidohe already has one but it's broken for some reason
19:33:28nielsthohttp://nielstholenaar.nl/asteroid-dory.tar.gz
19:33:44nielstho036cd327b3aeb76cbc400db735eef7619cc3bde6 asteroid-dory.tar.gz
19:33:53nielsthosha1checksum
19:39:06KorakWoot
19:39:40Koraknow to see if my cheap knockoff charge cradle will handle me pushing this :)
19:45:35Ebedorianhello
19:45:39EbedorianI have a question
19:45:57EbedorianI'd like to port the asteroidOS to this watch
19:46:16Ebedorianhttps://www.amazon.com/gp/product/B01C3YF9OW/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
19:46:34EbedorianI'm open to suggestions and advice
19:47:00EbedorianI'm not a programmer, just a beginner linux enthusiast looking for a challenging project since I am currently unemployed
19:47:39KorakThat one will be a challenge.
19:48:16EbedorianHmmm, it is because it's Chinese manufactured or because it doesn't run linux
19:48:36KorakIt is using a Mediatek SoC
19:48:50Ebedorianoh ok
19:49:10EbedorianWell, I guess I have to start somewhere, and this seems like the best place to start
19:49:11KorakThe Chinese manufaturers have nasty habit of not releasing the source code
19:51:00EbedorianOk, so what about doing a whipe and starting from the ground up? Not possible either I guess?
19:52:30SylvieLorxuThanks nielstho
19:52:48KorakAsteroid uses drivers and parts from android
19:52:52nielsthoSylvieLorxu: yw
19:53:59KorakI have found this though https://android.googlesource.com/kernel/mediatek/
19:54:33Korakmediatek did realease some stuff, so might be able to find tha things you need in there
19:55:29Korakhttps://asteroidos.org/wiki/porting-guide/
19:55:42EbedorianThanks, much appreciated
19:56:14KorakYour welcome, and good luck with it
19:56:17atxThere was also some RE work done on Mediatek in https://www.bunniestudios.com/blog/?p=4297
19:56:22atxNot sure how relevant it is though
19:56:59KorakIt would certainly be interesting to have Asteroid running on these watches as they are cheap and easy to get.
19:57:46EbedorianYeah, that's why I wanted to try it. But because I haven't programmed anything in over 15 years, I don't even know where to begin.
19:58:17KorakI had thought about trying it myself, but I know I have a lot of other things I should work on and learn about first
19:59:23EbedorianGiven the trend with Raspberry Pi, I think mobile platform + open source + cheap hardware = next big thing
19:59:45dunxit was called android :(
19:59:59dunxcheap hardware and open source, but not freedom :(
20:00:04Ebedorianlol
20:00:10EbedorianLOL
20:00:32KorakI really hope open systems can make a breakthrough into more mainstream but still a long ways to go
20:01:00Korakafter all, many schools are just going crazy with these "awseome chromebooks!"
20:02:11KorakI think most people are happy being blissfully ignorant and using closed systems
20:03:34KorakI was for many years, but then noticed the trend especially last few years that more and more systems are being built to put the company first and screw the end user.
20:04:34KorakWindows 10 home is pretty much "Windows 10 beta tester edition"
20:05:58EbedorianSo you're saying there
20:06:25Ebedorianthere's no point to DIY projects using the tools available?
20:07:36EbedorianI mean, the android SDK is free, tons of code is available on the internet. I mean in spite of the closed systems, we have the tools to make anything that we want without having to depend on closed systems, if you don't want to.
20:08:28KorakEbedorian: I think the issue is that more and more Google is trying to close the system. It keeps pulling things into the closed areas.
20:09:26KorakLike encuraging people to talk with google play for GPS data instead of talking to the GPS chip. By doing that suddenly you remove play store and you have broken a ton of apps.
20:12:05KorakAnd I for one have found google to be WAY beyond what I consider ok in terms of their snooping. Making note of the routs I use to drive around town, pushing ads based on my location, scanning e-mails to tailor ads..... It is beyond creepy when you start looking into how much they gather about you.
20:13:37KorakActually big part of why I hang out here, I wanted a smart watch but refused to have google breathing down my neck.
20:37:11EbedorianOh, not I understand. I'm not even aware of how much they snoop, how do you check that?
20:37:19Ebedorian*now
20:38:56dunxwe can get rid of google but not qualcomm or intel or mediatek though
20:50:45Korakhttps://privacy.google.com/take-control.html has a lot of it.
20:52:40dadukekido: I just compiled and installed your breakthrough build, but I cannot turn on BT... reboot doesn't fix it. Used to work with a ~3day old build
20:52:47KorakI just noticed when google now came out it sarted telling me my "estimated drive home" time, not only did it do that but it caculated it using the weird backroad way I normally took to get home, I then later noticed when going to pick up prescriptions I kept having my phone ding and when I looked at it there would be a notification for "Why don't you download the CVS app"
20:54:57Korakdaduke: you on Dory?
20:54:59kidohi Ebedorian
20:55:11dadukeKorak: yes (sorry forgot to add)
20:55:39kidoEbedorian: porting asteroid to this kind of watch won't be possible, they are only able of running "Nucleus" not a complete Linux system
20:57:27kidodaduke: try to systemd mask patchram and after reboot run /usr/bin/brcm_patchram_plus -d --enable_lpm --enable_hci --no2bytes --patchram /vendor/firmware/BCM20715A1.hcd /dev/ttyHS99
20:58:00kidodaduke: at some point it will stop outputting things and "hciconfig" will show you a hci0 device
20:58:24dadukekido: I do this via adb shell?
20:58:30kidoI think this service is started too early
20:58:41kidoyes
20:59:18kidoto check if the patches work run dmesg | grep CLOCK and you should see some HSUART CLOCK OFF from time to time
21:00:18dadukeneed to find the systemd service first...
21:01:45daduke/lib/systemd/system/patchram.service probably
21:04:27dadukestuck after Done setting line discpline now...
21:07:13kidoyes tha'ts what's supposed to happen
21:10:34daduke^-C then, but hciconfig shows no hci0
21:11:46kidook this is weird, what does rfkill list says ?
21:21:03daduke0: brcm_Bluetooth_rfkill: Bluetooth, Soft blocked: no, Hard blocked: no
21:23:38dadukejust rebooted and tried again, same
21:33:08TheAppleManisn't patchram supposed to stay running in the background?
21:33:12dadukeflashed Asteroid again and tried from scratch, now brcm_patchram_plus loops in 'writing 01 03 0c 00' forever
21:35:38kidoTheAppleMan: yes, it is
21:38:05TheAppleMan^C should be killing it
21:38:26kidoI didn't even noticed this part
21:38:31kidonotice*
21:39:03kidodaduke: when I was saying it was what's supposed to happen I meant that hciconfig should stay blocked
21:40:00dadukekido: oh right. well now I have to get back to that state first..
21:41:35kidostaying blocked on 'writing 01 03 0c 00' is also something that happens from time to time and I have truely no idea how to fix it
21:43:07daduke2 reboots later I can flash again
21:43:25dadukeok so ^-Z instead of -C
21:44:01dadukehci0 check
21:44:33dadukeBluetooth on check, thanks guys
21:45:05kidogood :) the fact that patchram is ran at a wrong time is also a problem but a different one
21:45:23dadukethe Android app crashes tho, but I guess that's known
21:45:43kidowhen you tap on the notification?
21:46:00dadukeupon connect
21:46:24kidodo you have logcat somewhere?
21:46:27dadukehasn't been working for some days now
21:47:06dadukeI do not, but I can install it
21:49:40kidoI can confirm again on a fresh dory build that everything works by starting brcm-patchram-plus manually
21:49:56kidofor some reasons I don't need to start brcm-patchram-plus manually on bass
21:50:30TheAppleMandid i do something special? :S
21:50:32kidobut I think I will spend some days far from bluetooth-related problems
21:50:47dadukekido: ok I'll give you a break
21:51:04dadukewell deserved
21:51:50kidoTheAppleMan: well, dory has After=dev-ttyHS99.device and bass doesn't, but I would have thought that this line solved the problem instead of causing it
21:52:03kidoI'll try to remove it from dory's service and see if the service starts later in the boot process
21:52:08kidodaduke: :)
21:54:45kidoit looks like removing this line solves the problem, I really don't get why
21:56:07kidothis chip really doesn't make any sense... but one more problem solved (apparently)
21:57:10AsteroidBot[meta-dory-hybris] FlorentRevest pushed 1 commit(s) to master: https://git.io/vDP69
21:57:10AsteroidBotFlorent Revest: patchram: Don't start service right after /dev/ttyHS99 which seems to solve some race condition lead (https://git.io/vDP6H)
21:58:01AsteroidBot[meta-anthias-hybris] FlorentRevest pushed 1 commit(s) to master: https://git.io/vDP6N
21:58:01AsteroidBotFlorent Revest: patchram: Don't start service right after /dev/ttyHS0 which seems to solve some race condition leadi (https://git.io/vDP6A)
21:58:30AsteroidBot[meta-sturgeon-hybris] FlorentRevest pushed 1 commit(s) to master: https://git.io/vDP6p
21:58:30AsteroidBotFlorent Revest: patchram: Don't start service right after /dev/ttyHS99 which seems to solve some race condition lead (https://git.io/vDP6h)
23:10:59KorakI am having good luck with the new build so far. Only issues I have had playing around I think are with the phone app doing silly things.
23:20:00KorakJust found out that you should really dissconnect your watch before playing with fdroid. That thing spams notifications like crazy.
23:33:02kidogood :)