Bug#871643: crda: Process '/sbin/crda' failed with exit code 249

2018-03-16 Thread Grand T
Hello,

here is my hardware:


root@debian:/# lspci -nnk | grep -i network -A2
03:00.0 Network controller [0280]: Broadcom Limited BCM4313 802.11bgn Wireless 
Network Adapter [14e4:4727] (rev 01)
Subsystem: Hewlett-Packard Company BCM4313 802.11bgn Wireless Network Adapter 
[103c:1483]
Kernel driver in use: bcma-pci-bridge
Kernel modules: bcma

Based on your explanation, I modify the code my way to be sure to get my region 
(FR):


root@debian:/# cat /lib/crda/setregdomain
#!/bin/sh
#set -x
#set -e
echo > /var/log/crda.log
REGDOMAIN=FR
CRDA_CONF=/etc/default/crda
date >> /var/log/crda.log
[ -r "$CRDA_CONF" ] && . "$CRDA_CONF"
#[ -z "$REGDOMAIN" ] && exit 0
echo $REGDOMAIN >> /var/log/crda.log
exec /sbin/iw reg set "$REGDOMAIN"


And I get this

root@debian:/# journalctl -xb | grep crda
mars 16 08:28:34 debian systemd-udevd[297]: Process '/sbin/crda' failed with 
exit code 249.
mars 16 08:28:34 debian systemd-udevd[297]: Process '/sbin/crda' failed with 
exit code 249.
root@debian:/#


root@debian:/# cat  /var/log/crda.log

Fri Mar 16 08:28:33 CET 2018
FR
root@debian:/#



root@debian:/# iw reg get
global
country FR: DFS-ETSI
(2402 - 2482 @ 40), (N/A, 20), (N/A)
(5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW
(5490 - 5710 @ 160), (N/A, 27), (0 ms), DFS
(57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#0
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)


So I thing US is hardcoded somewhere in BCM4313 or in bcma driver  but crda is 
finally set to my region (FR) and the crda: Process '/sbin/crda' failed with 
exit code 249  is probably armless



Bug#871643: crda: Process '/sbin/crda' failed with exit code 249

2017-09-15 Thread Caleb Carroll

Seems like this may be a duplicate of #810384 that was abandoned in January

The problem seems to be that COUNTRY attribute is not set.  I think the 
expectation is that /lib/crda/setregdomain will be started PRIOR to 
/sbin/crda.  On my system I have:


/etc/default/crda   containing:
REGDOMAIN=CA

/lib/udev/rules.d/40-crda.rules   containing:
SUBSYSTEM=="ieee80211", ACTION=="add", RUN+="/lib/crda/setregdomain"

/lib/udev/85-regulatory.rules   containing:
KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", 
RUN+="/sbin/crda"



If I edit the file 85-regulatory.rules file and change RUN+="/sbin/crda" to:
RUN+="/bin/bash -c '/sbin/crda; printenv > /var/log/crda.log"

If I look at /var/log/crda.log, it will show:
COUNTRY=00


If I add /lib/crda/setregdomain just before calling crda:
RUN+="/bin/bash -c '/lib/crda/setregdomain; /sbin/crda; printenv > 
/var/log/crda.log"


/var/log/crda.log will show the correct country code:
COUNTRY=CA


The 85-regulatory.rules file looks like this:
KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", 
RUN+="/bin/bash -c '/lib/crda/setregdomain; /sbin/crda; printenv > 
/var/log/crda.log"






On Thu, 10 Aug 2017 12:24:18 +0200 GT  wrote:
> Package: crda
> Version: 3.18-1
> Severity: normal
>
> Dear Maintainer,
>
> *** Reporter, please consider answering these questions, where 
appropriate ***

>
> * What led up to the situation?
> Start of the PC
> * What exactly did you do (or not do) that was effective (or
> ineffective)?
> check journalctl
> * What was the outcome of this action?
> guy@debian:~$ journalctl | grep /crda
> août 10 09:23:16 debian systemd-udevd[252]: Process '/sbin/crda' 
failed with

> exit code 249.
> août 10 11:27:56 debian systemd-udevd[14694]: Process '/sbin/crda' 
failed with

> exit code 255.
>
>
> * What outcome did you expect instead?
> no error for crda
> *** End of the template - remove these template lines ***
> additional info
> root@debian:/lib/udev/rules.d# iw reg get
> global
> country FR: DFS-ETSI
> (2402 - 2482 @ 40), (N/A, 20), (N/A)
> (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW
> (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW
> (5490 - 5710 @ 160), (N/A, 27), (0 ms), DFS
> (57000 - 66000 @ 2160), (N/A, 40), (N/A)
>
> root@debian:/lib/udev/rules.d# cat /lib/udev/rules.d/85-regulatory.rules
> # Runs CRDA for kernel wireless regulatory events.
> # For more information see:
> # http://wireless.kernel.org/en/developers/Regulatory/CRDA
>
> KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform",
> RUN+="/sbin/crda"
> root@debian:/lib/udev/rules.d#
>
>
>
>
>
>
> -- System Information:
> Debian Release: buster/sid
> APT prefers testing
> APT policy: (500, 'testing'), (500, 'stable'), (500, 'oldstable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
>
> Kernel: Linux 4.9.0-3-amd64 (SMP w/2 CPU cores)
> Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)

> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>

--
Caleb Carroll
Mobile: +1 403 470 4776



Bug#871643: crda: Process '/sbin/crda' failed with exit code 249

2017-08-10 Thread GT
Package: crda
Version: 3.18-1
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
Start of the PC
   * What exactly did you do (or not do) that was effective (or
 ineffective)?
check journalctl
   * What was the outcome of this action?
guy@debian:~$ journalctl | grep /crda
août 10 09:23:16 debian systemd-udevd[252]: Process '/sbin/crda' failed with
exit code 249.
août 10 11:27:56 debian systemd-udevd[14694]: Process '/sbin/crda' failed with
exit code 255.


   * What outcome did you expect instead?
no error for crda
*** End of the template - remove these template lines ***
additional info
root@debian:/lib/udev/rules.d# iw reg get
global
country FR: DFS-ETSI
(2402 - 2482 @ 40), (N/A, 20), (N/A)
(5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW
(5490 - 5710 @ 160), (N/A, 27), (0 ms), DFS
(57000 - 66000 @ 2160), (N/A, 40), (N/A)

root@debian:/lib/udev/rules.d# cat  /lib/udev/rules.d/85-regulatory.rules
# Runs CRDA for kernel wireless regulatory events.
# For more information see:
# http://wireless.kernel.org/en/developers/Regulatory/CRDA

KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform",
RUN+="/sbin/crda"
root@debian:/lib/udev/rules.d#






-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages crda depends on:
ii  iw4.9-0.1
ii  libc6 2.24-12
ii  libnl-3-200   3.2.27-2
ii  libnl-genl-3-200  3.2.27-2
ii  libssl1.1 1.1.0f-3
ii  wireless-regdb2016.06.10-1

crda recommends no packages.

crda suggests no packages.

-- Configuration Files:
/etc/default/crda changed:
REGDOMAIN=FR


-- no debconf information