NS-3 WIFI Base Station and accesspoint handover - ns-3

I am a new user of NS-3. Can you help me in writing a code of handover in between nodes in Wi-Fi environment?

I'm gonna base my response on the little information you have provided.
General idea of Wi-Fi (as the technology which we use on daily basis to connect to internet and stuff like that :D) is based on IEEE 802.11 standard which does not support handover between nodes. Therefor you either are asking the wrong question or you want to implement the handover support to a IEEE 802.11 standard.
In case you want to do the latter I strongly suggest you to do the following steps (NS-3 tutorial in case needed):
1- Install NS-3 simulator on a Linux operating system, preferably Ubuntu 14.04.
2- Browse wifi/examples folder and try to fully understand basic wifi examples.
3- Implement your proposed algorithm in proposed scenario (Which obviously requires you to understand how user equipment connects to a Wi-Fi access point automatically and how APs can interact with each other and etc.).

Related

Zigbee sniffer to Penetrate Testing Zigbee network at home

I have installed Smart home temperature sensors with Zigbee network. I am trying to do a Penetrate Testing. I have installed WirelessShark. I purchased a CEL ME357 USB stick. But
I could not find driver for it. To proceed the test, can anyone suggest a working solution for me ?
It's a little hard to know exactly what you are trying to acheive, or what OS you are using etc, but hopefully the following helps answer your question.
I purchased a CEL ME357 USB stick. But I could not find driver for it.
Drivers for the CEL MeshConnect sticks are available on their website for both Windows and Mac -:
http://www.cel.com/parts.do?command=load&idRootPart=2707
Scroll down to the bottom of the page and there are downloads.
I have installed WirelessShark
There is sniffer software available that will work with standard Silabs software and runs on Java (so is portable across most operating systems). You can find the Java sniffer software which will work with Wireshark here -:
https://github.com/zsmartsystems/com.zsmartsystems.zigbee.sniffer
Note though that you will need to program firmware into the CEL stick as it does not come pre-installed. This normally requires that you purchase a developers kit from Silicon Labs in order to a) get the hardware, and b) get access to the firmware.
One of the easyest way is to use Zboss sniffer with Wireshark and one of the supported USB 802.15.4 dongle. For example TI CC2531EMK. It will need to be flashed with a specific firmware so you will also need a CC-debugger to perform programming.
An other solution is to use the Ubisys sniffer dongle directly with Wireshark but it is not same price.
I suppose there are lots of other sniffers but I personally used these and the first one is especially easy to setup.

Is LoRaWan only accessible with an internet connection?

I'm planning to build an IoT project for an oil palm plantation through the use of an Arduino and an Android Mobile application for my final year project in University. As plantations have low to no communication signals which includes wifi, it is possible to implement LoRaWAN without access to the internet/use/ of a web-based application?
The LoRaWAN node does not need any other communications channel aside from LoRaWAN, of course. Would not make any sense otherwise. ;-)
The gateway however does need a connection to the server application that is to be used as a central instance for your use case. Usually this is an existing LoRaWAN cloud service such as The Things Network (TTN) with your application connected behind, but in theory you could connect the gateway to your very own central, making your whole network independent. This is possible because LoRa uses frequency bands free for use (ISM bands) so anyone can become a „network operator“. The TTN software is available as Open Source, for example.
Connection from the gateway to the central is usually done via existing Ethernet/WiFi infrastructures or mobile internet (3G/4G), whatever suits best.
Besides, the LoRa modules available for Arduinos can be used for a low-level, point-to-point LoRa (not LoRaWAN) connection between two such modules. No gateway here. Maybe that is an option, too, for your use case.
The LoraWAN is using the Gateway connected to some kind of cloud, for example the TTN network which is community based. If you live in a bigger city you have good chances to have a TTN Gateway in your area.
You can however connect two Lora nodes together to get a point to point connection. You can send data from Node1, which is connected to some kind of sensor and batterypowered, to Node2, which is stationary and stores all the data to a flashdrive for example. From this flashdrive you can import the data to a website or you could use an application like Node-Red to display the data on a Dashboard.
Here you will find instructions on how to send Data from one Lora-Node to another.
Here you will find instuctions on how to use Node-Red to display your Lora-Data. You will have to change the input from the TTN-Cloud to a textfile on your Raspberry, or whatever gateway you use. (Optional)

