Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoraGW Bridge #9

Open
VladoPortos opened this issue May 31, 2019 · 1 comment
Open

LoraGW Bridge #9

VladoPortos opened this issue May 31, 2019 · 1 comment

Comments

@VladoPortos
Copy link

I'm trying to follow this deployment guide but I'm stuck a little, more confused though.

From what I gathered this deployment script does not count with using own Loara Server and does not install lora gateway bridge on the rpi, which would be more secure to let it talk to mqtt server directly ( with ssl and pass ).

Own installed loraserver will not give you: serv_gw_id and serv_gw_key

@VladoPortos
Copy link
Author

VladoPortos commented May 31, 2019

I figured it out, for anyone else looking into the same issue, here is what needs to be done:

The script will not create in this case files:
/opt/loragw/global_conf.json
/opt/loragw/local_conf.json

So first you need to copy the files to place from /opt/loragw/dev/packet_forwarder/mp_pkt_fwd
sudo cp /opt/loragw/dev/packet_forwarder/mp_pkt_fwd/global_conf.json
sudo cp /opt/loragw/dev/packet_forwarder/mp_pkt_fwd/local_conf.json

Edit the file local_conf.json first:
My looks like this:

"gateway_conf": {
    "gateway_ID": "b827eb1b14fd0000", /* you must pick a unique 64b number for each gateway (represented by a$
    "contact_email" : "[email protected]",
    "description": "Full Rpi GW",
    "gps": true,        
    "fake_gps": true,
    "ref_latitude": <numbers>,   /* put your latitude here */
    "ref_longitude": <numbers>,  /* put your longitude here */
    "ref_altitude": 15
}

}

Also edit global_conf.json and change ( I assume this can be just added in local conf without editing global conf ) :

    "servers":
    [ { "server_address": "127.0.0.1", <----This
        "serv_port_up": 1700,
        "serv_port_down": 1700,
        "serv_max_stall": 0,
        "serv_enabled": true } ],

Ok now you need to install lora-gw-bridge on rPi (RPI zero W uses the armhf versions of packages, sadly for same reason the latest is 2.5.1 :-/ )

sudo wget https://artifacts.loraserver.io/downloads/lora-gateway-bridge/lora-gateway-bridge_2.5.1_armhf.deb

sudo dpkg -i lora-gateway-bridge_2.5.1_armhf.deb

Edit /etc/lora-gateway-bridge/lora-gateway-bridge.toml

Edit your MQTT server,
server="ssl://:8883"
username="user"
password="pass"

And there you go, secured connection to MQTT server, and GW is running all on rPI zero :D

Don't forget to edit logrotate /etc/logrotate.d/lora-gateway-bridge

/var/log/lora-gateway-bridge/lora-gateway-bridge.log {
hourly <--- This was changed
rotate 7
missingok
dateext
copytruncate
compress
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant