Adding a Browan Femto LoRaWAN Gateway to TTI (The Things Industries) Stack
Login into the Femto Gateway Admin User Interface
1. Make sure the TTIF Femto gateway is plugged in and functioning with all the lights like the the accompanying video and installation guide:
will be added later.
2. Connect to the Wifi created by the gateway with your computer and enter the following IP address in the URL field of your browser:
Connect to IoT Femto Gateway Wifi whose name (SSID) has the format: AP-123456
Note: Last 8 digits/numbers in the aforementioned Wifi name are the last 8 digits of the Device MAC address as printed sticker on the bottom of the gatewayGateway Wifi will only be used to access the Admin panel for gateway configuration.
3. Your browser will try to stop you, so please click through the warnings to access the Lorix One user interface where you can log in with the following credentials:
Once connected to the gateway Wifi enter the following IP address into the website URL address field: 192.168.55.1 (Enter it into your browser address bar without http:// or https://)
At the prompt, enter the following login credentials (unless you already changed them)
Username: admin Password: admin
Note: Change the password and user name to secure your gateway. If you should lose your password, a hard reset of the gateway will return it to default settings and you will have to complete the follwing setup all over again.
More details can be found in the BROWAN IoT Femto Cell - WebUI User Guide and the BROWAN CUPS Server Configuration for TTI Guide.
4. Once inside the Femto gateway Admin panel user interface, please perform a firmware update by selecting the Update under the System menu item in the left menu.
The latest firmware file can be requested from BROWAN or BARANI DESIGN customers can email support@baranidesign.com -
Once new firmware is installed, login into the Admin panel again by repeating steps 1-3.
4A (Optional). As an alternate connection option, connect to Wifi in addition to, or instead of ethernet.
In the left-hand menu, under Network main menu item, choose WAN, which will bring up the WAN Status screen and three TAB/links at the top.
Click the Wireless Extender link at the top, which will bring up the corresponding screen with 4 menu items and a SCAN button.
In the Extender mode dropdown menu, choose “enable”
Next, click the blue “SCAN” button, and in the corresponding dropdown, select the Wifi to which you want to connect. The SSID field will now be filled out with the Wifi that you selected in the previous step.
The next line, Security, has the Wifi encryption type, so choose what is appropriate if the correct security type is not automatically selected.
The KEY field is the Wifi password for the Wifi that you chose to connect to. Type it in. It is case sensitive.
The last step is to save the Wifi connection configuration by clicking “SAVE” at the bottom right of the screen.
NOTE: To verify your connection, please see if Google.com or any other website loads properly in a separate browser window.
5. Gateway EUI (LoRaWAN Identification number) is located in Setting menu item under the BasicStation. It can also be created from the MAC ID.
First 6 digits of the Gateway EUI are the first 6 digits of the 12 digit MAC id from the sticker on the bottom of the gateway.
Insert FFFE after the first 6 digits.
Complete the 16 digit Gateway EUI by appending the last 6 digits of the MAC id at the end.
Example: If MAC id equals 58A0CB 801AD9, then split it in half and insert FFFE in the middle as follows: 58.A0.CB. ->FF.FE<- 80.1A.D9 resulting in 58.A0.CB.FF.FE.80.1A.D9
You can add periods to separate the pair for easier readability, but do not copy the periods when entering the Gateway EUI as LoRaWAN credentials.
TTI console: Add the gateway to TTI (steps A-D) then resume at step 6 below
A. Setup/add the gateway to your The Things Industries Stack (TTI) @ cloud.thethings.industries
We recommend that <Gateway ID> has the Gateway EUI in its name or at least its last 6 didits for easy searching.
<Gateway ID> example: eui-58a0cbfffe801ad9
B. Generate two API keys for the gateway in the TTI user interface:
<CUPS API key> and name it <Gateway EUI>-cups so that you can identify it and associate it easily with a correct gateway at a later date:
NNSXS.ON1PX7SDCZP1XETCG1NHZHFYQA3HX23MOI3TQDA.7PI17H6AZDI2GF7651VAHJKW6C2SUSQRWIYUCXCMNVSLF7WS4HFA<LNS API key> and name it <Gateway EUI>-lns so that you can identify it and associate it easily with a correct gateway at a later date:
NNSXS.MQ3N6DALSU11SYEWMI54GJIDYFPL4PWF4P5ZH3I.AOKPW75MV1MPSRIBN72SPQEV3ZV5P5Q12GKOCIUOYV1YWTS31OYQ
C. Create an API Key file in TTI CLI or with the API key in Notepad++ in windows or an equivalent text editor on MAC, Linux or Unix computers.
Create a new file whose name is the gateway EUI followed by the word cups and with the extension .key and with the following contents. This Key file generator tool in the TTI Command Line Interface (CLI) can also be used.
Name the file so that you can identify it and associate it easily with a correct gateway at a later date: <Gateway EUI>_cups.key
Example: 58a0cbfffe801ad9_cups.key
File should contain only one line with the following text and most importantly, with a Carriage Return Line Feed (0x0D0A) at the end to end of the line.
Authorization: Bearer <API KEY>
Example:
Alternatively, in TTI CLI use the following UNIX/Linux commands to create a file called <Gateway EUI>_cups.key
export CUPS_KEY=<CUPS API key>
echo "Authorization: Bearer $CUPS_KEY" | perl -p -e 's/\r\n|\n|\r/\r\n/g' > <gateway EUI>_cups.key
Replace <CUPS API key> with the CUPS API key which you created above and replace <Gateway EUI> with your Gateway EUI from above which is associated with this key.
CUPS configuration command line commands guide for TTI Command Line Interface (CLI)
export GTW_ID=<Gateway ID>
Example where the <Gateway ID> is from step A above: export GTW_ID=”eui-58a0cbfffe801ad9”
export LNS_KEY=<LNS API key>
Example from step B above:
export LNS_KEY=”NNSXS.MQ3N6DALSU11SYEWMI54GJIDYFPL4PWF4P5ZH3I.AOKPW75MV1MPSRIBN72SPQEV3ZV5P5Q12GKOCIUOYV1YWTS31OYQ” where <LNS API key>export SECRET=$(echo -n $LNS_KEY | xxd -ps -u -c 8192)
ttn-lw-cli gateways update $GTW_ID --lbs-lns-secret.value $SECRET
Femto Admin UI Panel: Configure the LoRaWAN Basics Station Forwarder
6. Configure the Basics Station by clicking on the Connection Configuration in the top menu.
Select the following settings for the Basics Station forwarder in the Gateway user interface:
Trust = Upload the following SSL certificate file: TTI_bundle_concatenated_cert_list.pem (Concatenated X1 & X3 SSL certificate list (annotations removed) as supplied by TTI in the following documentation: https://www.thethingsindustries.com/docs/reference/root-certificates/
CRT = Not used. If any file has been uploaded in this field, click delete to remove it.
Key = <Gateway EUI>_cups.key file from step C in the above TTI setup section.
Important Note: Why were CUPS credentials enetered instead of LNS server info?
Answer: CUPS server credentials and port number were entered in this section instead of the LNS server address and port because the gateway will use the CUPS server information to retrieve LNS server information and credentials which were configured in the TTI setup section step D above.
5. Make sure to click APPLY and RESTART SERVICE after modifying values in this section.
6. Check the Log menu item in to top menu for any error messages.
7. Confirm the gateway is connected in your TTI stack and correctly forwarding uplinks to the LNS server.
8. Power cycle the gateway and repeat step 7 to make sure settings are persisting and all is working correctly.
Troubleshooting tips:
If the LoRaWAN forwarder settings do not persist after power cycling, try login into the gateway via SSH from the Command Prompt (CMD) or Unix/Linux shell with the following commands to synchronize internal gateway settings.
ssh 192.168.55.1 -l root
password: rootrm -rf /app/lora_rf_conf_data
/etc/init.d/station.service restart
sync
tail -f /tmp/station.log
exit
(also Ctrl-C exits SSH)
SSH error
In your home directory, execute the following command if you get an offending ECDSA key error:
ssh-keygen -f ".ssh/known_hosts" -R "192.168.55.1"
Reset gateway settings instructions
After the gateway has booted and the Wifi LED is illuminated, push the reset button for 6+ seconds to reset the TTIF Femto gateway settings to factory defaults.