upgrading to ns-3.39 (having issue with m_channel)

89 views
Skip to first unread message

George

unread,
Aug 1, 2023, 1:37:57 AM8/1/23
to ns-3-users
Hello,

I am having issues with upgrading to ns3.39 due to modification I did (https://gitlab.com/GeorgeFrangulea/ns-3-dev/-/commit/65e669180e514e30e3435e9b0d158fe51ba9c9ca

This modification allows me to set WiFi with Uniform Plannar Array, which I need in order to set WiFi with the same 3GPP spectrum settings as the NR module. 


Now, I get the following error:
ns-3-dev/src/wifi/model/spectrum-wifi-phy.cc:493:5: error: 'm_channel' was not declared in this scope; did you mean 'Channel'?
  493 |     m_channel->StartTx(txParams);
      |     ^~~~~~~~~
      |     Channel


Due to the fact that m_channel changed from 
  •     Ptr<SpectrumChannel> m_channel; //!< SpectrumChannel that this SpectrumWifiPhy is connected to

to 

  •         WifiScanParams::Channel m_channel; ///< The channel the management frame was received on  

Can anyone please give me some indication on how I could account for this change? 

Thank you. 

best regards,
George

George

unread,
Aug 1, 2023, 11:20:47 PM8/1/23
to ns-3-users
According to this commit (https://gitlab.com/nsnam/ns-3-dev/-/commit/5c44a7ea014ad64f95d22176543445740ebc3cb3), as the name suggests the StartTx was moved to Spectrum Phy Interface. 

So I just did the modification to pass the Ptr<Object> instead of Ptr<AntennaModel> and it compiled ok. 
I hope this is not just surface level and this change will not create weird behaviour in WiFi. If anyone thinks otherwise, please let me know. 

Tom Henderson

unread,
Aug 2, 2023, 3:32:57 PM8/2/23
to ns-3-...@googlegroups.com


Sorry, I am not following what you are asking. Are you talking about a
potential modification to ns-3-dev to change some type?


> So I just did the modification to pass the Ptr<Object> instead of
> Ptr<AntennaModel> and it compiled ok.
> I hope this is not just surface level and this change will not create
> weird behaviour in WiFi. If anyone thinks otherwise, please let me know.
>
> On Tuesday, 1 August 2023 at 01:37:57 UTC-4 George wrote:
>
> Hello,
>
> I am having issues with upgrading to ns3.39 due to modification I
> did
> (https://gitlab.com/GeorgeFrangulea/ns-3-dev/-/commit/65e669180e514e30e3435e9b0d158fe51ba9c9ca <https://gitlab.com/GeorgeFrangulea/ns-3-dev/-/commit/65e669180e514e30e3435e9b0d158fe51ba9c9ca>
>
> This modification allows me to set WiFi with Uniform Plannar Array,
> which I need in order to set WiFi with the same 3GPP spectrum
> settings as the NR module.
>
>
> Now, I get the following error:
> ns-3-dev/src/wifi/model/spectrum-wifi-phy.cc:493:5: error:
> 'm_channel' was not declared in this scope; did you mean 'Channel'?
>   493 |     m_channel->StartTx(txParams);
>       |     ^~~~~~~~~
>       |     Channel
>
>
> Due to the fact that m_channel changed from
>
> *     Ptr<SpectrumChannel> m_channel; //!< SpectrumChannel that
> this SpectrumWifiPhy is connected to
>
>
> to
>
> *         WifiScanParams::Channel m_channel; ///< The channel the
> management frame was received on
>
>
> Can anyone please give me some indication on how I could account for
> this change?
>
> Thank you.
>
> best regards,
> George
>
> --
> Posting to this group should follow these guidelines
> https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
> <https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting>
> ---
> You received this message because you are subscribed to the Google
> Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ns-3-users+...@googlegroups.com
> <mailto:ns-3-users+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ns-3-users/45d3565f-cb89-41a1-b5a0-6007b5352341n%40googlegroups.com <https://groups.google.com/d/msgid/ns-3-users/45d3565f-cb89-41a1-b5a0-6007b5352341n%40googlegroups.com?utm_medium=email&utm_source=footer>.

George

unread,
Aug 2, 2023, 5:43:35 PM8/2/23
to ns-3-users

Hi Tom, 

Yes, you're right, let me give more context maybe this could actually have a more permanent fix so we can also keep NR-U updated to latest ns-3-dev and NR. 

5G-LENA NR-U module still uses ns-3.35 and 5g-lena-v1.2.y. Before I started working on it I got this explanation (regarding wifi-setup.cc):
(March 2022)  In the next release of ns-3 dev, this function will not exist anymore: 
  • spectrumPropagation->AddDevice (netDevice, antennaArray).  
    Where, const Ptr<ThreeGppSpectrumPropagationLossModel> & spectrumPropagation
So this code will need to be upgraded. E.g. one will need need to do to set to WifiSpectrumPhy an antenna object that is of type Ptr<UniformPlanarArray>.

I upgraded the code myself so I could work with the latest ns-3-dev and NR. However, since the changes I did can not go into ns-3-dev, this issue prevents anyone to further any work using NR-U since important bugs that were fixed (in the latest ns-3-dev and NR) are not available in these early versions. 
All in all, I always have to do small changes to allow the use of Ptr<Object> instead of Ptr<AntennaModel> in order to use the latest ns-3-dev with NR-U.
  • spectrum-signal-parameters
  • spectrum-wifi-phy
  • wifi-spectrum-phy-interface (Due to the latest change mentioned in my previous message) 
Anyway, thanks for your interest. Not sure how much interest is for NR-U atm, but if this is fixed, we could have one more module working with the latest ns-3-dev while also fixing major bugs that prevent people from running the current simulation for NR-U. 

Best regards,
George
Message has been deleted

George

unread,
Aug 4, 2023, 4:42:38 PM8/4/23
to ns-3-users
I have come across this old MR (https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/686) which explains better the need of having Ptr<Object> also seems to also have happened around the time NR-U stopped being updated to the latest NR and ns-3-dev.

Tom Henderson

unread,
Aug 4, 2023, 8:15:04 PM8/4/23
to ns-3-...@googlegroups.com, George
OK, so can you clarify, once you made this change, are things working for you again, or do you still have issues?

If you have issues, can you put some code on a branch somewhere for someone to look at more closely?

- Tom
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/978a4d69-6d3d-48e5-8319-5cde146b1ce1n%40googlegroups.com.


George

unread,
Aug 5, 2023, 4:52:49 PM8/5/23
to ns-3-users

Hi Tom, 

It does build with the modifications I did, but the code that worked with ns-3.38 does not work anymore. I posted a description of the issue I encountered now and also some code snippets and traces from gdb. 

I consider that it may be my misunderstanding of the proper WiFi spectrum setup. If that is not the case and has no easy solution, I will create a branch so someone could have a look. 
Thanks. 
Reply all
Reply to author
Forward
0 new messages