OESF Portables Forum

Model Specific Forums => Cosmo Communicator => Cosmo Communicator - Linux => Topic started by: manthis on March 16, 2020, 06:20:25 pm

Title: Newly installed Debian: no Bluetooth
Post by: manthis on March 16, 2020, 06:20:25 pm
Hi,

I have installed Debian provided by Planet Computers last night but unfortunately I can’t get the Bluetooth on to connect my mouse. Am I the only one to have this issue?

Another question: I hate KDE. Is it possible to install Gnome pour any other graphical environment ?

Thanks
Title: Newly installed Debian: no Bluetooth
Post by: vldmr on March 16, 2020, 06:46:11 pm
Quote from: manthis
Another question: I hate KDE. Is it possible to install Gnome pour any other graphical environment ?

Usually with debian on any device with correctly configured apt sources you should be able to install any graphical environment. Just use you favorite package manager. I myself am not fond of either kde or gnome, I think suckless should work the best
Title: Newly installed Debian: no Bluetooth
Post by: Kamikaze Comet on March 17, 2020, 12:46:37 am
This version of Linux we get is more of a proof of concept than an actual usable OS. It's more like "see! we have linux working on our phone" thing. From my understanding, it's missing drivers for a lot of hardware. I do not recommend using it extensively because the UI can burn images on our OLED screen. At this stage, I don't see the battery management turning off the screen on it's own. The screen is on even if you close the phone.
Title: Newly installed Debian: no Bluetooth
Post by: Bernhard on March 17, 2020, 08:01:34 am
Quote from: Kamikaze Comet
This version of Linux we get is more of a proof of concept than an actual usable OS. It's more like "see! we have linux working on our phone" thing. From my understanding, it's missing drivers for a lot of hardware. I do not recommend using it extensively because the UI can burn images on our OLED screen. At this stage, I don't see the battery management turning off the screen on it's own. The screen is on even if you close the phone.

I thought only the cover display is OLED? The cover display does not work at all with Debian currently.

It is indeed an issue that Debian can't be properly suspended at the moment, but I'm using Debian quite happily for hacking a bit Elixir at the moment.
Title: Newly installed Debian: no Bluetooth
Post by: gemini_user_j on March 17, 2020, 11:05:18 am
Quote from: manthis
Hi,

I have installed Debian provided by Planet Computers last night but unfortunately I can’t get the Bluetooth on to connect my mouse. Am I the only one to have this issue?
Hey, have you tried the following which worked for my Debian on Gemini?
https://www.oesf.org/forum/index.php?showtopic=35142 (https://www.oesf.org/forum/index.php?showtopic=35142)
Title: Newly installed Debian: no Bluetooth
Post by: mibry on March 17, 2020, 06:52:30 pm
Quote from: gemini_user_j
Quote from: manthis
Hi,

I have installed Debian provided by Planet Computers last night but unfortunately I can’t get the Bluetooth on to connect my mouse. Am I the only one to have this issue?
Hey, have you tried the following which worked for my Debian on Gemini?
https://www.oesf.org/forum/index.php?showtopic=35142 (https://www.oesf.org/forum/index.php?showtopic=35142)
Wont work, the cosmo gemian linux doesn't have bluetooth support in the kernel at present.
Title: Newly installed Debian: no Bluetooth
Post by: gemini_user_j on March 18, 2020, 10:43:11 am
Quote from: mibry
Quote from: gemini_user_j
Quote from: manthis
Hi,

I have installed Debian provided by Planet Computers last night but unfortunately I can’t get the Bluetooth on to connect my mouse. Am I the only one to have this issue?
Hey, have you tried the following which worked for my Debian on Gemini?
https://www.oesf.org/forum/index.php?showtopic=35142 (https://www.oesf.org/forum/index.php?showtopic=35142)
Wont work, the cosmo gemian linux doesn't have bluetooth support in the kernel at present.
Sounds like an uphill battle, good luck.
Title: Newly installed Debian: no Bluetooth
Post by: mibry on March 18, 2020, 12:30:49 pm
Quote from: gemini_user_j
Quote from: mibry
Quote from: gemini_user_j
Quote from: manthis
Hi,

I have installed Debian provided by Planet Computers last night but unfortunately I can’t get the Bluetooth on to connect my mouse. Am I the only one to have this issue?
Hey, have you tried the following which worked for my Debian on Gemini?
https://www.oesf.org/forum/index.php?showtopic=35142 (https://www.oesf.org/forum/index.php?showtopic=35142)
Wont work, the cosmo gemian linux doesn't have bluetooth support in the kernel at present.
Sounds like an uphill battle, good luck.

I hope not. Given the way the gemini linux development went I think that the guys working on the kernel and gemian should be able to get it all running. Just going to take time. We need Planet to release the new boot loader which will allow the modem to be accessible by the kernel which should mean bt and the phone modem will accessible.
Title: Newly installed Debian: no Bluetooth
Post by: Kamikaze Comet on March 19, 2020, 04:30:50 pm
Quote from: Bernhard
Quote from: Kamikaze Comet
This version of Linux we get is more of a proof of concept than an actual usable OS. It's more like "see! we have linux working on our phone" thing. From my understanding, it's missing drivers for a lot of hardware. I do not recommend using it extensively because the UI can burn images on our OLED screen. At this stage, I don't see the battery management turning off the screen on it's own. The screen is on even if you close the phone.

