Author Topic: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?  (Read 1048 times)

jakfish

  • Sr. Member
  • ****
  • Posts: 356
    • View Profile
Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« on: June 10, 2021, 10:47:36 pm »
My Cosmo has failed again--first, calling/speakers broke; PC fixed that. Now wifi/bt don't work and I'm out of warranty.

I've given up on it as a phone but wonder if I can turn the Cosmo into PDA with a wifi adapter. Is there an available adapter that could make that happen?

(or even an internal wifi replacement)

Thanks,
Jake

cam1965

  • Sr. Member
  • ****
  • Posts: 331
    • View Profile
    • http://
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #1 on: June 11, 2021, 06:40:12 am »
My Cosmo has failed again--first, calling/speakers broke; PC fixed that. Now wifi/bt don't work and I'm out of warranty.

I've given up on it as a phone but wonder if I can turn the Cosmo into PDA with a wifi adapter. Is there an available adapter that could make that happen?

(or even an internal wifi replacement)

Thanks,
Jake
My Cosmo has failed again--first, calling/speakers broke; PC fixed that. Now wifi/bt don't work and I'm out of warranty.

I've given up on it as a phone but wonder if I can turn the Cosmo into PDA with a wifi adapter. Is there an available adapter that could make that happen?

(or even an internal wifi replacement)

Thanks,
Jake

Probably YES. But you have to compile the kernel to enable the driver.
I have compiled my own kernel  enabling it to use with  an external usb web cam, a usb  TV usb dongle and a usb modem dongle ( you have to  insert  the sim card on it ). You have to use a usb adapter. And it works only for data. Not for telephone.
You have to configute the dialer.
This is an article to configure my modem ZTE on linux. ( In portuguese, but you can translate it in google or find a similar in English )
https://www.vivaolinux.com.br/artigo/Configurando-o-modem-ZTE-MF626-com-Vivo3G-no-Debian
Maybe you find one that works in android.
Good luck.
« Last Edit: June 11, 2021, 07:06:58 am by cam1965 »

cam1965

  • Sr. Member
  • ****
  • Posts: 331
    • View Profile
    • http://
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #2 on: June 11, 2021, 06:50:52 am »
My Cosmo has failed again--first, calling/speakers broke; PC fixed that. Now wifi/bt don't work and I'm out of warranty.

I've given up on it as a phone but wonder if I can turn the Cosmo into PDA with a wifi adapter. Is there an available adapter that could make that happen?

(or even an internal wifi replacement)

Thanks,
Jake
My Cosmo has failed again--first, calling/speakers broke; PC fixed that. Now wifi/bt don't work and I'm out of warranty.

I've given up on it as a phone but wonder if I can turn the Cosmo into PDA with a wifi adapter. Is there an available adapter that could make that happen?

(or even an internal wifi replacement)

Thanks,
Jake

Probably YES. But you have to compile the kernel to enable the driver.
I have compiled my own kernel  enabling it to use with  an external usb web cam, a usb  TV usb dongle and a usb modem dongle ( you have to insert  the sim card on it ). You have to use a usb adapter. And it works only for data. Not for telephone.
You have to configute the dialer.
This is an article to configure my modem ZTE on linux. ( In portuguese, but you can translate it in google or find a similar in English )
https://www.vivaolinux.com.br/artigo/Configurando-o-modem-ZTE-MF626-com-Vivo3G-no-Debian
Maybe you find one that works in android.
Good luck.

I am not able to insert pictures here .
But this link has a photo of my usb modem

https://www.clicoutelecom.com.br/eletronicos/modens/modem-zte-3g-usb-modelo-mf626-original-vitrine

And this for the adapter

https://produto.mercadolivre.com.br/MLB-1722846088-adaptador-conversor-baseus-otg-tipo-c-macho-p-usb-fmea-_JM
« Last Edit: June 11, 2021, 07:07:28 am by cam1965 »

jakfish

  • Sr. Member
  • ****
  • Posts: 356
    • View Profile
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #3 on: June 11, 2021, 09:03:46 am »
MANY thanks for such an intriguing response.

