Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/mrf24j40 : lower TX power on modules with PA/LNA enabled to s… #16549

Closed
wants to merge 1 commit into from

Conversation

Carton32
Copy link

…tay in ISM band

Contribution description

One of my devices has a MRF24J40MD. As a part of CE certification process, I made measurements in a FAR (Full Anechoic Room). With default TX power configuration, the module emits on IEEE802.15.4 channel 26 slightly outside ISM band.

To stay in conformity, I had to lower the TX power (-6.3dB) so it stays in the limits defined by ISM band.

You can also check the MRF24J40 Linux driver. They do a similar thing. Based on the Linux driver, it seems to affect only modules with PA/LNA, that's why I simply added my code after PA/LNA activation.

NB : I made measurements only on channel 26. Maybe the module has the same issue on channel 11 but I didn't check (FAR are expensive :D ). So I chose the Linux river approach of lowering TX power on all channels.

Testing procedure

I made measurements in the FAR with and without these modifications.

I tried also to compile with default example

Issues/PRs references

n/a

@Carton32 Carton32 requested a review from bergzand as a code owner June 14, 2021 15:32
@github-actions github-actions bot added the Area: drivers Area: Device drivers label Jun 14, 2021
@fjmolinas
Copy link
Contributor

Hi @Carton32 thanks for the contribution. Can you point to where in the Linxu driver the similar handling is done? Is therefore 6.3 dB the extra gain introduced by the PA?

@Carton32
Copy link
Author

Hi @fjmolinas ,

Here : MRF24J40 Linux driver, l.1149 to 1152

In the Linux driver, it's only done for MRF24J40MC (the driver doesn't recognize MD or ME models as they are just newer version of MC as I understand). I use MRF24J40MC Linux driver for my device embedding a MRF24J40MD running on Linux.

For your second question, I don't really know. That only models with PA/LNA are concerned was a deduction I made based on the Linux driver (they do it only for the MC model and they don't have something specific for the old MB one).
The issue is not going over 20dBm TX power. The module is just out of the ISM band when emitting at full power on channel 26. This happens only on channel 26 (and maybe on channel 11) as the other channels are in the middle of ISM band.

@fjmolinas
Copy link
Contributor

Hi @fjmolinas ,

Here : MRF24J40 Linux driver, l.1149 to 1152

Hmmm but according to the document referenced in the code this depends on local regulation MRF24J40MC-3.1, and for all its 18.5 dBm (RFCON3 0x203<7:3> = 00101) AFAIKT. So I don't quite understand how this -6.3dB value comes into play.

@Carton32
Copy link
Author

Carton32 commented Jun 15, 2021

In the MRF24J40MC datasheet :

3.1.1 MRF24J40MC SETTINGS
To meet the FCC requirements, the following settings must be observed by the integrator:• The MRF24J40MC transmit power setting shall not exceed 18.5 dBm (RFCON3 0x203<7:3> = 00101). Refer to Section1.3.4 “Transmit Power Settings”.• Only channels 11 through 25 may be selected (RFCON0 0x200).

So for MRF24J40MC, max TX power should not exceed 18.5dBm and the user shouldn't use channel 26.

But this is not stated in the MRF24J40MD/ME datasheet (if I didn't miss something). Maybe they forgot to mention this because I noticed this in the FAR.

So it's very model specific and we can close my PR I think because of this.

@fjmolinas
Copy link
Contributor

In the MRF24J40MC datasheet :

3.1.1 MRF24J40MC SETTINGS
To meet the FCC requirements, the following settings must be observed by the integrator:• The MRF24J40MC transmit power setting shall not exceed 18.5 dBm (RFCON3 0x203<7:3> = 00101). Refer to Section1.3.4 “Transmit Power Settings”.• Only channels 11 through 25 may be selected (RFCON0 0x200).

So for MRF24J40MC, max TX power should not exceed 18.5dBm and the user shouldn't use channel 26.

But this is not stated in the MRF24J40MD/ME datasheet (if I didn't miss something). Maybe they forgot to mention this because I noticed this in the FAR.

So it's very model specific and we can close my PR I think because of this.

I believe there are difference mrf24j40** modules, we can add a specific case for your model/

@fjmolinas
Copy link
Contributor

The MC/MD datasheet has a comparative table:

image, the output does vary quite a lot depending on RFCON3. This also shows that probably dbm_to_tx_pow should vary depending on the driver model, maybe thats the fix?

@Carton32
Copy link
Author

We should not allow the use of channel 26 for all MRF24J40 modules. It's clearly stated in the datasheets for MRF24J40MB/MC and I noticed this channel is still out of ISM band at my notified body FAR for MRF24J40MD at some TX power levels. Contrary to MRF24J40MB/MC, nothing is stated in MRF24J40MD/ME datasheet to keep radio conformity (RED or FCC) but, still, not ok for channel 26.

Now, as nothing is stated about TX power in MRF24J40MD/ME datasheet to keep conformity during use, and I didn't measured the TX power before lowering the setting in RFCON3. I can just say that my MRF24J40MD test in FAR with RFCON3 = 0x38 (17.9dBm theoretically) gives a measured Perp of 10.73dBm. I don't know if we can compare both values as I'm not an expert in this field.

So maybe, the easiest way to "fix" this situation is :

  • to ignore MRF24J40MB/MC models as they are either "End of life" or "Not recommended for new designs" since a long time. Maybe we could also add a warning about this in a comment ?
  • adapt dbm_to_tx_pow for MRF24J40MD/ME models if needed as you suggest
  • disallow usage of channel 26

What do you think ?

@fjmolinas
Copy link
Contributor

I would say:

  • to ignore MRF24J40MB/MC models as they are either "End of life" or "Not recommended for new designs" since a long time. Maybe we could also add a warning about this in a comment ?
  • adapt dbm_to_tx_pow for MRF24J40MD/ME models if needed as you suggest

@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 21, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
@Carton32
Copy link
Author

Sorry for my silence. I was on holidays + had to suddenly change the topic I was working on.

I think we can drop this PR. In the meantime, Microchip has announced EOL for MRF24J40MD/ME...

@Carton32 Carton32 closed this Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants