Re: [Nix-dev] Wifi DFS configuration/reg database (was Re: Specifying particular firmware)

2016-07-20 Thread Tobias Geerinckx-Rice

Matthew,

On 2016-07-20 18:09, Matthew Robbetts wrote:
Unfortunately, it didn't fix my problem. After some more digging, I 
think the
problem is related to my wireless regulatory database -- in that, I 
don't

think I have one.


I added a wireless-regdb package once, but it might need some symlinking 
to

properly work with iw out of the box. I just wanted the data.

Kind regards,

T G-R

--
Sent from a web browser. Excuse my brevity.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Wifi DFS configuration/reg database (was Re: Specifying particular firmware)

2016-07-20 Thread Vladimír Čunát
On 07/20/2016 06:09 PM, Matthew Robbetts wrote:
> So, I think something is wrong with my regulatory database. Does anyone
> know how to dig into this further? Any help appreciated!

I don't know, but I'd personally also check kernel version, especially
if it's some newer kind of hardware.

--Vladimir




smime.p7s
Description: S/MIME Cryptographic Signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Wifi DFS configuration/reg database (was Re: Specifying particular firmware)

2016-07-20 Thread Matthew Robbetts
Tobias!

> On Jul 20, 2016, at 10:15 AM, Tobias Geerinckx-Rice  wrote:
> 
> Matthew,
> 
> On 2016-07-20 18:09, Matthew Robbetts wrote:
>> Unfortunately, it didn't fix my problem. After some more digging, I think the
>> problem is related to my wireless regulatory database -- in that, I don't
>> think I have one.
> 
> I added a wireless-regdb package once, but it might need some symlinking to
> properly work with iw out of the box. I just wanted the data.

That is an exceptionally promising response for my problem :)

I did notice that a regdb package exists, and I do have it installed. This 
possibly explains why that doesn't fix it.

I can try and dig into this package to see what’s what — but I’ve no idea of 
what symlinking might be needed. Any hints off the top of your head would be 
welcome. If not, I’ll try and look at it later and may have some questions for 
you…


Thanks!
Matt



> 
> Kind regards,
> 
> T G-R
> 
> -- 
> Sent from a web browser. Excuse my brevity.

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Wifi DFS configuration/reg database (was Re: Specifying particular firmware)

2016-07-20 Thread Matthew Robbetts

> On Jul 20, 2016, at 1:27 PM, Vladimír Čunát  wrote:
> 
> On 07/20/2016 06:09 PM, Matthew Robbetts wrote:
>> So, I think something is wrong with my regulatory database. Does anyone
>> know how to dig into this further? Any help appreciated!
> 
> I don't know, but I'd personally also check kernel version, especially
> if it's some newer kind of hardware.

Ah, no, that shouldn’t be the problem at least. The kernel is whatever’s 
current on NixOS — 4.4.something? — and the hardware is over a year old. It’s a 
QCA9890 chip. The early firmware for these was actually little unstable for me 
(I had problems with that other machine last year when I first got it), but has 
also been good since around the 4.3 era at least.

Thanks,
Matt
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Wifi DFS configuration/reg database (was Re: Specifying particular firmware)

2016-07-20 Thread Matthew Robbetts

> On Jul 20, 2016, at 1:30 PM, Matthew Robbetts  wrote:
> 
> Tobias!
> 
>> On Jul 20, 2016, at 10:15 AM, Tobias Geerinckx-Rice  wrote:
>> 
>> Matthew,
>> 
>> On 2016-07-20 18:09, Matthew Robbetts wrote:
>>> Unfortunately, it didn't fix my problem. After some more digging, I think 
>>> the
>>> problem is related to my wireless regulatory database -- in that, I don't
>>> think I have one.
>> 
>> I added a wireless-regdb package once, but it might need some symlinking to
>> properly work with iw out of the box. I just wanted the data.
> 
> That is an exceptionally promising response for my problem :)
> 
> I did notice that a regdb package exists, and I do have it installed. This 
> possibly explains why that doesn't fix it.
> 
> I can try and dig into this package to see what’s what — but I’ve no idea of 
> what symlinking might be needed. Any hints off the top of your head would be 
> welcome. If not, I’ll try and look at it later and may have some questions 
> for you…

Oh, oh! One for the group:

I notice that the crda package has a udev rule in it:

/nix/store/6nzijs5fiwsm4hzpvvfyxkhb17gxdwwc-crda-3.18/lib/udev/rules.d/85-regulatory.rules

but after installation this rule has not made it into my 
/run/current-system/sw/lib/udev/rules.d/ folder (I think it needs to be there 
for it to work, right?)

