Hi Navneet Pandey, Den mån 5 nov. 2018 18:11 skrev Navneet Pandey <[email protected]>:
> Hello, > > > > Could someone please point out the code where radio is switched on/off > when sending a MAC/UDP packet. > It is not switched off unless you are using a duty cycling MAC layer such as lwmac or ContikiMAC [1] > > > I am expecting something similar to the following code snippet: > > /** Turn the MAC layer on. */ > > int (* on)(void); > > > > /** Turn the MAC layer off. */ > > int (* off)(int keep_radio_on); > > > > This code is from Contiki. > The equivalent call for switching the radio to sleep mode like the contiki on/off calls would be netdev_driver::set [2] with opt=NETOPT_STATE and *value=NETOPT_STATE_SLEEP or NETOPT_STATE_IDLE. Take a look at what happens in the ifconfig shell command when you call it with ifconfig x set state sleep [3] > > > I am interested in understanding the time it takes for system to wake up > from sleep (dormant mode) to receive packets. > > > I am actually working on some similar performance measurements for a project as well. I will need to measure some various timings related to CPU low power modes and ContikiMAC. Right now I don't have anything to show, but I can post back when I have some test program. The testing setup will consist of a logic analyzer and using some gpio pins for status. Best regards, Joakim References: [1]: https://github.com/RIOT-OS/RIOT/pull/9478 [2]: http://api.riot-os.org/structnetdev__driver.html#ad5c8c409276a702877ad50ad09e87a58 [3]: https://github.com/RIOT-OS/RIOT/blob/master/sys/shell/commands/sc_gnrc_netif.c#L826 > Thank you. > > > > Regards, > > Navneet Pandey > > > _______________________________________________ > users mailing list > [email protected] > https://lists.riot-os.org/mailman/listinfo/users >
_______________________________________________ users mailing list [email protected] https://lists.riot-os.org/mailman/listinfo/users
