How to set receiver power parameter in xmac/Bmac

55 views
Skip to first unread message

SEDE

unread,
May 26, 2020, 8:27:05 PM5/26/20
to inetframew...@googlegroups.com

Hello everyone,

I am studying the MAC protocols implemented in INET framework. In .ini file, transmitter power parameter is given, but the receiver power is not given.

Can anyone please suggest me how to set receiver power parameter?


Please anyone suggest me.

Regards,


Alfonso Ariza Quintana

unread,
May 27, 2020, 4:41:47 AM5/27/20
to inetframew...@googlegroups.com
the parameter is "sensitivity", the units dBm.

De: inetframew...@googlegroups.com <inetframew...@googlegroups.com> en nombre de SEDE <afroz...@gmail.com>
Enviado: miércoles, 27 de mayo de 2020 2:27
Para: INET Framework Contributors <inetframew...@googlegroups.com>
Asunto: [inet-contrib] How to set receiver power parameter in xmac/Bmac
 

Hello everyone,

I am studying the MAC protocols implemented in INET framework. In .ini file, transmitter power parameter is given, but the power required to receive a packet is not given.

Can anyone please suggest me how to set receiver power parameter?


Please anyone suggest me.

Regards,


--
You received this message because you are subscribed to the Google Groups "INET Framework Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inetframework-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inetframework-contrib/283d03d1-700f-4907-a380-ac175322aa71%40googlegroups.com.

SEDE

unread,
May 27, 2020, 7:22:58 AM5/27/20
to INET Framework Contributors

Dear Alfonso,

Thank you Sir. May I ask you  one more question- in .ini file, the parameter checkinterval is initialized (code below). In literature, check interval is defined as the duration between two consecutive wake-up time, but here in comment it is written as CCA. In my knowledge, CCA is the duration during which a node senses the channel, then how check interval and CCA be same?

// how long is the check interval (CCA)?
        double checkInterval @unit(s) = default(0.01s);


Many thanks Sir.

On Wednesday, May 27, 2020 at 6:41:47 PM UTC+10, Alfonso Ariza Quintana wrote:
the parameter is "sensitivity", the units dBm.


Enviado: miércoles, 27 de mayo de 2020 2:27
Para: INET Framework Contributors <inetframew...@googlegroups.com>
Asunto: [inet-contrib] How to set receiver power parameter in xmac/Bmac

Hello everyone,

I am studying the MAC protocols implemented in INET framework. In .ini file, transmitter power parameter is given, but the power required to receive a packet is not given.

Can anyone please suggest me how to set receiver power parameter?


Please anyone suggest me.

Regards,


--
You received this message because you are subscribed to the Google Groups "INET Framework Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inetframework-contrib+unsub...@googlegroups.com.

alfonso

unread,
May 27, 2020, 12:06:31 PM5/27/20
to inetframew...@googlegroups.com


Yes, it is the carrier sensing medium interval before to change to TX mode

El 27/5/20 a las 13:22, SEDE escribió:
To unsubscribe from this group and stop receiving emails from it, send an email to inetframework-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inetframework-contrib/cfa06cae-a4df-4da8-80b8-0cc55079ca58%40googlegroups.com.
-- 
Alfonso Ariza Quintana
Profesor Titular (Associate Professor/Senior Lecturer) 
del área de Tecnología Electrónica.

Dpto. Tecnología Electrónica.
E.T.S.I. de Telecomunicación
Universidad de Málaga
Campus de Teatinos
Bulevar Louis Pasteur nº 35
29071 Málaga
España

SEDE

unread,
May 27, 2020, 8:11:04 PM5/27/20
to INET Framework Contributors

Hello Alfonso,

Sir, does it mean the check interval = listening time + sleeping time?

Where i can set default listening duration of a node then?

Many thanks Sir.

Alfonso Ariza Quintana

unread,
May 28, 2020, 3:23:49 AM5/28/20
to inetframew...@googlegroups.com
xmac is a protocol that sleeps the radio and awakes periodically

De: inetframew...@googlegroups.com <inetframew...@googlegroups.com> en nombre de SEDE <afroz...@gmail.com>
Enviado: jueves, 28 de mayo de 2020 2:11

Para: INET Framework Contributors <inetframew...@googlegroups.com>
Asunto: Re: [inet-contrib] How to set receiver power parameter in xmac/Bmac
 
To unsubscribe from this group and stop receiving emails from it, send an email to inetframework-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inetframework-contrib/11fe5843-4110-4c48-b4ff-a2460f634cd7%40googlegroups.com.

SEDE

unread,
May 28, 2020, 4:30:46 AM5/28/20
to INET Framework Contributors
Hello Alfonso,

Yes Sir, xmac is a duty cycled protocol. But, i cannot find any parameter or method where that period is defined. How i can set the period after which nodes will wake up?

Thank you Sir