So, what can I override in the crda package derivation (or whatever) to make 
this symlink happen? Nix is frustrating sometimes — a simple ln -s is 
disallowed! :)


After some poking, I’ve found the services.udev.extraRules key, and added the 
text of the rules file to that in my configuration.nix, as

services = {
udev = {
extraRules = "KERNEL=='regulatory*', ACTION=='change', 
SUBSYSTEM=='platform', 
RUN+='/nix/store/6nzijs5fiwsm4hzpvvfyxkhb17gxdwwc-crda-3.18/bin/crda'";
};
…

but that doesn’t seem to help either.


So close! Possibly…

Any thoughts?






> 
> Thanks!
> Matt
> 
> 
> 
>> 
>> Kind regards,
>> 
>> T G-R
>> 
>> -- 
>> Sent from a web browser. Excuse my brevity.
> 

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Wifi DFS configuration/reg database (was Re: Specifying particular firmware)

2016-07-20 Thread Matthew Robbetts
Alright, folks, I think I’ve figured it out.

The crda package has the udev rule, but doesn’t add itself to the 
services.udev.packages list.

Adding simply:

services = {
udev = {
packages = [ pkgs.crda ];
};
…
};

to my configuration.nix got it working. Win! Such a tiny fix.

I am still figuring out how these things work in nixland, but I see a couple of 
others, such as pkgs/os-specific/linux/rfkill/udev.nix, where there is a 
comment explaining you should do basically this to enable it. Should such a 
comment be added to the crda package? If so, should I file this as a GitHub 
issue?


Ta,
Matt



> On Jul 20, 2016, at 4:51 PM, Matthew Robbetts  wrote:
> 
>> 
>> On Jul 20, 2016, at 1:30 PM, Matthew Robbetts > > wrote:
>> 
>> Tobias!
>> 
>>> On Jul 20, 2016, at 10:15 AM, Tobias Geerinckx-Rice >> > wrote:
>>> 
>>> Matthew,
>>> 
>>> On 2016-07-20 18:09, Matthew Robbetts wrote:
 Unfortunately, it didn't fix my problem. After some more digging, I think 
 the
 problem is related to my wireless regulatory database -- in that, I don't
 think I have one.
>>> 
>>> I added a wireless-regdb package once, but it might need some symlinking to
>>> properly work with iw out of the box. I just wanted the data.
>> 
>> That is an exceptionally promising response for my problem :)
>> 
>> I did notice that a regdb package exists, and I do have it installed. This 
>> possibly explains why that doesn't fix it.
>> 
>> I can try and dig into this package to see what’s what — but I’ve no idea of 
>> what symlinking might be needed. Any hints off the top of your head would be 
>> welcome. If not, I’ll try and look at it later and may have some questions 
>> for you…
> 
> Oh, oh! One for the group:
> 
> I notice that the crda package has a udev rule in it:
> 
> /nix/store/6nzijs5fiwsm4hzpvvfyxkhb17gxdwwc-crda-3.18/lib/udev/rules.d/85-regulatory.rules
> 
> but after installation this rule has not made it into my 
> /run/current-system/sw/lib/udev/rules.d/ folder (I think it needs to be there 
> for it to work, right?)
> 
> So, what can I override in the crda package derivation (or whatever) to make 
> this symlink happen? Nix is frustrating sometimes — a simple ln -s is 
> disallowed! :)
> 
> 
> After some poking, I’ve found the services.udev.extraRules key, and added the 
> text of the rules file to that in my configuration.nix, as
> 
> services = {
>   udev = {
>   extraRules = "KERNEL=='regulatory*', ACTION=='change', 
> SUBSYSTEM=='platform', 
> RUN+='/nix/store/6nzijs5fiwsm4hzpvvfyxkhb17gxdwwc-crda-3.18/bin/crda'";
>   };
>   …
> 
> but that doesn’t seem to help either.
> 
> 
> So close! Possibly…
> 
> Any thoughts?
> 
> 
> 
> 
> 
> 
>> 
>> Thanks!
>> Matt
>> 
>> 
>> 
>>> 
>>> Kind regards,
>>> 
>>> T G-R
>>> 
>>> -- 
>>> Sent from a web browser. Excuse my brevity.

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Wifi DFS configuration/reg database (was Re: Specifying particular firmware)

2016-07-21 Thread Tobias Geerinckx-Rice

Matthew,

On 2016-07-21 07:38, Matthew Robbetts wrote:

Alright, folks, I think I've figured it out.


Congratulations! I'm glad it was so ‘easy’ in the end.


Should such a comment be added to the crda package?


It's not a very scalable solution, but better than none.

I don't have any better suggestions; it's been ages since I've looked
at the manual.

Kind regards,

T G-R
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev