The Things Network: iC880a-based gateway

Reference setup for The Things Network gateways based on the iC880a USB concentrator with a Raspberry Pi host.

This installer targets the USB version of the board, if you have the SPI version, check this branch.

Setup based on Raspbian image

  • Download Raspbian Jessie Lite

  • Follow the installation instruction to create the SD card

  • Start your RPi connected to Ethernet

  • Plug the iC880a (WARNING: first power plug to the wall socket, then to the gateway DC jack, and ONLY THEN USB to RPi!)

  • From a computer in the same LAN, ssh into the RPi using the default hostname:

      local $ ssh pi@raspberrypi.local
    
  • Default password of a plain-vanilla RASPBIAN install for user pi is raspberry

  • Use raspi-config utility to expand the filesystem (1 Expand filesystem):

      $ sudo raspi-config
    
  • Reboot

  • Configure locales and time zone:

      $ sudo dpkg-reconfigure locales
      $ sudo dpkg-reconfigure tzdata
    
  • Make sure you have an updated installation and install git:

      $ sudo apt-get update
      $ sudo apt-get upgrade
      $ sudo apt-get install git
    
  • Create new user for TTN and add it to sudoers

      $ sudo adduser ttn 
      $ sudo adduser ttn sudo
    
  • To prevent the system asking root password regularly, add TTN user in sudoers file

      $ sudo visudo
    

Add the line ttn ALL=(ALL) NOPASSWD: ALL

⚠️ Beware this allows a connected console with the ttn user to issue any commands on your system, without any password control. This step is completely optional and remains your decision.

  • Logout and login as ttn and remove the default pi user

      $ sudo userdel -rf pi
    
  • Configure the wifi credentials (check here for additional details)

      $ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf 
    

And add the following block at the end of the file, replacing SSID and password to match your network:

            network={
                ssid="The_SSID_of_your_wifi"
                psk="Your_wifi_password"
            }
  • Clone the installer and start the installation

      $ git clone https://github.com/ttn-zh/ic880a-gateway.git ~/ic880a-gateway
      $ cd ~/ic880a-gateway
      $ sudo ./install.sh
    
  • If you want to use the remote configuration option, please make sure you have created a JSON file named as your gateway EUI (e.g. B827EBFFFE7B80CD.json) in the Gateway Remote Config repository.

  • Big Success! You should now have a running gateway in front of you!

Credits

These scripts are largely based on the awesome work by Ruud Vlaming on the Lorank8 installer.



The Things Network: iC880a-based gateway

基于具有Raspberry Pi主机的iC880a USB集线器的 The Things Network 网关的参考设置。

如果您使用的是SPI版本,那么此安装程序将针对主板的 USB版本检查此分支

基于Raspbian图像设置

  • 下载 Raspbian Jessie Lite

  • 按照安装说明创建SD卡

  • 启动您连接到以太网的RPi

  • 将iC880a(警告:将电源插头插入墙上插座,然后插入网关DC插孔,然后将USB连接至RPi!)

  • 使用默认主机名从同一局域网中的计算机将 ssh 转换为RPi:

      local $ ssh pi@raspberrypi.local
     
  • 用户 pi 的普通香草RASPBIAN安装的默认密码是 raspberry

  • 使用 raspi-config 实用程序来扩展文件系统(1展开文件系统):

      $ sudo raspi-config
     
  • 重新启动

  • 配置区域设置和时区:

      $ sudo dpkg-reconfigure语言环境
      $ sudo dpkg-reconfigure tzdata
     
  • 确保您有更新的安装并安装 git

      $ sudo apt-get更新
      $ sudo apt-get升级
      $ sudo apt-get install git
     
  • 为TTN创建新用户并将其添加到sudoers

      $ sudo adduser ttn
      $ sudo adduser ttn sudo
     
  • 要防止系统定期询问root密码,请在sudoers文件

    中添加TTN用户
      $ sudo visudo
     

添加行 ttn ALL =(ALL)NOPASSWD:ALL

⚠ ¯请注意,使用ttn用户的连接控制台可以在系统上发出任何命令,无需任何密码控制。这一步是完全可选的,仍然是您的决定。

  • 注销并登录为 ttn ,并删除默认的 pi 用户

      $ sudo userdel -rf pi
     
  • 配置无线上网凭证(请参阅此处了解更多详情

      $ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
     

并在文件的最后添加以下块,替换SSID和密码以匹配您的网络:

            network={
                ssid="The_SSID_of_your_wifi"
                psk="Your_wifi_password"
            }

Credits

这些脚本主要是基于 Ruud Vlaming Lorank8安装程序




相关问题推荐