I have a Huawei E397 USB modem that I've successfully used with a variety of Linux flavors (I just use it for data, which is all I need).

But I don't know how to compile. Do you think I could use your custom kernel in a fresh Linux install on the Cosmo? I've never installed Linux on the Cosmo but I've done it with my Gemini.

(Android is now useless to my Cosmo--it constantly pops-up with an error message that my bt is broken, which I already know)

Thanks again for posting so fast,
Jake

cam1965

  • Sr. Member
  • ****
  • Posts: 331
    • View Profile
    • http://
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #4 on: June 11, 2021, 09:44:24 am »
MANY thanks for such an intriguing response.

I have a Huawei E397 USB modem that I've successfully used with a variety of Linux flavors (I just use it for data, which is all I need).

But I don't know how to compile. Do you think I could use your custom kernel in a fresh Linux install on the Cosmo? I've never installed Linux on the Cosmo but I've done it with my Gemini.

(Android is now useless to my Cosmo--it constantly pops-up with an error message that my bt is broken, which I already know)

Thanks again for posting so fast,
Jake

Kernel is too big. Please see my notes below.

For  installing linux
https://support.planetcom.co.uk/index.php/Linux_for_Cosmo


Please see my post here ( for compiling )
https://www.oesf.org/forum/index.php?topic=36540.0

Attached is my  config file.

 


First :

git clone https://github.com/gemian/cosmo-linux-kernel-4.4.git
cd cosmo-linux-kernel-4.4
git checkout packaging

go to home directory ( type cd enter )


So make a compressed backup of the kernel
tar cjvf kernel.tar.bz2 cosmo-linux-kernel-4.4

Enter to the source
cd  cosmo-linux-kernel-4.4

cp arch/arm64/configs/k71v1_64_bsp_defconfig ./.config

Make menuconfig ( install the packages to compile  in order to menuconfig works )

Make your changes.

copy .config file to some location ( cp .config /home/cosmo/confignew )

remove the directory rm -rf cosmo-linux-kernel-4.4

extract the kernel backup

tar jxvf kernel.tar.bz2

Enter the source ( cd cosmo-linux-kernel-4.4 )

copy the confignew file to arch/arm64/configs/k71v1_64_bsp_defconfig ( cp /home/cosmo/confignew arch/arm64/configs/k71v1_64_bsp_defconfig )

so do : debuild -b -uc -us

after the process : sudo dpkg -i ../cosmo-linux-kernel*deb

Good luck.
CAM1965
« Last Edit: June 11, 2021, 09:51:58 am by cam1965 »

jakfish

  • Sr. Member
  • ****
  • Posts: 356
    • View Profile
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #5 on: June 11, 2021, 10:03:09 am »
Thank you so much, cam1965, for posting your config file and all your fine instruction.

I just got Gemian installed on my Cosmo, will follow your work here, and post back.

You have all my appreciation,
Jake

Edit: uh, oh. Without an internet connection (broken wifi/bt), I'm not certain how to get these compiling files to the Cosmo. Any idea?

Edit2: wait. I think mys data on the sim still works. Will insert card and see what I can do.
« Last Edit: June 11, 2021, 10:07:32 am by jakfish »

cam1965

  • Sr. Member
  • ****
  • Posts: 331
    • View Profile
    • http://
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #6 on: June 11, 2021, 10:12:15 am »
Thank you so much, cam1965, for posting your config file and all your fine instruction.

I just got Gemian installed on my Cosmo, will follow your work here, and post back.

You have all my appreciation,
Jake

Edit: uh, oh. Without an internet connection (broken wifi/bt), I'm not certain how to get these compiling files to the Cosmo. Any idea?

Edit2: wait. I think mys data on the sim still works. Will insert card and see what I can do.

You can download the files to the sd card and mount it in linux.
Or use an ethernet adapter like the photo attached.
I donĀ“t know if it works with the pre installed kernel.
With my kernel it works.
Maybe it is necessary to install the necessary files to compile with this adapter
 
 