How to power off USB device from Windows using batch or any API

For testing purposes I need to power off a USB device from my computer programmatically. The microprocessor in the USB device is ARM Cortex M4.
I have tried using Devcon, although the device was disabled, power was still provided to the device.
I have also tried to disable the USB root hubs ,that also didn't work.
I have read some other posts indicating that a SSR could be used, this option is not desired. I would rather choose the software solution(if there is one of course).
Some other answers have indicated that this is an OS issue, and some others a chip-set architecture issue.
So my question is what options are there available. And also is this purely something dependent on the computer side or do we need to implement something on the USB device side as well.
Thank you in advance.

Choosing between network (Ethernet or WiFi) programmatically

On my mac I have two kinds of networks available - Ethernet, WiFi.
While making a server call, can I somehow control which network channel to use for making the server call? So, before making server call, I want to specify the network channel to be used for that call - Ethernet or WiFi.
How can this be achieved using objective C. I am working on a cocoa application.
I assume both NIC's are connected to Internet (so both have a IP):
I don't think you can solve it within code (not 100% sure). But what you could do is setup some local routes, configuring which traffic goes over what NIC.
Look at the route command ('man route').
This might help you:
https://serverfault.com/questions/100613/public-traffic-to-go-over-1-nic-and-private-traffic-to-use-another-nic
You can modify the routes available with the System Configuration framework. In scutil(8) you can see the routes that are presently installed in the State:/Network/Service/* dictionaries, and in order to manipulate these programmatically you have to us the SCDynamicStore framework, which is C.
However, if you were trying to just do some ad-hoc service on WLAN only, you could use the CoreWLAN framework, which is in Objective-C.

Programming USB in embedded system for sending some data to host for printing

I have been tasked with writing a USB driver for our embedded software to send raw data to Host. This will be used to send some logging data to host. We are using iMX31 litekit for development.
From the documents that I have read on USB, my understanding is that the embedded device will be in device mode only. Also it will only be communicating with host machine.
So can any one guide me here? Any article, reference or code is welcome.
Some things to consider:
Is this a high bandwidth device like a camera or data recorder, or a low bandwidth device?
For low bandwidth, I would strongly consider making your device act as a USB HID class. This is the device class that supports keyboards, mice, joysticks, gamepads, and the like. It is relatively easy to send data to nearly any application, and it generally doesn't require that you write a custom device driver on the host side. That latter feature alone is often worth the cost of lightly contorting your data into the shape assumed by the HID class. All the desktop operating systems that do USB can use HID devices, so you get broad compatibility fairly easily.
For high bandwidth, you would still be better served if your device fits one of the well established device classes, where a stock device driver on the host end of the wire can be used. One approach that often works is to use the Mass Storage class, and emulate a disk drive containing one file. Then, your device simply mounts on the host as if it were a disk, and you communicate by reading and writing to one (or a few) file.
I would expect there to be a fair amount of sample code out there for any serious USB device chipset that implements either or both of HID and Mass Storage.
If you really must wander into fully custom device territory, then you will need to be building device drivers for each host platform. The open source libusb library can be of some help, if its license is compatible with your project. There are also ways in newer versions of Windows to develop USB drivers that run in user mode using the User Mode Driver Framework that have many of the same advantages of libusb, but are not portable off the Windows platform.
The last custom device I worked on was based on a Cypress device, and we were able to ship their driver and an associated DLL to make our application code easier to build. I don't know off the cuff if there is any equivalent available for your device.
For a really good overview, I recommend the USB FAQ, and the latest edition of Jan's book, USB Complete.