Author Topic: PL2303 serial adapter drivers?  (Read 5265 times)

cdnt

  • Newbie
  • *
  • Posts: 3
    • View Profile
PL2303 serial adapter drivers?
« on: June 18, 2018, 09:07:01 am »
Has anyone managed to get a PL2303 USB to serial converter working with Debian?  It shows up with lsusb, but I can't find anything in /dev that would correspond to it.  I presume I need to compile a driver but wondered if anyone else had tried and had any useful pointers?

Many thanks in advance!

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
PL2303 serial adapter drivers?
« Reply #1 on: June 18, 2018, 10:29:03 am »
Quote from: cdnt
Has anyone managed to get a PL2303 USB to serial converter working with Debian?  It shows up with lsusb, but I can't find anything in /dev that would correspond to it.  I presume I need to compile a driver but wondered if anyone else had tried and had any useful pointers?

Many thanks in advance!

Ive not played around with the Debian TP but my understanding is that you'll need to compile a kernel with module support, or compile the driver into the kernel itself. I'm not sure why this isn't the case by default but I'm sure someone here can explain in more detail.

Warm regards
Michael

cdnt

  • Newbie
  • *
  • Posts: 3
    • View Profile
PL2303 serial adapter drivers?
« Reply #2 on: June 18, 2018, 01:02:52 pm »
I think I have it figured - I followed the steps at https://github.com/gemian/gemini-keyboard-a...rnelCompilation but I think the extra step was to use:

