how to change the energy level of nodes on cooja - contiki

I use the wireless sensor network simulation software cooja I want to know how I can change the level of each node manually. Is this function (cc2420_set_txpower()) able to help me and how? if not, do you have any idea about that

cc2420_set_txpower() will only change the power consumption rate of node. In cooja the nodes have infinite energy levels. What you can do is that you can run simulation for certain time and then process powertrace logs to compute total energy depleted.

Related

RTU Modbus difference between PM5110 and PM5350

Good Day Everyone!
I have some problem to read Modbus registers over RTU mode. I believe there are a lot of expert in this community. I will be grateful if you help me how to sort out this problem.
My objective is to read the current and voltage data using raspberry pi 4. I develop one code which make the raspberry pi4 to communicate with power meter using Modbus over RTU. I successfully manage to read the data using Schneider power meter (PM5350) but when I use Schneider power meter (PM5110) it fail. I saw the registers for both of power meter is same but still I cannot get the data from PM5110. I already check the wiring connection, baud rate and address. Everything is good but still I cannot get the data from the power meter.
Another curiosity is that every model have different offset of registers? If do so how to know about the offset?
Thank You.

Network Usage in windows 10 never going past 1%?

So i started making test streams on my youtube channel using Streamlabs OBS.
I turned on performance mode, looked at the stream but it was like 2 fps.
I looked at task manager and my network usage was NEVER going past 1%, and streamlabs's network usage rarely went past 0.1 mbps.
This happens with other things too, and i don't like it since it makes my internet so slow. Internet (if you're wondering): Verizon Fios 5Ghz connection.
The percentage simply shows the relation between the current network usage and the link speed of your network adapter. For example, if your link speed is 1 Gbps and you're transferring data at 10 Mbps, the network usage will be 1%.
When transferring data over the Internet, the percentage is generally not very useful, because the maximum speed is defined by your ISP and, in your case, is likely to be a lot lower than your adapter speed. Furthermore, your Internet speed can also be degraded by a poor Wi-Fi signal, by other users in the same network, etc.
What you should actually be looking at is the actual speed (in bit/s) at which you are sending data (look at the "Send" field in the performance tab of the task manager) and compare that to your Internet speed (which you can learn by doing a speed test).

Using consumer cellphones to build a mesh network for IOT devices?

I have been looking into LoRaWAN for a low cost waterproof asset tracker I am looking at building.
AFAIK, the primary benefits of LoraWAN over say LTE-M or cellular are: no connectivity costs and potentially lower power consumption.
What I'm wondering is: why can't we use our own cellphones as the "base station" that the IOT device talks with? We can do this with bluetooth and WiFi, why not cell? Is it the LTE protocol that prevents it? Physics? What am I missing?
There's quite a few architectural reasons why Peer-to-Peer LTE isn't feasible, but the largest is probably the fact that in LTE the uplink and downlink use different modulation techniques.
In the downlink (the connection from the Base stations (eNodeBs) to the User Equipment (our mobile phones)) Orthogonal Frequency Division Multiplex (OFDMA) is used, this means the phone listens out onto the RF interface for the OFDMA signal.
This works well, OFDMA is a great way of encoding the data onto the air interface, but it has a very high peak-to-average-power ratio, this means if the UEs used OFDMA in the Uplink (From the UE to the eNodeB) they'd have awful battery life.
Instead in the Uplink LTE uses Single Carrier Frequency Division Multiple Access (SC-FDMA), which is much more power efficient and allows you talk all day, so the eNodeBs listen on their RF interface for the SC-FDMA modulated traffic.
This means our UEs (Mobile phones) use one type of modulation to send and a different modulation scheme to receive, so they can't talk directly to one another as they can't send OFDMA modulated data, only receive & visa-versa.
Some more reading on OFDMA & SC-FDMA.
The LTE relay interface inducted as part of Release 10 allows the deployment of relay nodes (a kind of low cost eNB) that are fixed and that use in-band LTE to extend the coverage of standard eNodeBs by one hop, improve signal quality and to increase the network capacity. Relays can be placed such that it converts the long single hop into two shorter hops.
However the approach of using UE seems have many challenges as it can make UE to get bit loaded with more functional changes across layers(MAC, PHY, RRC, NAS) as it has to take additional functionalities from Relay nodes/eNB as well ranging from lower layer signalling, co-ordination, mobility to forwarding. Also, there might be additional power consumption and change in antenna to support the same which all will add to more cost of UE.

How to set/ get the time spent on packets fragmentation in ns-3 models?

If I transfer a packets through multiple subnets, which have different MTU on the routers, it may be fragmented. How can I get or set the time spent on each operation of fragmentations in ns-3 models? I need to know this to calculate the speed.
What you are asking is unclear to me but let me try to answer.
If you want to measure the CPU time it takes for ns-3 to create fragments and reassemble them, you can run a simple 2-node experiment and change the mtu of the outbound network interface of the sending node to see how much wall-clock time is spent fragmenting vs non-fragmenting.
If, on the other hand, you want to measure the effect in terms of simulation time of splitting a packet in multiple packets and perform the MAC-level access function for each fragment, it's just a function of
the access function used at the MAC level. If you want to model switched ethernet, it's easy. make it zero.
the transmission delay through your medium. If ethernet, it's easy again: it's the length of the cable modulo the speed of the electromagnetic waves in your cable which depends on the quality of the cable.
the size of the fragment and the throughput of your medium.
Basically, if you know how many times the packet will be fragmented (it is possible for multiple routers to fragment the packet consecutively in smaller fragments) and which mtu will be used every time, you can trivially create an analytical model of that process and predict the actual transport-level transmission delay of your packets through the simulation.

Positioning network probes to span the globe

I'm trying to connect to a given number of peers in a P2P network and I'd like to have them span the globe as good as possible (have them as far away from each other as possible). Since I gradually connect to them one after another I will discover better peers one after another and discard (or disconnect) from peers that drop out of my top list. Problem is that I'm stuck defining a metric that tells me how "good" a peer is. I will be using a geo ip database to map ips to geo coordinates but I just can't find a good metric to apply.
In my opinion you should not think of geography but in network topology. For every new peer you should do traceroute and ping so you know how the good the connectivity is. Store this and do cost-calculation. Most simply in just adding up the latency. Bandwidth and latency are more important. If you are concerned with the local laws where the specific peer is located you could start think in geography.
I wonder, are you able to get your users to set a location in their UI? That might be a better measure of geographical spread than ping times. That said, for a variety of complicated reasons - as I'm sure you know - two nodes 500 miles apart may have better speed and latency measurements than two nodes 250 miles apart. So it depends whether you care about location or performance :)

Resources