Project in progress
WISDome - Weapon Identification System Dome

WISDome - Weapon Identification System Dome © GPL3+

A new way to save lives by neutralizing the attacker before he can act.

  • 2,337 views
  • 2 comments
  • 4 respects

Components and supplies

About this project

Our Vision of the Product

Our vision for WISdome is a network of weapon owners, providing extended functionality for weapon maintenance and security through IoT. The product will mount weapons and connect to nearby Wi-Fi hotspots, sending information to our cloud. We plan to add many unique modes for the weapon owners. Modes that will alert the owner if the weapon has been used, taken out of storage, left a certain area and much more. The product will also keep track of shots being fired and places visited often. The network will also provide public places such as banks, restaurants and so on with information about the identity of armed civilians near it. Our software will be installed on routers, so that they search our devices and let them connect. Security forces will be alerted in case of an emergency that armed civilians are present, and will be prepared to distinguish between authorized armed civilians and dangerous unauthorized armed people. Schools and hospitals will be able to prevent non-authorized armed civilians from entering. The small system will mount weapons, owned by people who want it. In other words, the product is only meant for "good guys", so the product will be relatively easy to remove.

The Reality So Far

Due to the lack of time, the reality is far from the vision. So far, the device connects to a certain Wi-Fi, and sends a message to the cloud with the routers MAC address and the devices ID (so far there is one device so the id does not matter).

The Web Application

In the time frame we were given we were able to build a bit from the UI.

In the main page of the application we are planning to build a "Dashboard" which will contain charts and information about the weapons and networks they own like entries of guns to a network of yours or movements of the guns you have registered to the system.

Other page that was added to the application is the "Networks" page which contains all of the networks you own so you will be able to access to them and edit needed information:

You can also view the weapons you have registered to the system and register new ones, so other users will be able to add you to thier allowed weapons in a specific network. And also when you will register your weapon we will be able to alert you you when your gun is in a place that he is not supposed to be.

The Cloud

we are currently running a cloud with Azure IoT Hub that receives messages from the Arduino MKR1000, but we weren't able yet to connect the web application to receive the messages and react as needed.

What's Next?

We plan to continue working on this project until its "final" state as a working product.

Code

Arduino CodeC/C++
Connects to a wifi and send a message to the cloud
#include <SPI.h>
#include <WiFi101.h>

char hex[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};

//device id
char id[] = "MKR1000";

// wifi configuration
char ssid[] = "hershkofuks 2.4"; //  your network SSID (name)
char pass[] = "0523967311";    // your network password (use for WPA, or use as key for WEP)

//azure iot hub configuration
char hostname[] = "WISDome.azure-devices.net";    // host name address for your Azure IoT Hub
char authSAS[] = "SharedAccessSignature sr=WISDome.azure-devices.net%2fdevices%2fMKR1000&sig=TFrT2ErDuCY3LlDBnP3IX3MftrzgfrmACjyNdUHnMvE%3d&se=1488976355";

//message send URI
String azureSend = "/devices/MKR1000/messages/events?api-version=2016-02-03";

//time configuration
unsigned long lastConnectionTime = 0;            
const unsigned long pollingInterval = 1000*60; // 1 min 

int status = WL_IDLE_STATUS;
WiFiSSLClient client;

void setup() {
  Serial.begin(9600);
  //check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    // don't continue:
    while (true);
  }

  // attempt to connect to Wifi network:
  while (status != WL_CONNECTED) {
    status = WiFi.begin(ssid, pass);
    Serial.print("attempting to connect to: ");
    Serial.print(ssid);
    Serial.print(" with password: ");
    Serial.println(pass);
    // wait 10 seconds for connection:
    delay(10000);
  }
  Serial.print("connected to: ");
  Serial.println(ssid);
}

void loop() 
{
  String response = "";
  char c;
  //read response if the client is availabe
  while (client.available()) {
    c = client.read();
    response.concat(c);
  }
  //print the response
  Serial.print(response);
  
  // polling..if pollingInterval has passed
  if (millis() - lastConnectionTime > pollingInterval) {
    //get router's mac address
    byte mac_bytes[6];
    WiFi.BSSID(mac_bytes);

    //convert it to a string
    String mac = "";
    for(int i = 0 ; i < 6 ; i++){
      mac.concat(hex[mac_bytes[i]/16]);
      mac.concat(hex[mac_bytes[i]%16]);
      if(i!=5 )mac.concat(":");
    }

    //send it along with the device id
    SendMessage(id,mac);
    
    //note the time that the connection was made:
    lastConnectionTime = millis();
  }
}

void SendMessage(String id, String mac)
{
    //set content to [{"id":"actual id","mac":"router mac adress"}]
    String content = "";
    content.concat("[{\"id\":\"");
    content.concat(id);
    content.concat("\",\"mac\":\"");
    content.concat(mac);
    content.concat("\"}]");
    
    // close any connection before send a new request.
    client.stop();
  
    // if the connection was successful:
    if (client.connect(hostname, 443)) {
      client.print("POST"); 
      client.print(" ");  
      client.print(azureSend);  
      client.println(" HTTP/1.1"); 
      client.print("Host: "); 
      client.println(hostname);  
      client.print("Authorization: ");
      client.println(authSAS);  //authorization SAS token obtained from azure iot device explorer
      client.println("Connection: close");

      client.print("Content-Type: ");
      client.println("application/json");
      client.print("Content-Length: ");
      client.println(content.length());
      client.println();
      client.println(content);
      }
}
Web Application
This is the web application that will run on the cloud, for communicating with the guns and also a UI for owners of the system

Schematics

Arduino MKR1000
Mkr1000 web

Comments

Similar projects you might like

Suicide Prevention Gun Safe Locking System

Project showcase by 6 developers

  • 10,153 views
  • 10 comments
  • 19 respects

Connected Security System

Project tutorial by Keith Mitchell

  • 7,462 views
  • 2 comments
  • 21 respects

Buzzer Alarm System With Help Of Arduino

by Team ONYX

  • 55,744 views
  • 9 comments
  • 33 respects

Door Lock System with Arduino

Project showcase by jayesh_nawani

  • 29,746 views
  • 4 comments
  • 20 respects

Plant Monitoring System

Project showcase by Ryan Gill

  • 51,450 views
  • 35 comments
  • 162 respects

Ultrasonic Security System

Project tutorial by Ivan

  • 34,654 views
  • 23 comments
  • 80 respects
Add projectSign up / Login