[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']make O=../KERNEL_OUT -C kernel-3.18 ARCH=arm64 menuconfig[/div]

...so I could enable the driver for my usb-serial adapter.

Very happy - now I have a pocket-sized device with a physical keyboard which I can use to configure network switches about the building!

hk135

  • Newbie
  • *
  • Posts: 7
    • View Profile
PL2303 serial adapter drivers?
« Reply #3 on: June 20, 2018, 05:30:56 am »
Quote from: Murple2
Ive not played around with the Debian TP but my understanding is that you'll need to compile a kernel with module support, or compile the driver into the kernel itself. I'm not sure why this isn't the case by default but I'm sure someone here can explain in more detail.

Warm regards
Michael

From what I can see there isn't loadable module support (run lsmod) on the default kernel provided hence why there are some device recognition issues, unless its compiled in its not supported.

hk135

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
PL2303 serial adapter drivers?
« Reply #4 on: June 20, 2018, 05:41:07 am »
Quote from: hk135
Quote from: Murple2
Ive not played around with the Debian TP but my understanding is that you'll need to compile a kernel with module support, or compile the driver into the kernel itself. I'm not sure why this isn't the case by default but I'm sure someone here can explain in more detail.

Warm regards
Michael

From what I can see there isn't loadable module support (run lsmod) on the default kernel provided hence why there are some device recognition issues, unless its compiled in its not supported.

hk135

Yes, I wondered why there wasn't module support compiled in? Its kinda important...

mithrandir

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • http://www.mygnu.de
PL2303 serial adapter drivers?
« Reply #5 on: June 20, 2018, 06:45:43 am »
Quote from: Murple2
Quote from: hk135
Quote from: Murple2
Ive not played around with the Debian TP but my understanding is that you'll need to compile a kernel with module support, or compile the driver into the kernel itself. I'm not sure why this isn't the case by default but I'm sure someone here can explain in more detail.

Warm regards
Michael

From what I can see there isn't loadable module support (run lsmod) on the default kernel provided hence why there are some device recognition issues, unless its compiled in its not supported.

hk135

Yes, I wondered why there wasn't module support compiled in? Its kinda important...

Also wondering... I have built a modular kernel. If someone wants to use, downloads and some instructions can be found here: http://www.mygnu.de/index.php/2018/06/modu...the-gemini-pda/

Hoping this (or a better kernel) can be included in the next TP.

Mith

cdnt

  • Newbie
  • *
  • Posts: 3
    • View Profile
PL2303 serial adapter drivers?
« Reply #6 on: June 20, 2018, 06:57:01 am »
Quote from: mithrandir
Also wondering... I have built a modular kernel. If someone wants to use, downloads and some instructions can be found here: http://www.mygnu.de/index.php/2018/06/modu...the-gemini-pda/

Hoping this (or a better kernel) can be included in the next TP.

Mith

Mith, many thanks for this!  I'll stick with my static one for the moment but have bookmarked for if discover I have anything else I want to connect to it in future.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
PL2303 serial adapter drivers?
« Reply #7 on: June 29, 2018, 12:13:49 pm »
I just tested two USB to serial adaptors, which work fine in Android, one is a Prolific and the other FTDI. Neither work in Gemian. I'll have to consider changing the kernel, thanks @mithrandir for making one available.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
PL2303 serial adapter drivers?
« Reply #8 on: June 29, 2018, 12:22:52 pm »
@mithrandir, does flashing your modular kernel with your instructions wipe the system partition, or does it solely replace the kernel?
thanks
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

mithrandir

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • http://www.mygnu.de
PL2303 serial adapter drivers?
« Reply #9 on: June 30, 2018, 05:12:29 pm »
Quote from: speculatrix
@mithrandir, does flashing your modular kernel with your instructions wipe the system partition, or does it solely replace the kernel?
thanks
It only replaces the kernel. Just make sure the other partitions are unchecked in the flash tool.

Dr. Watson

  • Newbie
  • *
  • Posts: 13
    • View Profile
PL2303 serial adapter drivers?
« Reply #10 on: July 13, 2018, 05:59:21 pm »
Quote from: mithrandir
It only replaces the kernel. Just make sure the other partitions are unchecked in the flash tool.

Hi J..... aaahhm mithrandir,

First of all: Thank you so much !!!!!!!!!!    

I simply dd-ed your kernel to /dev/block/disk/by-partlabel/linux_boot, was that wrong?

Like:
Download mithrandir's kernel, unzip and flash while on your Gemini:

root@gemini:/home/gemini# find /dev/block/ | grep linux
/dev/block/disk/by-partlabel/linux_boot
/dev/block/disk/by-partlabel/linux

dd if=/root/kernel_from_mithrandir/linux_boot-gemini-3.18.41+.img  of=/dev/block/disk/by-partlabel/linux_boot

Download mithrandir's modules/firmware tgz and untar:

cd /
tar -xzf /root/modules_from_mithrandir/modules_firmware-gemini-3.18.41+.tar.gz

Reboot. Everything works just fine. (Have I been pwned now? ).

Unfortunately one of the first things I was missing in your modules is the usb gadget drivers.
To compile your kernel, did you use sources from https://github.com/gemian ???
I want to try to copy your kernel's config and play around a little bit. I have no experience in kernel compilation, let alone cross compilation. Let's see how well I can brick my Gem.

Regards,
DrW

mithrandir

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • http://www.mygnu.de
PL2303 serial adapter drivers?
« Reply #11 on: July 13, 2018, 08:42:45 pm »
Quote from: Dr. Watson
Quote from: mithrandir
It only replaces the kernel. Just make sure the other partitions are unchecked in the flash tool.

Hi J..... aaahhm mithrandir,

First of all: Thank you so much !!!!!!!!!!    

I simply dd-ed your kernel to /dev/block/disk/by-partlabel/linux_boot, was that wrong?

Like:
Download mithrandir's kernel, unzip and flash while on your Gemini:

root@gemini:/home/gemini# find /dev/block/ | grep linux
/dev/block/disk/by-partlabel/linux_boot
/dev/block/disk/by-partlabel/linux

dd if=/root/kernel_from_mithrandir/linux_boot-gemini-3.18.41+.img  of=/dev/block/disk/by-partlabel/linux_boot

Download mithrandir's modules/firmware tgz and untar:

cd /
tar -xzf /root/modules_from_mithrandir/modules_firmware-gemini-3.18.41+.tar.gz

Reboot. Everything works just fine. (Have I been pwned now? ).

Unfortunately one of the first things I was missing in your modules is the usb gadget drivers.
To compile your kernel, did you use sources from https://github.com/gemian ???
I want to try to copy your kernel's config and play around a little bit. I have no experience in kernel compilation, let alone cross compilation. Let's see how well I can brick my Gem.

Regards,
DrW

Hi,
dd is fine. The flash tool is only needed when Linux is the primary OS. Is this still true?
Yes, I have used the sources from https://github.com/gemian/gemini-linux-kernel-3.18.
I am currently creating a new kernel config, because the old one still lacks support for quite some devices including the ethernet adapter of the PC hub. So I'll also have a look into the gadget drivers now.
Mith

mithrandir

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • http://www.mygnu.de
PL2303 serial adapter drivers?
« Reply #12 on: July 14, 2018, 08:01:19 pm »
Unfortunately I did not get the gadget drivers working within reasonable time. When selecting "USB functions configurable through configfs" and not the default Android gadget (from  the original kernel config), well and some sub options. this results in compiler or linker errors. maybe we can get this to work later on. I have uploaded what I have to mygnu.de, at least the updated kernel should be better than  the old one.

Anyways I am still hoping for a 4.X kernel, which hopefully fixes the sd card performance issue...

Mith

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
PL2303 serial adapter drivers?
« Reply #13 on: July 16, 2018, 05:56:27 pm »
yay, the new modular kernel working fine for me, thanks, now I can connect my G to network devices, servers etc.

I installed it using "dd". because my system is triple boot - android, debian and sailfish, I overwrote boot2
« Last Edit: July 16, 2018, 05:58:06 pm by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Kiriririn

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
PL2303 serial adapter drivers?
« Reply #14 on: July 17, 2018, 08:40:49 am »
Quote from: mithrandir
Anyways I am still hoping for a 4.X kernel, which hopefully fixes the sd card performance issue...

There's an sd card performance issue?

I've been using F2FS on mine, but it's been perfect