“Line 12 command missing” when setting up Cisco LoRaWAN Gateway

Hello fellow thethingsnetworker,

I need reaaaaly big support. I’m a new hire at a city in germany. My first big project is to try to setup a lora gateway (i got the cisco lorawan gateway). You can imagine it hit me like a truck. Lorawan heard but never worked with. If someone would be so kind to take me by the hand maybe even trough email and help me to setup the basics.

Well what i got so far.

Cisco Lorawan Gateway up and almost running. Its connected to the thethingsnetwork.

Ive got problems with the packet forwarder. The script from the tutorial setup seems not working for me. I get the error “Line 12 command missing”

Gps, Radio etc. seems to work fine and the firmware is up to date.

Can i find anyone generous to help me please?

Best regards

Adrian

At first welcome to the this forum,
Did you search all ready you could find the follow info: https://www.thethingsnetwork.org/docs/gateways/cisco/setup.html
and maybee search futher on the form to the cisco info.
succes

Hi, well i asked for it maybe i was a bit unclear on a few things. The code i used was that from the setup site.

#!/bin/sh

SCRIPT_DIR=/etc/pktfwd
SCRIPT=$SCRIPT_DIR/pkt_forwarder
CONFIG=$SCRIPT_DIR/config.json

PIDFILE=/var/run/pkt_forwarder.pid
LOGFILE=/var/log/pkt_forwarder.log

export NETWORKIP=$(nslookup router.eu.thethings.network | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | tail -1)
sed -i 's/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/'$NETWORKIP'/g' "$CONFIG"

start() {
  echo "Starting pkt_forwarder"
  cd $SCRIPT_DIR
  start-stop-daemon \
        --start \
        --make-pidfile \
        --pidfile "$PIFDILE" \
        --background \
        --startas /bin/bash -- -c "exec $SCRIPT -- -c $CONFIG -g /dev/ttyS1 >> $LOGFILE 2>&1"
  echo $?
}

stop() {
  echo "Stopping pkt_forwarder"
  start-stop-daemon \
        --stop \
        --oknodo \
        --quiet \
        --pidfile "$PIDFILE"
}

restart() {
  stop
  sleep 1
  start
}

case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart|reload)
    restart
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac

exit $?

I used this Setup and follwed every step.
Seems im stuck somewhere i cant figure out where to go.

** ##### 2020-03-09 09:45:46 GMT #####*
** ### [UPSTREAM] ###*
** # RF packets received by concentrator: 1*
** # CRC_OK: 0.00%, CRC_FAIL: 100.00%, NO_CRC: 0.00%*
** # RF packets forwarded: 0 (0 bytes)*
** # PUSH_DATA datagrams sent: 1 (263 bytes)*
** # PUSH_DATA acknowledged: 0.00%*
** #*
** ### [DOWNSTREAM] ###*
** # PULL_DATA sent: 3 (0.00% acknowledged)*
** # PULL_RESP(onse) datagrams received: 0 (0 bytes)*
** # RF packets sent to concentrator: 0 (0 bytes)*
** # TX errors: 0*
** # BEACON queued: 3*
** # BEACON sent: 0*
** # BEACON rejected: 0*
** #*
** ### [JIT] ###*
** #*
** ### [GPS] ###*
** # INVALID time reference (age 150 seconds, 1 updates), XTAL err 0.000 ppm*
** # no valid GPS coordinates available yet*
** # PPS pulses lost: 0*
** #*
** ### [LINK TESTING MOTE: 00CC01AF] ###*
** # Packets received from link testing mote: 0*
** #*
** ### [GATEWAY] ###*
** # Boot time: 2020-03-09 09:43:13 GMT*
** # Temperature: 29 C (code=85)*
** #*
** ##### END #####*

** [1583747146538309] JSON up [0] [58E9]: {“stat”:{“time”:“2020-03-09 09:45:46 GMT”,“boot”:“2020-03-09 09:43:13 GMT”,“lati”:51.09182,“long”:6.88774,“alti”:56,“rxnb”:1,“rxok”:0,“rxfw”:0,“ackr”:0.0,“dwnb”:0,“txnb”:0,“lmok”:0,“lmst”:0,“lmnw”:0,“pps”:0,“temp”:29,“fpga”:61,“dsp”:-1,“hal”:“5.1.0”}}*
** HISTORY: purge [0DB7] at index 0 (time=1583747116 - now=1583747146)*