Logging Zigbee network statistic - zigbee

Is there any zigbee cluster (or others zigbee methods) that we can use to for network statistic?
I will need to log inside the coordinator all the link quality/pattern and the signals strength of the zigbee network.

You may use the Mgmt_Lqi_req from the ZDP (if your stack supports this) and collect the data from all FFD devices. As you can see in the Specification the response contains the LQI value for each 1 hop neighbor.

Another option is to use the Freakduino to sniff 802.15.4 traffic for later analysis with wireshark.
At this moment, only the 2.4GHz version of the Freakduino is available, though a 900MHz version is in progress, so only 2.4GHz networks can be sniffed.

Related

Locate Computer in Network topology

I ask myself that for some days now, and couldn't find a clear answer.
Imagine a network with several rooms, each room with it's own (Layer 2) Switch.
Those are then connected in star topology to another switch which is then connected to the router.
All Clients get IPs from the same range, all clients are in the same subnet and in the same VLAN.
Do you know a way how to determine, which client is connected to which switch, without involving the switch. E.g only with technologies and mechanisms taking place on the client.
The goal would be to be able to draw automated maps of the client distribution in the network, but, as I said, without involving the switch (for example access it's API or somethign like that).
Regards
Me
I am afraid that you are right: In general, in a "normal" Network (which means: In a Network with just Standard Switches and Routers), there is no way to do so.
Only if the Switches were managed, you could write a script which polls the arp-tables from the Switches, but of course this doesn't work with unmanaged Switches.
I realised that there is no way to do this.
The problem is, that a normal network switch, which works on Layer 2 of the OSI model, is not "visible" for tools like traceroute or such.
If you want to traceroute to, lets say: google.com, your traceroute application sends a packet with a TTL of 1 to your default gateway. Your default gateway then decreases the TTL and discards the package, because it has reached a TTL of 0.
Because of that, it answers to your computer and your computer can record, from where it received the first answer.
It then sends again a package to google.com, but this time with a TTL of 2, and the process begins from start.
Now you can't do with switches what you can do with routers, because (normal layer 2) switches do not know about IP...
Cisco offers a layer2 traceroute utility, but this is limited to the cisco ecosystem and only works with cisco hardware.
So, I fear the answer is, that it is not possible in general.

Simulating wireless network transmission

I have an embedded wireless driver for wireless communication that I would like to run in a simulated environment so that I don't have to own hundreds of the devices to test my code.
Ultimately I would like to be able to specify a network connection between nodes, which would be an instance of the C++ code that is used in the embedded device. The connection should simulate the wireless medium such that no packets arrive to the node whilst it is transmitting and no packets arrive at the node if two or more nodes are trying to transmit. Connections modelled by a basic connectivity graph.
I wonder if such a model is possible in the Python Twisted framework. If it is not are there any networking frameworks that would make such a task simple.
Language preferences are Python or Java.
Thanks.
You can use Network Simulator 2 (NS2). Its a awesome network simulator. Its uses C++ and TCL.

Are the ZigBee APIs still AT commands?

I'm attempting to get some ZigBee equipment to communicate with each other. I've had some success with the XBee USB, but I have had to switch to Telegesis recently. This piece appears to have a specific AT command set. Will it be compatible with ZigBee sensors made by other companies?
Also - I've run across a few APIs for ZigBee. Are they all just AT commands at the core?
AT commands are just used to configure the Telegesis ZigBee module. It's a SoC and can work in any mode (coordinator/router/zed). On the other side, it talks the ZigBee language and can communicate with any ZigBee certified device. So it can be used to create a ZigBee network or can be included in any ZigBee network.
All ZigBee radios should interoperate -- you just need to make sure they are configured to join to each other. With XBee modules, be sure to set ATZS to 2 so the radios form and try to join a true ZigBee network. The default setting of 0 is for non-ZigBee networks.
To have modules join to each other, you'll need to know the PAN ID and possibly link key used to secure the network.
Once you start communicating via ZigBee, expect to use these modules in an API frame mode, where you need to set address information (destination node, source/destination endpoint, cluster) in the headers.

Mesh Network using Zigbee and Microcontrollers

I would like establish a mesh network using Zigbee modules and ATmega8.
I need some basic c routines for establishing the network. My Controller is running with ATmega32. and end nodes will be on ATmega8.
I want plug and play wireless connection between Controller unit and nodes.
Please help me.
The Digi XBee series of RF modules is popular for plug and play wireless. In it's simplest configuration, a pair of modules operates as a serial cable replacement, with bytes going in on one module coming out on the other.
If you want to have a multi-node network, you'll have to use the radios in API mode, where frames include a header with addressing information and checksum in the footer. Digi has released an ANSI C XBee Host Library as Open Source on GitHub that could be a good starting point for that since you mention using C. It looks like there's even a fork of the library targeting the AVR platform.
#user2031622, zigbee nowdays has builtin microcontroller such as CC2530 provided by TI stack (Texas instruments).CC2530 has a inbuilt 8051 microcontroller which supports mesh networking.

Simulate high speed network connection

I have created a bandwidth meter application to measure total Internet traffic. I need to test the application with relatively high data transfer rates, such as 4 Mbps. I have a slow Internet connection, so I need a simulator to test my application to see the behavior with high throughput rates.
As an option, you can run some HTTP server in one virtual machine with NAT'ed network adapter and test your bandwidth meter against it from the host system or a similar VM.
There are commercial packet generators that do this, and also a few freely available ones like PackETH and Bit-Twist.
There are also other creative solutions. For example, do the packets need to be IP packets for your purpose? If not, you could always get a "dumb" switch or hub (no spanning-tree or other loop protection) and plug a crossover cable into it. (or a straight-through Ethernet cable would work if the switch supports Auto-MDIX) The idea would be that with a loop in your network, the hub/switch will flood the network to 100% for you since it will continually re-forward the same packets.
If you try this, be sure yours is the only computer on the network, since this technique will effectively render it useless. ;-)
You could always send some IP broadcast packets to "seed" the loop. Otherwise, the first thing I think you'd likely see is broadcast ARP packets, which won't help if you're measuring layer 3 traffic only.
Lastly, (and especially if this sounds like too much trouble) I recommend you read up on dependency injection and refactor your code so you can test it without the need for a high-speed interface. Of course, you'll still need to test your code in a real high-speed environment, but doing this will give you much more confidence in your code.

Resources