Cannot set WiFi country code or tether

I noticed this in dmesg. Should I worry? WiFi works (at least on n) but is it illegal?

[    6.959548] dhd_conf_set_country: set country ALL, revision 38
[    6.959552] dhd_conf_set_fw_string_struct_cmd: set country
[    6.959820] CONFIG-ERROR) dhd_conf_set_fw_string_struct_cmd: country setting failed -2
[    6.960393] Country code: US (US/0)
[    6.960675] dhd_conf_set_fw_string_cmd: set roam_off 1
[    6.961880] dhd_conf_set_fw_string_cmd: set mimo_bw_cap 1
[    6.962412] dhd_conf_set_fw_string_cmd: set txbf 1
[    6.962829] CONFIG-ERROR) dhd_conf_set_fw_string_cmd: txbf setting failed -23

Well it is legal as long as you only connect to the Channel that are legal in your country. And as your router would only provide “legal” channels it is not such a concern on your clients.

But would be interesting to find out why it’s failing. Have you installed CRDA? Maybe try to set another country for test purpose and see if that also create a error.

But there may be something here to explain why I can’t tether it. OSMC doesn’t seem to be able to apply any settings. I have not installed CRDA. Installed it and did this:

root@vero:/home/osmc# iw reg get
country 00: DFS-UNSET
        (2402 - 2472 @ 40), (6, 20), (N/A)
        (2457 - 2482 @ 40), (6, 20), (N/A), PASSIVE-SCAN
        (2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN
        (5170 - 5250 @ 160), (6, 20), (N/A), PASSIVE-SCAN
        (5250 - 5330 @ 160), (6, 20), (N/A), DFS, PASSIVE-SCAN
        (5490 - 5730 @ 160), (6, 20), (N/A), DFS, PASSIVE-SCAN
root@vero:/home/osmc# iw reg set UK
root@vero:/home/osmc# iw reg get
country 00: DFS-UNSET
        (2402 - 2472 @ 40), (6, 20), (N/A)
        (2457 - 2482 @ 40), (6, 20), (N/A), PASSIVE-SCAN
        (2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN
        (5170 - 5250 @ 160), (6, 20), (N/A), PASSIVE-SCAN
        (5250 - 5330 @ 160), (6, 20), (N/A), DFS, PASSIVE-SCAN
        (5490 - 5730 @ 160), (6, 20), (N/A), DFS, PASSIVE-SCAN

We don’t include CRDA by default. Maybe we should in OSMC but generally:

  • Only legal networks are around
  • Most WiFi adapters set the world regulatory domain from surrounding networks

Sam

Not too bothered about the country code, but intrigued as to why it can’t be set with iw and whether that’s a pointer to the reason I can’t tether it.

Doubt they are related. ConnMan requires nl80211 compatibility for this and I don’t believe bcmdhd provides it.

So tethering is not expected to work on vero?

It depends. By tethering, I assume you mean Wired LAN -> AP.

Tethering like that doesn’t really work on any devices properly at this time.

You can set it up manually with hostapd, but you’ll likely run in to
problems if you do it with ConnMan.

If you do want to trial it, use connmanctl tether wifi rather
than the GUI for now and set the country code in the firmware
configuration file: /lib/firmware/config_43455c0.txt

TBH, I don’t know what connman means by tethering. I thought it meant the same as forwarding, in which case how can you tether a single technology? They don’t explain it anywhere. From their docs, it looks like you are connecting all the tethered technologies together, excluding eth by default.

Maybe have a play later…

Just I thought would happen:

[    7.341259] dhd_conf_set_country: set country UK, revision 38
[    7.341263] dhd_conf_set_fw_string_struct_cmd: set country
[    7.341730] CONFIG-ERROR) dhd_conf_set_fw_string_struct_cmd: country setting failed -2
[    7.342475] Country code: US (US/0)
[    7.342874] dhd_conf_set_fw_string_cmd: set roam_off 1
[    7.346096] dhd_conf_set_fw_string_cmd: set mimo_bw_cap 1
[    7.346793] dhd_conf_set_fw_string_cmd: set txbf 1
[    7.347319] CONFIG-ERROR) dhd_conf_set_fw_string_cmd: txbf setting failed -23

Looks like you are right, bcmdhd can’t handle it.