Good Luck !
« Last Edit: June 11, 2021, 10:55:57 am by cam1965 »

jakfish

  • Sr. Member
  • ****
  • Posts: 356
    • View Profile
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #7 on: June 11, 2021, 11:20:25 am »
The pre-installed kernel does work with an ethernet adapter. I'm on-line--thanks for reminding me of ethernet connections; it's been a long time since I thought of them :)

Jake

jakfish

  • Sr. Member
  • ****
  • Posts: 356
    • View Profile
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #8 on: June 11, 2021, 03:02:47 pm »
I'm having my trouble because I'm crashing on
Code: [Select]
debuild and would like to make sure I have the steps rights.

Since I'm using your confignew1, don't I simply copy that over:
Code: [Select]
cp /home/cosmo/confignew1 ~/cosmo-linux-kernel-4.4/arch/arm64/configs/k71v1_64_bsp_defconfig ?

I've experimented with
Code: [Select]
make menuconfig but since I'm just using all its defaults, I'm not changing anything in the kernel. I tried copying over your confignew1 and then running
Code: [Select]
make oldconfig. Either approach is error-free, but I'm still crashing on
Code: [Select]
debuild
Or does the confignew1 file have to be modified in some way before copied over?

Any ideas?

Thanks,
Jake

cam1965

  • Sr. Member
  • ****
  • Posts: 331
    • View Profile
    • http://
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #9 on: June 11, 2021, 03:33:11 pm »
The pre-installed kernel does work with an ethernet adapter. I'm on-line--thanks for reminding me of ethernet connections; it's been a long time since I thought of them :)

Jake

Please
follow exactly as below .
Install the build dependencies:

sudo apt install devscripts build-essential bc qemu-user-binfmt

You must git clone again. Please remove all previous downloaded files.

git clone https://github.com/gemian/cosmo-linux-kernel-4.4.git
cd cosmo-linux-kernel-4.4
git checkout packaging

Supposing the confignew1 is on /home/cosmo directory.

copy the confignew1 file to arch/arm64/configs/k71v1_64_bsp_defconfig ( cp /home/cosmo/confignew1 arch/arm64/configs/k71v1_64_bsp_defconfig )

so do :
debuild -b -uc -us

after the process : sudo dpkg -i ../cosmo-linux-kernel*deb 
( see ../ )

Good luck.
CAM1965
« Last Edit: June 11, 2021, 04:52:44 pm by cam1965 »

jakfish

  • Sr. Member
  • ****
  • Posts: 356
    • View Profile
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #10 on: June 11, 2021, 05:58:33 pm »
Success. cam1965, thanks so much. I would have never figured this out on my own.

Code: [Select]
qemu-user-binfmt
Had everything else installed, except for that. I wonder why debuild didn't throw up a more informative error.

Code: [Select]
lsusb showed the Huawei and I eventually found its tty (ttyUSB0) and I got on-line with wvdial.

A couple more questions if you don't mind:

1) after exiting wvdial, what would the console command to disable the modem completely (it eats a lot of battery), and the command to bring it back up?

2) if I found out the information about my usb wifi adapter, could I simply paste that into your confignew1 file and recompile? (I have a strong feeling it's not that easy)

Thanks once more for your help.

Jake

cam1965

  • Sr. Member
  • ****
  • Posts: 331
    • View Profile
    • http://
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #11 on: June 11, 2021, 07:06:54 pm »
Success. cam1965, thanks so much. I would have never figured this out on my own.

Code: [Select]
qemu-user-binfmt
Had everything else installed, except for that. I wonder why debuild didn't throw up a more informative error.

Code: [Select]
lsusb showed the Huawei and I eventually found its tty (ttyUSB0) and I got on-line with wvdial.

A couple more questions if you don't mind:

1) after exiting wvdial, what would the console command to disable the modem completely (it eats a lot of battery), and the command to bring it back up?