I thought only the cover display is OLED? The cover display does not work at all with Debian currently.

It is indeed an issue that Debian can't be properly suspended at the moment, but I'm using Debian quite happily for hacking a bit Elixir at the moment.

Wait, only the CoDi is OLED? The black level looks pretty good. Well, I guess I don't have to worry about burning images on it anymore.
But how such a small AMOLED on the CoDi consumes so much battery? It is insane.
Title: Newly installed Debian: no Bluetooth
Post by: Bernhard on March 23, 2020, 10:03:16 am
Quote from: Kamikaze Comet
Wait, only the CoDi is OLED? The black level looks pretty good. Well, I guess I don't have to worry about burning images on it anymore.
But how such a small AMOLED on the CoDi consumes so much battery? It is insane.

I think the display itself consumes almost no battery. But the CoDi is a computer on its own. I do not know the details about the software on it but if regulary polls the main computer for events then this could explain the battery usage. The good news is that this software can be optimized so Planet can supply us with less battery hungry updates for the CoDi software.
Title: Re: Newly installed Debian: no Bluetooth
Post by: manthis on August 02, 2020, 03:44:11 pm
Just updated to v2 and still no Bluetooth. Probably still not in kernel. Has anyone managed to?
Title: Re: Newly installed Debian: no Bluetooth
Post by: drbytes on August 03, 2020, 04:48:03 am
There is a mediatek module but the kernel does not have the appropriate drivers compiled, either in-kernel or as a module. I tried last week but gave up due to time constraints (actual development work that needed to be done). Might try later this week, it's definitely possible, just need to get into it.
Title: Re: Newly installed Debian: no Bluetooth
Post by: manthis on August 03, 2020, 05:58:48 am
Yep I actually saw that too after I posted here. I will give it a try if I can but I also think it’s doable. Just need some time to do it. And I will cause I really need it. Will keep you posted if there is some progress.
Title: Re: Newly installed Debian: no Bluetooth
Post by: kaim on August 25, 2020, 07:32:19 am
Any news with Blietooth?

Could one may be drop a link to that Mediateck module so I can also have a look at it...
Title: Re: Newly installed Debian: no Bluetooth
Post by: TheNetEffect on March 17, 2021, 07:37:16 am
I am also looking for the bluetooth support - still seems missing
Title: Re: Newly installed Debian: no Bluetooth
Post by: LinuxGuy on April 17, 2021, 01:15:07 am
Any news on bluetooth? Thanks for any hint!
Title: Re: Newly installed Debian: no Bluetooth
Post by: SL on April 22, 2021, 11:44:06 am
Yeah, bluetooth is definitely missing from the current kernel. To see what is in the kernel use the following command:

Code: [Select]
sudo cat /proc/config.gz | gunzip > mykernel.confhttps://serverfault.com/questions/51032/how-do-i-check-what-kernel-options-were-compiled-without-looking-at-boot-config (https://serverfault.com/questions/51032/how-do-i-check-what-kernel-options-were-compiled-without-looking-at-boot-config)

I managed to compile the kernel (on device) with bluetooth enabled, haven't been able to run it yet though :(. If I make any more progress I will report back.
Title: Re: Newly installed Debian: no Bluetooth
Post by: SL on April 22, 2021, 12:30:17 pm
I have installed Debian provided by Planet Computers last night but unfortunately I can’t get the Bluetooth on to connect my mouse. Am I the only one to have this issue?
I run my mouse on the Cosmo using barrier
Code: [Select]
sudo apt install barrierand use my windows computer as the barrier server. Debian on Cosmo without the mouse is a real pita.

https://www.oesf.org/forum/index.php?topic=36493.0 (https://www.oesf.org/forum/index.php?topic=36493.0)
Title: Re: Newly installed Debian: no Bluetooth
Post by: SL on May 05, 2021, 05:30:47 pm
Ya'll need to install the latest version (v4) of cosmo linux, it has bluetooth enabled https://support.planetcom.co.uk/index.php/Linux_for_Cosmo (https://support.planetcom.co.uk/index.php/Linux_for_Cosmo).
Title: Re: Newly installed Debian: no Bluetooth
Post by: cam1965 on May 09, 2021, 05:57:10 pm
Ya'll need to install the latest version (v4) of cosmo linux, it has bluetooth enabled https://support.planetcom.co.uk/index.php/Linux_for_Cosmo (https://support.planetcom.co.uk/index.php/Linux_for_Cosmo).

Thank you.
According to  PC bluetooth has problems :

Gemian v4 Notes
---------------

This Gemian release expects the latest android version to be installed (2021-03-02 - v25).

This release is mostly about moving from the droid-hal-cosmopda-bin to the lxc-android packages.

