WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: USB serial comms in piCore 11  (Read 3638 times)

Offline jefferee

  • Newbie
  • *
  • Posts: 31
USB serial comms in piCore 11
« on: June 08, 2020, 07:18:52 PM »
Looks like the USB serial kernel module has yest to be added as a piCore 11 extension... I would see something like
Code: [Select]
usb-serial-4.19.81-piCore-v7.tcz
in the list if it were there, correct?

Will it be added to tcz at some point?

Thanks...

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: USB serial comms in piCore 11
« Reply #1 on: June 08, 2020, 08:18:07 PM »
Hi jefferee
Go here:
http://www.tinycorelinux.net/11.x/armv7/releases/RPi/src/kernel/
and download  modules.tar.gz.

Then execute this:
Code: [Select]
tar xf modules.tar.gz
cd modules/lib/modules/4.19.81-piCore-v7/kernel/drivers/usb/serial/

You should find all the modules in that subdirectory.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14799
Re: USB serial comms in piCore 11
« Reply #2 on: June 09, 2020, 02:36:01 AM »
posted - thanks for reporting that

Offline jefferee

  • Newbie
  • *
  • Posts: 31
Re: USB serial comms in piCore 11
« Reply #3 on: June 09, 2020, 10:51:22 AM »
Thanks, Juanito.

What's the standard piCore utility for serial terminal from command line?
I've normally used Minicom but it's not (yet) compiled for piCore 11. Not stuck on Minicom in particular if there's already a different extension available.

Offline jefferee

  • Newbie
  • *
  • Posts: 31
Re: USB serial comms in piCore 11
« Reply #4 on: June 09, 2020, 12:43:46 PM »
Looks like the 4.19.81 kernel version of dwc_otg is having some issues with my (ab)-use of a 16 port USB RS-232 serial adapter (including 3 hubs inside the unit there are 19 USB devices, total).

Plugging in the adapter is crashing the USB bus but I did manage to get it to spit out a dmesg with the error report
Code: [Select]
ERROR::assign_and_init_hc:1408: assign_and_init_hc: Failed to allocate memory to handle non-dword aligned buffer case
My Pi 3B with piCore 9.0.3 is fine, but piCore 11.0 crashes when connected to the adapter, on both a 3B and 3B+.

A 2-channel USB/RS232 adapter appears to work properly in piCore 11 so it's possible that the 4.19 kernel might limit the number of endpoints in a way previous kernels didn't...

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: USB serial comms in piCore 11
« Reply #5 on: June 09, 2020, 04:16:55 PM »
Have you tried changing the FIQ modes?   USB on a RPI is pretty sketchy.

Better yet, move to a PI4.

Offline jefferee

  • Newbie
  • *
  • Posts: 31
Re: USB serial comms in piCore 11
« Reply #6 on: June 09, 2020, 05:44:53 PM »
Have you tried changing the FIQ modes?   USB on a RPI is pretty sketchy.

Better yet, move to a PI4.
I have not tried changing FIQ (or anything else in the kernel config).
Is there documentation somewhere of what the options are? I'm coming up empty on Google searches.

Thanks,
-Jeff.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14799
Re: USB serial comms in piCore 11
« Reply #7 on: June 10, 2020, 04:41:42 AM »
There's a possible patch at the end of this link?

https://patchwork.kernel.org/patch/10374827/

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: USB serial comms in piCore 11
« Reply #8 on: June 10, 2020, 10:21:53 PM »
For whatever reason, the base piCore images do not enable FIQ accellerations withing dwg_otc.  Which is fine if you don't have USB devices connected.  Without FIQ handling, its common to see lost/corrupted USB data.   I'm far from a USB expert, but I would start with

Adding

Code: [Select]
dwc_otg.fiq_fsm_mask=0xFto your cmdline.txt file on your boot drive.  There is of coarse different options for FIQ, but this enables all of the accelerations.

Other If that doesn't work, there might be other options.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14799
Re: USB serial comms in piCore 11
« Reply #9 on: June 11, 2020, 07:52:48 AM »
minicom added to the repo