RAK 7243 create_ap error

I have a RAK7243 raspberry pi setup I haven’t managed to get working yet. Exect product I’m setting up:

I’m looking for some assistance. Apologies for being somewhat of a newbie. I have started from scratch a few times on the setup of the RAK7243 so am finding my way around but this is my first IoT gateway. I’m quite familiar with Raspberry Pi’s but not IoT gateways.

I do have the gateway talking to TTN, in so much as TTN shows the gateway as connected when powered up. The problem is that no devices connect through the gateway it seems (device shows as never seen by TTN), and TTN shows no gateway traffic.

The immediate most common error is from syslog showing:
Jan 29 21:01:33 rak-gateway systemd[1]: Started Create AP Service.
Jan 29 21:01:33 rak-gateway create_ap[13186]: WARN: brmfmac driver doesn’t work properly with virtual interfaces and
Jan 29 21:01:33 rak-gateway create_ap[13186]: it can cause kernel panic. For this reason we disallow virtual
Jan 29 21:01:33 rak-gateway create_ap[13186]: interfaces for your adapter.
Jan 29 21:01:33 rak-gateway create_ap[13186]: For more info: https://github.com/oblique/create_ap/issues/203
Jan 29 21:01:33 rak-gateway create_ap[13186]: ERROR: Your adapter can not be a station (i.e. be connected) and an AP at the same time
Jan 29 21:01:33 rak-gateway systemd[1]: create_ap.service: Main process exited, code=exited, status=1/FAILURE
Jan 29 21:01:33 rak-gateway systemd[1]: create_ap.service: Unit entered failed state.
Jan 29 21:01:33 rak-gateway systemd[1]: create_ap.service: Failed with result ‘exit-code’.

This create _ap error seems to be relating to creating access points from a raspberry pi in general so am having trouble finding information specific to my RAK7243 scenario to identify the cause.

Reading the logged github link I’m not sure how the information is relevant to myRAK setup. why would the RAK setup be trying to create an access point - is this correct in so much as it’s creating a LoRa access point maybe? or is something way-off on the Raspberry Pi config that it should not be doing this.

Any suggestions?

Regards,
Roger.

Hi. Please use one of those images for flashing the Pi SD card.
For RAK7243(non LTE) - https://downloads.rakwireless.com/en/LoRa/Pilot-Gateway-Pro-RAK7243/Firmware/RAK7243_based_on_Raspbian_OS_for_RPI3_V4.1.0_20191202.zip
For RAK7243C(LTE) - https://downloads.rakwireless.com/en/LoRa/Pilot-Gateway-Pro-RAK7243/Firmware/RAK7243_LTE_based_on_Raspbian_OS_for_RPI3_V4.1.0_20191202.zip

Create AP is a function to create Wi-FI AP for easy connection to Gateway and setup.
Please check this manual https://doc.rakwireless.com/rak7243--lorawan----developer-gateway

I did follow the instructions and use the provided image file previously, but see they have been updated since my last download, so will try refreshing the Pi and starting again with the most recent files and report back on my success.

Regards,
Roger.

Are you logging in to the Raspberry Pi via eth0 or to the Raspberry Pi via wlan0?

How did you configure your Raspberry Pi wifi?

Any updates on this?

@ZhuQI from memory I used the raspi-config to configure wifi. I connect to the Raspberry Pi via wlan0.

I haven’t had time this week to refresh and start again, I’m going to start now.

Thanks,
Roger.

If you use rak firmware, you should use sudo gateway-config to configure wifi.

In this way, the error printing of create_ap will be eliminated.

Starting a fresh from the latest firmware has worked in regard to no more create_ap error. TTN can see the gateway and is refreshing frequently, which is great.

My devices are still showing as never seen in TTN but that is a whole other problem so will create a separate thread as required.

The new image certainly had a different process for creating it. I don’t remember the AP mode when I last set this up a few months back, and remember having to do manual editing of the JSON config of the gateway which I haven’t had to do this time.

Thanks for the assistance.

The node on ttn is not online, you need to check the following issues

  1. Is the gateway connected to ttn? Your gateway can be seen online on ttn, the gateway is already connected to ttn.

  2. Does the gateway frequency band match the node frequency band? You need to determine the frequency band of the node and whether the channel matches the gateway.

  3. If the above two are correct, you need to check the log of lora_pkt_fwd of the gateway.
    3.1 sudo systemctl stop ttn-gateway
    3.2. cd /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/
    3.3. sudo ./lora_pkt_fwd

  4. Follow the third step, you can start lora_pkt_fwd to the foreground to view the real-time log.

  5. If you use the OTAA class A mode, you will see rxpk json data in the log of lora_pkt_fwd when the nodes join. If the devEUI, appEUI, and appKEY of the node are correct, you will see the txpk json print in the log of lora_pkt_fwd.

Looking further in to this now (yes has been a long time).

Doing steps you suggested in 3 I am see the log. Lots of INFO, no ERROR. I see “JSON up” lines that are typically:

JSON up: {“stat”:{“time”:“2020-04-11 12:41:43 GMT”,“rxnb”:0,“rxok”:0,“rxfw”:0,“ackr”:100.0,“dwnb”:0,“txnb”:0}}

But occasionally vary such as:

JSON up: {“rxpk”:[{“tmst”:686180268,“chan”:0,“rfch”:0,“freq”:923.200000,“stat”:1,“modu”:“LORA”,“datr”:“SF10BW125”,“codr”:“4/5”,“lsnr”:13.2,“rssi”:-53,“size”:23,“data”:“AAAAAAAQehMAMjEAABB6EwDY9pJ1QFQ=”}]}

In TTN I am seeing occasional traffic in the Gateway Traffic page (4 entries in the last hour, seemingly sporadic times).

The TTN Gateway Traffic lists a Device EUI and Application ID both of which match an Application I have defined in TTN however that Application and the corresponding Device within it (on the TTN console) is showing “never seen”.

It’s a bit confusing in the Gateway Traffic how the “uplink”, “downlink” and “join” filters are to be interpreted but if I understand it right, the data lines coming through are all “join”.

If you have any further suggestions that would be appreciated.

Regards,
Roger.