The main reason for this is to be able to support the same amount of hardware as UBPorts, and reduce the amount of code on the device that is not publicly reviewable, for more details see: https://github.com/gemian/gemian/wiki/UpdateAndroidSystemLXCImage#cosmo-communicator

Gemian usually supports the usual Debian apt update/upgrade path, but in this case we strongly recomend a fresh install as the removal of droid-hal-cosmopda-bin will also freeze your X11 session, disable WiFi and probably leave you in a right pickle. Further details: https://github.com/gemian/gemian/wiki/UpdateAndroidSystemLXCImage#updates

As we are suggesting a re-install we've also taken the opportunity to improve the user experience. During installation a menu gives you the option to select the HW Keyboard inside your device and your local time zone. On first boot these will configure your Gemian installation, and be remembered for future installations. The same process that set the keyboard and timezone also re-randomises your machine ID and ssh host info to avoid all Cosmo's with the same install version appearing as the same device. If you have a dual language keyboard the default will probably be your native language rather than the latin/english required for the default login password so you will need to press both left&right shift keys to swap before being able to login.

The camera-app as used on the Gemini is now also working on the Cosmo. Though if you still have the old /vendor partition due to not having updated to the latest Android release it will not work.

We've moved from the gemian-lock to kscreenlocker to give a more Plasma like experience and added the quick shortcuts familiar to Gemini users (where they controled connman) to now work with Network Manager as on the Cosmo, you can now turn on/off some features more easily from the lock screen, Ctrl-W (WiFi), Ctrl-B (BT), Ctrl-C (Cellular).

Bluetooth is known to be problematic, scan+pair+trust work but connections almost always fail.

Previously we had both repowerd and powerdevil trying to control sleep timing causing the screen to flick off/on and then a bit later off, we've encouraged them to play more nicely together. Though overall powermanagement is still a work in progress, currently Cosmo battery drain is ten times worse compared to Gemini.

This release also includes Android side Kernel fixes to 2021-02-06 (v25).
Title: Re: Newly installed Debian: no Bluetooth
Post by: dnapla on May 31, 2021, 08:39:33 am
Starting debugging the bluetooth - the following appears to help for me :- (all V4 install)

 
Managed to get consistent connections with a Pixel4 and a BT Headset (not saying they operate right - just that connections persist ok on reboots etc)

If this works for you - please post here.... also if you find any additonal items that help fix further.   
   
Title: Re: Newly installed Debian: no Bluetooth
Post by: cam1965 on June 02, 2021, 12:07:46 pm
Starting debugging the bluetooth - the following appears to help for me :- (all V4 install)

 
  • Edit /usr/bin/droid/bluebinder_post.sh -
        Change 644 to 755 - as its a directory I think we need to access files within...
  • Add in to /etc/pulse/default.pa.gemian 
        load-module module-bluetooth-discover
        load-module module-bluetooth-policy
  • Add in to /etc/dbus-1/system.d/ofono.conf
       <policy user="pulse">
        <allow send_destination="org.ofono"/>
      </policy>

Managed to get consistent connections with a Pixel4 and a BT Headset (not saying they operate right - just that connections persist ok on reboots etc)

If this works for you - please post here.... also if you find any additonal items that help fix further.   
   

Hi.
Thank you again.
I did the test following your instructions and the behaviour is the same as yours. Consistent connections in my old macbook air with dual boot  ( Mac and Linux Debian 10 ). In debian 10 in my macbook same behaviour.

I can send files from cosmo to my Debian 10 ( in my macbook air ). Only sending. When I try to send a file from Macbook ( Debian ) to cosmo I receive an error message : Unable to find a service record .

Running Mac os big sur, nothing works. No consistent connections. I can,t  send and receive files also. Sometimes after reboots on both macbook and cosmo, I get some connections. When setiing up the bluetooh first in Macbook I  can set the audio output  to the cosmo, so the audio from macbook is playing in cosmo.

The same behaviour above occurs when I plug a dongle bluetooth usb to cosmo ( I compiled a new kernel to enable this ).
It works only for sending files ( Macbook running debian ).

I also did a test connecting a bluetooth sound box and it works. I did a test using VLC and adjusting the audio (inside from VLC) to my GGMM_E5 audio box. Also works with firefox . I adjust the default audio to  GGMM E5 (  in volume control ).

I did a test with mac os big sur and cosmo running android and everything works ( sending and receiving files ).

So. That is it.

I think the problem may be a configuration since the bluetooth works on android and with a dongle usb bluetooth the behaviour is the same as the internal bluetooth adapter.


Title: Re: Newly installed Debian: no Bluetooth
Post by: SL on June 03, 2021, 12:07:44 pm
Your fixes make bluetooth more stable; I am able to connect to my windoze PC (on the PC it shows up as audio device) and my MX Keys keyboard (3 separate connection devices selectable). It recognizes the keyboard whenever I switch the keyboard device selector set for the cosmo. Good job :).

Edit: Also got my MX Master 3 mouse working on it (fyi of harware that seems to work).