2) if I found out the information about my usb wifi adapter, could I simply paste that into your confignew1 file and recompile? (I have a strong feeling it's not that easy)

Thanks once more for your help.

Jake

Hi.
I don't know the command to disable the modem. When you insert it in the usb port it loads usbserial and usb_wwan modules.
And you cannot unload the modules when the modem is connected. So unplug the modem and connect it when you want to use it.
If you use pppconfig you can turn on or off the connection
to connect :

sudo pon ( connection name )

the modem light will flash.

To disconnect :

sudo poff -a

( So the modem  light will be not  flashing , but will still on )

For the second question, you have to follow as below


First :

sudo apt-get install firmware-linux-free firmware-linux-nonfree firmware-misc-nonfree

git clone https://github.com/gemian/cosmo-linux-kernel-4.4.git
cd cosmo-linux-kernel-4.4
git checkout packaging

go to home directory ( type cd enter )


So make a compressed backup of the kernel
tar cjvf kernel.tar.bz2 cosmo-linux-kernel-4.4 ( It is important  this is a kernel tree without modifications).

Enter to the source
cd  cosmo-linux-kernel-4.4

cp  /home/cosmo/confignew1 ./.config

Make menuconfig ( install the packages to compile  in order to menuconfig works )

Make your changes.( here you have to find your wifi driver and enable it on kernel )

copy .config file to some location ( cp .config /home/cosmo/confignew2 )

remove the directory rm -rf cosmo-linux-kernel-4.4 ( this is very  important )

extract the kernel backup

tar jxvf kernel.tar.bz2
 So you have a kernel tree without modifications.

Enter the source ( cd cosmo-linux-kernel-4.4 )

copy the confignew2 file to arch/arm64/configs/k71v1_64_bsp_defconfig ( cp /home/cosmo/confignew2 arch/arm64/configs/k71v1_64_bsp_defconfig )

so do : debuild -b -uc -us

after the process : sudo dpkg -i ../cosmo-linux-kernel*deb

« Last Edit: June 11, 2021, 07:25:04 pm by cam1965 »

jakfish

  • Sr. Member
  • ****
  • Posts: 356
    • View Profile
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #12 on: June 12, 2021, 12:42:44 pm »
Thanks once more for weighing in.

With regard to disabling/enabling the modem, I agree: there doesn't seem to be a working command. The modem doesn't appear in
Code: [Select]
nmcli and trying
Code: [Select]
sudo eject /dev/ttyusb0 doesn't work, either.

The driver for my Ralink wifi usb driver is rt2800usb and I'll try to learn how to compile that into the kernel. I see that r8152 is already a module in the kernel, but that appears to be ethernet-only. Otherwise, I'd just buy a wifi adapter that used an already-installed module.

Jake


cam1965

  • Sr. Member
  • ****
  • Posts: 331
    • View Profile
    • http://
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #13 on: June 12, 2021, 12:57:30 pm »
Thanks once more for weighing in.

With regard to disabling/enabling the modem, I agree: there doesn't seem to be a working command. The modem doesn't appear in
Code: [Select]
nmcli and trying
Code: [Select]
sudo eject /dev/ttyusb0 doesn't work, either.

The driver for my Ralink wifi usb driver is rt2800usb and I'll try to learn how to compile that into the kernel. I see that r8152 is already a module in the kernel, but that appears to be ethernet-only. Otherwise, I'd just buy a wifi adapter that used an already-installed module.

Jake

Please follow the steps I told you to compile a kernel.
Please see

https://wiki.debian.org/rt2800usb

The kernel has support  to this wireless as you can see in the attached picture.
You only have to enable the driver on the kernel (in  make menuconfig ).
Good luck.
 


jakfish

  • Sr. Member
  • ****
  • Posts: 356
    • View Profile
Re: Will Cosmo/Linux Allow 3rd-party WIFI Adapter?
« Reply #14 on: June 12, 2021, 01:57:42 pm »
I'll give it a try. Thank you for the pic showing that the driver can be compiled.

Jake