Bug 2294619 - Support for custom baudrate not available in picocom-3.1-16.fc40.aarch64(is available in picocom-3.1-16.fc40.x86_64)
Summary: Support for custom baudrate not available in picocom-3.1-16.fc40.aarch64(is a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: picocom
Version: 40
Hardware: aarch64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-06-27 18:19 UTC by sdoherty
Modified: 2024-07-10 01:54 UTC (History)
1 user (show)

Fixed In Version: picocom-2023.04-1.fc41 picocom-2023.04-1.fc40
Clone Of:
Environment:
Last Closed: 2024-07-10 01:54:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description sdoherty 2024-06-27 18:19:44 UTC
picocom-3.1-16.fc40.aarch64 on Fedora 40 is not compiled with support for custom baudrates. 

example:
$ sudo picocom -b 1843200 /dev/ttyUSB0
Invalid --baud: 1843200

$ picocom --help
picocom v3.1

Compiled-in options:
  TTY_Q_SZ is 0
  HIGH_BAUD is enabled
  USE_FLOCK is enabled
  LINENOISE is enabled
  HISTFILE is: .picocom_history


the x86_64 version is compiled with support for custom baudrates. 

x86_64 $ picocom --help
picocom v3.1

Compiled-in options:
  TTY_Q_SZ is 0
  HIGH_BAUD is enabled
  USE_FLOCK is enabled
  LINENOISE is enabled
  HISTFILE is: .picocom_history
  USE_CUSTOM_BAUD is enabled


Compiling from source and enabling custom baudrates tested and working in aarch64 (raspberry pi 4) 
localhost:~/picocom$ CPPFLAGS=-DUSE_CUSTOM_BAUD make

$ sudo ./picocom --help
picocom v3.2a

Compiled-in options:
  TTY_Q_SZ is 0
  HIGH_BAUD is enabled
  USE_FLOCK is enabled
  LINENOISE is enabled
  HISTFILE is: .picocom_history
  USE_CUSTOM_BAUD is enabled

Requesting enablement in aarch64 package, unsure if this is the correct process. 



Reproducible: Always

Steps to Reproduce:
1.rpm/dnf install picocom ($ sudo dnf install picocom)

2.launch application with custom baudrate flag
example: $ sudo picocom -b 1843200 /dev/ttyUSB0
Invalid --baud: 1843200

3.verify that USE_CUSTOM_BAUDRATE is not present in compiled options
$ picocom --help
picocom v3.1

Compiled-in options:
  TTY_Q_SZ is 0
  HIGH_BAUD is enabled
  USE_FLOCK is enabled
  LINENOISE is enabled
  HISTFILE is: .picocom_history



Expected Results:  
$ picocom --help
picocom v3.1

Compiled-in options:
  TTY_Q_SZ is 0
  HIGH_BAUD is enabled
  USE_FLOCK is enabled
  LINENOISE is enabled
  HISTFILE is: .picocom_history
  USE_CUSTOM_BAUD is enabled


If this is incorrect for a packaging request please advise. Hopefully it's just something small and overlooked, or there is a reason that I did not see to have this not enabled. 

resource that was used to verify working performance: 
https://github.com/npat-efault/picocom?tab=readme-ov-file#some-notes-on-custom-baudrate-support

Comment 1 sdoherty 2024-06-27 18:32:36 UTC
https://github.com/npat-efault/picocom?tab=readme-ov-file#some-notes-on-custom-baudrate-support
"Since release 3.1 picocom is compiled with support enabled by default on some systems (like Linux, kernels > 2.6, on x86 and x86_64, modern Intel Macs, and some BSDs). In any case, you can explicitly ask for support to be enabled by compiling picocom like this:CPPFLAGS=-DUSE_CUSTOM_BAUD make"

This would explain why the x86 package has this.. is there a way to get this in the build system/packaging for aarch64? Thanks Shawn

Comment 2 sdoherty 2024-06-27 20:28:03 UTC
actually.. the makefile. 
https://github.com/npat-efault/picocom/blob/master/Makefile
line 40 
## Comment this in to enable (force) custom baudrate support
## even on systems not enabled by default.
#CPPFLAGS += -DUSE_CUSTOM_BAUD

Comment 3 Fedora Update System 2024-06-30 18:59:23 UTC
FEDORA-2024-a9396a074b (picocom-2023.04-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-a9396a074b

Comment 4 Fedora Update System 2024-06-30 19:02:30 UTC
FEDORA-2024-a9396a074b (picocom-2023.04-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Kevin Fenzi 2024-06-30 19:03:28 UTC
I'll look at pushing a f40 update also...

Comment 6 sdoherty 2024-07-01 18:04:08 UTC
Hi Kevin. I pushed a COPR up with the specfile in there that would enable this> https://copr.fedorainfracloud.org/coprs/sdoherty/picocom/
I'm struggling with the fedpkg tools right now.. although I've forked the src.fedora project https://src.fedoraproject.org/fork/sdoherty/rpms/picocom i'm having a real nasty time getting fedpkg to push a change up to my own fork to send you a PR. If you want to work thru bz that's fine too if you're agreeable to this change. Thanks Shawn.

Comment 7 Kevin Fenzi 2024-07-01 18:28:38 UTC
Sorry, I did a f40 build already, but hadn't submitted the update yet. ;( 

I did also switch to the fork that has a bunch of the patches that have been floating around (since the upstream project appears pretty dead at this point).

Comment 8 Fedora Update System 2024-07-01 18:29:51 UTC
FEDORA-2024-18e117a5f3 (picocom-2023.04-1.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-18e117a5f3

Comment 9 sdoherty 2024-07-01 20:03:42 UTC
Thanks Kevin. I verified. that aarch64 build from https://koji.fedoraproject.org/koji/buildinfo?buildID=2480921 does exactly what i was hoping for. 

$ uname -r
6.9.4-200.fc40.aarch64

$ sudo picocom --baud=1843200 /dev/ttyUSB0 
picocom v2023-04

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 1843200
parity is      : none
databits are   : 8
stopbits are   : 1
txdelay is     : 0 ns
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready

=>

Comment 10 sdoherty 2024-07-01 20:05:39 UTC
> I did also switch to the fork that has a bunch of the patches that have been
> floating around (since the upstream project appears pretty dead at this
> point).

I know this project is getting crusty, unfortunatley its all I can find that supports both custom baudrates and high baudrates for the embedded system that i am working on. 

Thanks again for all your help on this.

Comment 11 Kevin Fenzi 2024-07-01 20:14:47 UTC
Great, glad it works. 

Thank you for letting me know about the custom baudrate option... I missed it somehow. :)

Comment 12 Fedora Update System 2024-07-02 02:36:22 UTC
FEDORA-2024-18e117a5f3 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-18e117a5f3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-18e117a5f3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2024-07-10 01:54:21 UTC
FEDORA-2024-18e117a5f3 (picocom-2023.04-1.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.