On Thursday, May 28, 2020 at 5:23:49 PM UTC+10, Alfonso Ariza Quintana wrote:
xmac is a protocol that sleeps the radio and awakes periodically

SEDE

unread,
May 29, 2020, 4:39:18 AM5/29/20
to INET Framework Contributors
Hello Alfonso, any suggestion Sir?

Thank you

On Thursday, May 28, 2020 at 5:23:49 PM UTC+10, Alfonso Ariza Quintana wrote:
xmac is a protocol that sleeps the radio and awakes periodically

alfonso

unread,
May 29, 2020, 6:25:45 AM5/29/20
to inetframew...@googlegroups.com


Yes, you can set the interval and listening time in the ini file and the default value is set in the ned definition file

El 29/5/20 a las 10:39, SEDE escribió:
To unsubscribe from this group and stop receiving emails from it, send an email to inetframework-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inetframework-contrib/6e00d2b6-88aa-44d5-8a79-a1001d305788%40googlegroups.com.

SEDE

unread,
May 29, 2020, 6:39:01 AM5/29/20
to INET Framework Contributors

Hello Alfonso,

Sir, In ned or ini file there is no such parameter to set sleeping duration and listening duration or wake-up interval. Did you mean I have to create new parameters for sleeping and listening duration?

In ned file, there is only check interval that is meant as CCA.

Please Sir suggest me.

Many thanks

alfonso

unread,
May 31, 2020, 7:16:31 AM5/31/20
to inetframew...@googlegroups.com

        // how long is one slot?
        double slotDuration @unit(s) = default(1s);



        // how long is the check interval (CCA)?
        double checkInterval @unit(s) = default(0.01s);


The total time is CCA + Slot duration

El 29/5/20 a las 12:39, SEDE escribió:
To unsubscribe from this group and stop receiving emails from it, send an email to inetframework-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inetframework-contrib/5d270b59-41d3-41f0-8fbf-9642ef493870%40googlegroups.com.

SEDE

unread,
Jun 1, 2020, 4:01:02 AM6/1/20
to INET Framework Contributors
Hello Alfonso,

Sir, I am confused what does the total time (CCA+ slot duration) mean here. In terms of sleeping duration and active duration, can you please explain a bit more what does slot duration stand for?

I was thinking check interval period = sleeping period+ active period

Kind Regards,

Alfonso Ariza Quintana

unread,
Jun 1, 2020, 12:08:08 PM6/1/20
to INET Framework Contributors
The best id to check the source code, after finish the CCA, the node program the preamble for a slot duration if it needs to transmit or sleep for a slot duration if there isn't any transmission
If the node doesn't need to transmit and it doesn't listen any transmission the node will be awake CCA time and slept a slot duration
the hyperperiode without transmission or reception will be CCA+Slot. If the node needs to transmit or it receives something in the CCA, the time sequence change

case CCA:
if (msg->getKind() == XMAC_CCA_TIMEOUT)
{
// channel is clear and we wanna SEND
if (!txQueue->isEmpty())
{
radio->setRadioMode(IRadio::RADIO_MODE_TRANSMITTER);
changeDisplayColor(YELLOW);
macState = SEND_PREAMBLE;
// We send the preamble for a whole SLOT duration :)
scheduleAt(simTime() + slotDuration, stop_preambles);
// if 0.2f * CI = 2ms to switch to TX -> has to be accounted for RX_preamble_detection
scheduleAt(simTime() + 0.2f * checkInterval, switch_preamble_phase);
return;
}
// if anything to send, go back to sleep and wake up after a full period
else
{
scheduleAt(simTime() + slotDuration, wakeup);
macState = SLEEP;
radio->setRadioMode(IRadio::RADIO_MODE_SLEEP);
changeDisplayColor(BLACK);
return;
}
}

De: inetframew...@googlegroups.com <inetframew...@googlegroups.com> en nombre de SEDE <afroz...@gmail.com>
Enviado: lunes, 1 de junio de 2020 10:01
To unsubscribe from this group and stop receiving emails from it, send an email to inetframework-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inetframework-contrib/4d48120b-b22d-4a30-8360-23d694059cc3%40googlegroups.com.

SEDE

unread,
Jun 1, 2020, 8:37:31 PM6/1/20
to INET Framework Contributors
Thank you Sir. Your explanation is really helpful!

Kind Regards

On Tuesday, June 2, 2020 at 2:08:08 AM UTC+10, Alfonso Ariza Quintana wrote:
The best id to check the source code, after finish the CCA, the node program the preamble for a slot duration if it needs to transmit or sleep for a slot duration if there isn't any transmission
If the node doesn't need to transmit and it doesn't listen any transmission the node will be awake CCA time and slept a slot duration
the hyperperiode without transmission or reception will be CCA+Slot. If the node needs to transmit or it receives something in the CCA, the time sequence change

