INGICS IBS01 Tag Beacon Setup

Important!
You are going to want to setup your INGICS BLE Gateway before using this beacon.  This is not an iBeacon or an Eddystone Beacon.

Beacon Setup

Once you receive your beacon follow these steps to configure:

  1. Install 2 CR2032 3V Coin Cell Batteries. Be sure to align the positive (+) marker on the batteries with the positive + indicator on the battery holder 

2.  Download the iBS01 Beacon Tag Util from the Google Play Store (Android Only).

3.  Activate the beacon by sliding the white button on the top of the beacon.

4.  Open the iBS01 Tag Util and press the “Start Scan” button. Make note of the last string of the iBS01 beacon that shows up in the list. This is the identifier of the beacon that you will see in the MQTT Message Reported by the IGICS Gateway.

5.  The only thing that is configurable via the Android App for the Tag Beacon are the Tx Power (Strength of the BLE Radio Signal) and the ADV Interval (The interval in milliseconds that the BLE Radio Signal will broadcast at). You will tweak these settings, along with the RSSI (Received Signal Strength Indicator) setting on the gateway in order to ensure the gateway is picking up the BLE Radio Signals from the Tag Beacon. (More on tweaking RSSI and other advanced gateway settings will be in a separate blog).

6.  As noted at the start of the blog, these tags do not broadcast using the Eddystone or iBeacon standards; they use a proprietary standard, which broadcasts a single string, or payload, that represents the Tag beacon (it’s identity) and it’s state (if the alarm button has been pressed on the beacon). You can find this payload format here. For instance, for the payload:

02010612FF590080BC4D0100FFFFFFFFFFFFFFFFFFFF

The double 00 Before the F’s in the diagram above would indicate that the button has not been pressed. If the button was pressed the payload would look like this:

02010612FF590080BC4D0101FFFFFFFFFFFFFFFFFFFF

The 1 before the F’s let’s you know that the alarm button was pressed.

In future blogs we will demonstrate how to bring these payload messages that are sent by the gateway into your existing environment so you can both monitor and take action on the data provided by these beacons.

INGICS IBS01 Tag Beacon Setup

Configuring the Root User for Multi-Factor Authentication (Google Cloud)

Important!

  1. Set up a Google Cloud Account for a Root User
  2. Set up an Organization and a Developer Account
  3. Have an SMS Capable Cell Phone On Hand

What is Multi-Factor Authentication (MFA)?

Multi-Factor Authentication is a system requirement that utilizes two or more methods of identification to authenticate a user.

For the Root User one method of authentication is already set up by using the combination of  email and password to log on.

We will be using SMS as our second method of authentication.

Configuring the Root User For MFA

  1.  Go to any google app or google.com and log on with the root user account. Once you are logged on click on the icon in the upper right and choose manage account.

2.  Choose Security from the menu bar to the left. In the middle of the screen under Signing in to Google click “off” next to 2-step verification.

3.  On the next screen press get started in the lower right hand corner.

4.  You will be asked to sign in again, enter the root users credentials and press the next button.

5.  We are using SMS as our second Authentication method. Enter your cell phone number, remember to start with the country code, and press next.

6.  Google will send you a code to make sure it works. Check your SMS messages and enter the Code here and press next.

7.  Once the code is confirmed, confirm you want to turn on 2-factor authentication by pressing the Turn On button in the lower right.

Congratulations! You have successfully configured and tested your root user Google Cloud Account for MFA.

In this day and age of increased security threats it is best to be prepared before disaster strikes! For additional information on increased security methods, contact Revolution11 to schedule a consultation today. Learn what systems we have put in place for businesses of every size.

Configuring the Root User for Multi-Factor Authentication (Google Cloud)

Adding Beacons to Google’s Beacon Dashboard with the Proximity API

Before Starting

Make sure you have configured your beacon using the Eddystone Protocol, with a Namespace and an Instance. You can learn about naming beacons in the blog here: https://revolution11blog.com/2019/05/01/beacon-naming-standards/

Your beacon manufacturer should have provided instructions about setting up your beacon.  Here are some sample instructions we have written about configuring Minew Beacons: https://revolution11blog.com/2019/04/30/basic-configuration-of-minew-beacons/

You will also want to make sure and get the Latitude and Longitude of the location where you will be placing the beacon.

Determining Your Latitude and Longitude

Open up Google maps and find your current location. Right click on the location on the map and choose “What’s Here?” You will get a popup containing the latitude and longitude, go ahead and make note of them.

Determine the PlaceID

Google’s PlaceID is used with the Places API. 

Go to https://developers.google.com/places/place-id and find your location. Make note of the PlaceID.

Enabling the Proximity API

  1.  Go to https://console.developers.google.com/apis/library/proximitybeacon.googleapis.com and log in as the root user.
  2. Select the Project you would like to use with the Proximity API.
  3. Press “Enable”.

