wifi output files with control characters

41 views
Skip to first unread message

Michael

unread,
Aug 11, 2009, 1:55:58 PM8/11/09
to ns-3-users
I am getting control characters (^@ and ^A) in my ascii output of wifi
models, such as examples/wifi-ap.cc and examples/mixed-wireless.cc. I
am running ns3-dev on Ubuntu 8.04. Is anyone else getting these
control characters? I can take the control characters out using vi,
but is there a way to prevent them from showing up at all?

Thanks!
Michael Nowatkowski
nowatkom at gmail dot com


Here are the first 2 lines of output from mixed-wireless.cc, from the
file mixed-wireless.tr:

+ 25000ns /NodeList/0/DeviceList/3/$ns3::WifiNetDevice/Phy/State/Tx
ns3::WifiMacHeader (MGT_BEACON ToDS=^@, FromDS=^@, MoreFrag=^@,
Retry=^@, MoreData=^@ Duration/ID=0us, DA=ff:ff:ff:ff:ff:ff,
SA=00:00:00:00:00:41, BSSID=00:00:00:00:00:41, FragNumber=^@,
SeqNumber=0) ns3::MgtProbeResponseHeader (ssid=wifi-infra0, rates=
[*6000000mbs 9000000mbs 12000000mbs 18000000mbs 24000000mbs
36000000mbs 48000000mbs 54000000mbs]) ns3::WifiMacTrailer ()
+ 25000ns /NodeList/1/DeviceList/3/$ns3::WifiNetDevice/Phy/State/Tx
ns3::WifiMacHeader (MGT_BEACON ToDS=^@, FromDS=^@, MoreFrag=^@,
Retry=^@, MoreData=^@ Duration/ID=0us, DA=ff:ff:ff:ff:ff:ff,
SA=00:00:00:00:00:46, BSSID=00:00:00:00:00:46, FragNumber=^@,
SeqNumber=0) ns3::MgtProbeResponseHeader (ssid=wifi-infra1, rates=
[*6000000mbs 9000000mbs 12000000mbs 18000000mbs 24000000mbs
36000000mbs 48000000mbs 54000000mbs]) ns3::WifiMacTrailer ()

Here are some lines further down in mixed-wireless.tr:

r 715019ns /NodeList/67/DeviceList/0/$ns3::WifiNetDevice/Phy/State/
RxOk ns3::WifiMacHeader (MGT_ASSOCIATION_REQUEST ToDS=^@, FromDS=^@,
MoreFrag=^@, Retr
y=^A, MoreData=^@ Duration/ID=60us, DA=00:00:00:00:00:55,
SA=00:00:00:00:00:53, BSSID=00:00:00:00:00:55, FragNumber=^@,
SeqNumber=0) ns3::MgtAssocRequest
Header (ssid=wifi-infra4, rates=[6000000mbs 9000000mbs 12000000mbs
18000000mbs 24000000mbs 36000000mbs 48000000mbs 54000000mbs])
ns3::WifiMacTrailer ()
r 715019ns /NodeList/69/DeviceList/0/$ns3::WifiNetDevice/Phy/State/
RxOk ns3::WifiMacHeader (MGT_ASSOCIATION_REQUEST ToDS=^@, FromDS=^@,
MoreFrag=^@, Retr
y=^A, MoreData=^@ Duration/ID=60us, DA=00:00:00:00:00:55,
SA=00:00:00:00:00:53, BSSID=00:00:00:00:00:55, FragNumber=^@,
SeqNumber=0) ns3::MgtAssocRequest
Header (ssid=wifi-infra4, rates=[6000000mbs 9000000mbs 12000000mbs
18000000mbs 24000000mbs 36000000mbs 48000000mbs 54000000mbs])
ns3::WifiMacTrailer ()

Mathieu Lacage

unread,
Aug 12, 2009, 2:58:05 AM8/12/09
to ns-3-...@googlegroups.com
this appears to be coming from ns3::WifiMacHeader::Print. A patch to fix
this code would be welcome (probably a matter or printing the relevant
fields in hexadecimal).

Mathieu

duy

unread,
Aug 13, 2009, 3:03:02 PM8/13/09
to ns-3-users
The patch is in, let me know if it's ok.
http://www.nsnam.org/bugzilla/show_bug.cgi?id=661

duy

On Aug 11, 11:58 pm, Mathieu Lacage <mathieu.lac...@sophia.inria.fr>
wrote:

duy

unread,
Aug 13, 2009, 3:26:48 PM8/13/09
to ns-3-users
I also find annoying problems with control characters with the error
output during compilation.

For example, let say I intentionally mispell backboneNodes as
ackboneNode. This is what it outputs:

../scratch/mixed-wireless.cc: In function âint main(int, char**)â:
../scratch/mixed-wireless.cc:116: error: âbackboneNodesâ was not
declared in this scope
cc1plus: warnings being treated as errors
../scratch/mixed-wireless.cc:96: error: unused variable âackboneNodesâ

Maybe you can point me to places where I can take a look at this bug.

duy


On Aug 13, 12:03 pm, duy <dnl...@gmail.com> wrote:
> The patch is in, let me know if it's ok.http://www.nsnam.org/bugzilla/show_bug.cgi?id=661

Mathieu Lacage

unread,
Aug 13, 2009, 3:31:59 PM8/13/09
to ns-3-...@googlegroups.com
On Thu, 2009-08-13 at 12:26 -0700, duy wrote:
> I also find annoying problems with control characters with the error
> output during compilation.
>
> For example, let say I intentionally mispell backboneNodes as
> ackboneNode. This is what it outputs:
>
> ../scratch/mixed-wireless.cc: In function âint main(int, char**)â:
> ../scratch/mixed-wireless.cc:116: error: âbackboneNodesâ was not
> declared in this scope
> cc1plus: warnings being treated as errors
> ../scratch/mixed-wireless.cc:96: error: unused variable âackboneNodesâ
>
> Maybe you can point me to places where I can take a look at this bug.

This is the output of your C++ compiler and the control characters you
see are something like '. I suspect that you have a misconfigured
terminal/locale.

Mathieu

Reply all
Reply to author
Forward
Message has been deleted
0 new messages