case CCA:
if (msg->getKind() == XMAC_CCA_TIMEOUT)
{
// channel is clear and we wanna SEND
if (!txQueue->isEmpty())
{
radio->setRadioMode(IRadio::RADIO_MODE_TRANSMITTER);
changeDisplayColor(YELLOW);
macState = SEND_PREAMBLE;
// We send the preamble for a whole SLOT duration :)
scheduleAt(simTime() + slotDuration, stop_preambles);
// if 0.2f * CI = 2ms to switch to TX -> has to be accounted for RX_preamble_detection
scheduleAt(simTime() + 0.2f * checkInterval, switch_preamble_phase);
return;
}
// if anything to send, go back to sleep and wake up after a full period
else
{
scheduleAt(simTime() + slotDuration, wakeup);
macState = SLEEP;
radio->setRadioMode(IRadio::RADIO_MODE_SLEEP);
changeDisplayColor(BLACK);
return;
}
}

SEDE

unread,
Jun 1, 2020, 9:13:22 PM6/1/20
to INET Framework Contributors
Hello Alfonso,

Sir, can you say why in below code the switch_preamble_phase is scheduled differently where switch_preamble_phase is already scheduled under CCA case?

scheduleAt(simTime() + 0.5f * checkInterval, switch_preamble_phase);

In case CCA it was
scheduleAt(simTime() + 0.2f * checkInterval, switch_preamble_phase);




case SEND_PREAMBLE:
        if (msg->getKind() == SWITCH_PREAMBLE_PHASE) {
            //~ make room for preamble + time_for_ack_back, check_interval is 10ms by default (from xmac.ned)
            // 0.5f* = 5ms
            if (radio->getRadioMode() == IRadio::RADIO_MODE_RECEIVER) { //tx
                radio->setRadioMode(IRadio::RADIO_MODE_TRANSMITTER);
                changeDisplayColor(YELLOW);
                EV_DEBUG << "node " << address << " : preamble_phase tx, simTime = " << simTime() << endl;
                scheduleAt(simTime() + 0.5f * checkInterval, switch_preamble_phase);
            }
            // 1.0f* = 10ms
            else if (radio->getRadioMode() == IRadio::RADIO_MODE_TRANSMITTER) { //rx
                radio->setRadioMode(IRadio::RADIO_MODE_RECEIVER);
                changeDisplayColor(GREEN);
                EV_DEBUG << "node " << address << " : preamble_phase rx, simTime = " << simTime() << endl;
                scheduleAt(simTime() + 1.0f *checkInterval, switch_preamble_phase);
            }
            return;

Kind Regards,


On Tuesday, June 2, 2020 at 2:08:08 AM UTC+10, Alfonso Ariza Quintana wrote:
The best id to check the source code, after finish the CCA, the node program the preamble for a slot duration if it needs to transmit or sleep for a slot duration if there isn't any transmission
If the node doesn't need to transmit and it doesn't listen any transmission the node will be awake CCA time and slept a slot duration
the hyperperiode without transmission or reception will be CCA+Slot. If the node needs to transmit or it receives something in the CCA, the time sequence change

case CCA:
if (msg->getKind() == XMAC_CCA_TIMEOUT)
{
// channel is clear and we wanna SEND
if (!txQueue->isEmpty())
{
radio->setRadioMode(IRadio::RADIO_MODE_TRANSMITTER);
changeDisplayColor(YELLOW);
macState = SEND_PREAMBLE;
// We send the preamble for a whole SLOT duration :)
scheduleAt(simTime() + slotDuration, stop_preambles);
// if 0.2f * CI = 2ms to switch to TX -> has to be accounted for RX_preamble_detection
scheduleAt(simTime() + 0.2f * checkInterval, switch_preamble_phase);
return;
}
// if anything to send, go back to sleep and wake up after a full period
else
{
scheduleAt(simTime() + slotDuration, wakeup);
macState = SLEEP;
radio->setRadioMode(IRadio::RADIO_MODE_SLEEP);
changeDisplayColor(BLACK);
return;
}
}

Alfonso Ariza Quintana

unread,
Jun 2, 2020, 11:09:26 AM6/2/20
to inetframew...@googlegroups.com
I don't know, I suppose that you will need to check the protocol definition,

De: inetframew...@googlegroups.com <inetframew...@googlegroups.com> en nombre de SEDE <afroz...@gmail.com>
Enviado: martes, 2 de junio de 2020 3:13
To unsubscribe from this group and stop receiving emails from it, send an email to inetframework-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inetframework-contrib/79279e55-1b68-47e6-8c1c-380dcf32f775%40googlegroups.com.

SEDE

unread,
Jun 2, 2020, 11:05:44 PM6/2/20
to INET Framework Contributors

Hello Ievy,  can you please answer the above query regarding scheduling switch_preamble_phase?

Many thanks
Reply all
Reply to author
Forward
0 new messages