Create Credentials

  1.  Once the API Setup is complete you will land on the Manage API page. You’ll see we need to create credentials.  Click on credentials in the bar to the left.

2.  On the credentials home page, we’ll start by configuring the consent screen that pops up when this API is called. Press the Configure Consent Screen button.

3.  We’re going to do a minimum configuration to get us going. We’ll name our app Beacon App and upload an icon for it to use for the application logo.

4.  Scroll down and press “Save”.

5.  On the next screen click on create credentials and choose OAuth client ID.

6.  Select Web Application and press “Create”.

7.  Name the credentials and paste the URL for google’s OAuth Playground (https://developers.google.com/oauthplayground/) in the Authorized redirect URLs field. This allows us to test adding beacons to the beacon dashboard. Press “Create”.

8.  You should get a pop-up with the Client ID and Secret we will be using in the OAuth Playground. Copy the Client ID then click “OK”.

Testing the Proximity API with the OAuth Playground

  1. Open Google’s OAuth Playground in a new browser window with this URL: ​developers.google.com/oauthplayground

2.  Click the gear icon in the top right corner and:
● Change “OAuth flow” to “Client-side”.
● Check the “Use your own OAuth credentials” checkbox.
● Paste the client ID you generated in the previous step, click on close.

3.  Then, on the left side, in the “Input your own scopes” text field, type:

https://www.googleapis.com/auth/userlocation.beacon.registry and press the authorize APIs button.

4.  You will be asked to sign in.

5.  You will be asked to give permission to view and modify the beacons. Click on “Allow.”

6.  You will be asked to confirm your choices. Press “Allow.” 

Creating an AdvertisingID

  1.  Now we need to create an AdvertisingID to use with the Proximity API. This is made with a packing function using the Namespace and Instance that the beacon is using.  There are a lot of ways to do this within an app, but since we are in the Google OAuth playground, and we are working with a Mac, we are going to do this really quickly in ruby with the terminal app. Open the terminal app from apps/utilities and fire up the ruby application by typing irb and then hit return.

2.  Type in the following using your Namespace and Instance in the terminal and hit return.

require ‘base64’
namespace = ‘YourNameSpaceHere’
instance = ‘YourInstanceHere
puts Base64.strict_encode64([namespace + instance].pack(‘H*’))

This will generate the AdvertisingID as shown below:

Registering the Beacon

  1. Now return to the OAuth playground.

2.  Below is an example you can paste in, replace the example data with your own.

  • The advertisingID you generated in the terminal
  • The place ID you copied earlier
  • The latitude and longitude you collected earlier
  • The Places API supports floors for indoor mapping so we are going to set the name of the indoor level to 1 in our example
  • You can add a description of the beacon here
  • And in the properties, you can add any key value pairs you wish, we are starting with the key of position and the value of entryway.

Once the request URI text is entered press “Close”

3.  Hit “Send the Request”.

4.  You should see a successful post message.

View the Beacon on Google’s Beacon Dashboard

  1.  Go to https://developers.google.com/beacons/dashboard/  Since this is the first time you have used the beacon dashboard, you will get a pop-up message. Press “Start”.

2.  Another pop-up will appear asking for permission to use your account, click on “Allow”.

3.  Choose the project you are using with the Proximity API.

4.  You should land on summary page of the beacons connected to that project.  Congratulations, you have successfully setup the proximity API! The developer you set up in the last blog should now be able to work with the API.

Adding Beacons to Google’s Beacon Dashboard with the Proximity API

Setting Up an Organization & Creating a Developer Account

Important Note Before Starting:
• Make sure your organization has a Domain
• Make sure that you have access to your Domain’s Control Panel

This is a process that generally will take place over the course of two days. Setting up an Organization requires Google to verify your ownership of the domain, a process that you will want to leave several hours for, or have going overnight.

Creating the Organization

  1. Make sure you are signed onto the Google Cloud console. Click on “Identity & Organization” in the left menu bar. You will receive a pop-up giving you an overview of the identity setup process, review, then press “Sign Up”.

2.  The next screen tells you a little about the cloud identity service, click “Next”.

3.  The next screen asks for your business name and size, fill those in and press the “Next” button.

4.  You will be asked where your business is located, pick a location from the dropdown and press “Next”.

5.  Enter Your email address and press “Next”.

6.  You will be asked for your business’s domain name, enter it and press “Next”.

7.  You will be asked to confirm the domain you are using to set up with Google cloud. Hit “Next”.

8.  You’ll be asked for your first and last name, enter them and press “Next”.

9.  Provide the email address and password you will be using to manage identities and press “Next”.

10.  On the next screen, select “I’m not a robot.”

11.  A verification screen will popup. Select the correct images that match the word or phrase in the top of the pop-up and click “Verify”.

12.  When the pop-up closes press on the “Agree and Create Account” button.

13.  You should see the screen below when your account has been successfully created. Press “Go To Setup”.

Verifying Domain Ownership

1. The next step is to verify your domain ownership. You’ll want to be logged into the control panel of your domain in another tab or window. Press “Start”.

2. We are already logged into our domain’s host website, so we are going click Yes in the first checkbox.

3. You will be asked to open the control panel on the website where you manage your domain. We have already done so, click on the checkbox “I have opened the Control Panel for my Domain”.

4.  On the next screen you will see two pieces of information we will need to add our domain.  The name (also known as the host or alias) and the value (also known as the answer or destination).

5.  Go to your domain panel and find the area where you add new DNS records. The interface for doing so will vary depending on the website where you manage your domain. Make sure the type of record you are adding is TXT and enter the two values provided by Google, the host record and the TXT Value. In this case we are going to press the “add record” for this service provider’s control panel.

6.  You should receive a confirmation.

7.  Return to the cloud setup pop-up, and click on “I added the TXT Verification record.”  We also saved the record, so click on the “I saved the TXT verification record” checkbox as well.

8.  Press the “Verify Domain” button.

9.  You should see a screen like this while your domain is verifying:

10.  And more likely than not, you will see a message like this after about an hour. It usually takes more than an hour for the change you made at the website where your domain is managed to propagate across the internet. Come back in a few hours or the next day and hit the retry button.

11.  You will see the same set of checkboxes that you saw before. We have already completed this so click on “Verify Domain.”

12.  You should see a screen like this once you have verified the domain. OK, let’s now set up our developer. Press the “Create Users.” 

Creating a Developer Account

1. On the create user pop-up, give the user a first name, last name and a user name. Press “Add”.

2. On the next screen enter the email address for notifying the developer of the account.

3. Scroll down, type in a message for the developer and press “Send Emails.”

4.  That’s it for adding an account. Now let’s create a project for our developer to use.  Press “Continue to Cloud Console.” 

Adding a Project

1. Agree to the terms of service by checking the box, then press “Agree and Continue.”

2. You’ll land back on the IAM & Admin homescreen. There are a few more things we should set up, like billing accounts and other roles, but we’ll tackle that later on. Let’s create our project. Click on “Google Cloud Platform” in the upper left — this is how you navigate to the homescreen of Google Cloud.

3. You’ll see that the homepage is not viewable for organizations; you will need to select or create a project in order to view the console homepage. In our case, we don’t have any projects, so we will press the Create button.

4. Give the project a name, and press “Create.”

5. Once your project is created, you will land on the project home page. Let’s now give our developer access to this project.

Project Access

  1.  If the navigation bar to the left is not exposed click on the icon in the upper left hand corner to expose it and choose IAM & Admin.

2. On the top of the IAM screen, click “Add.”

3.  We will be using the Proximity API for our project, so we will give our developer BeaconEditor rights.

4.  Type in the developer account we will use and click on the roles dropdown, find the Proximity Beacon Set of roles and choose it. Pick “Beacon Editor”.

5.  Press “Save.”

6.  You should see that the developer was added to the project.

Checking Developer Access

  1.  Now, let’s make sure the developer can log onto the project. They should have reeived an email that looks like the one below. Have the developer click on the “Sign In” link in the email.

2. When the developer signs in, they will be asked for the temporary password that was provided in the email. Enter it and press “Next.”

3. The developer will be asked to accept the terms of service for the account. Press “Accept.”

4. The developer will be asked to create a new password, and then confirm it. Then press “Change Password.”

5.  The developer will be asked to agree to the terms of service for Google Cloud Platform and it’s APIs. Click on the corresponding checkbox, and press “Agree and Continue.”

6.  From the developer’s home screen the project can be selected at the top of the screen. This will bring up a pop-up of project, have the developer click on the BeaconProject.

7.  This will bring the developer to the project homepage. We’ll explore setting up the proximity API and working with it in the next blog in this series.

Setting Up an Organization & Creating a Developer Account

Setting Up A Google Cloud Account

Before you set up your Google Cloud Account you will need:

  1. A Google Account, which will be the owner of the account.
  2. A credit card. Google gives you a $300 credit you can use for the first year. 

Go to https://cloud.google.com and press the “Get Started For Free” button in the upper right corner.

You will be asked to sign in with your Google account. Sign in then press “Next”.

Enter your password and click “Next”.

Fill in the account recovery details on the next screen, review and press “Done”.

Agree to the various terms of service by clicking the checkboxes and press “Agree and Continue”. 

Confirm or add your address and add your credit card information on the next screen and press “Start My Free Trial”. 

You should now see a success message and now you are ready to work with Google Cloud!

Be sure to check out the next blog in this series “Setting Up an Organization & Creating a Developer Account”.

Setting Up A Google Cloud Account