Skip to content

Feat: add packages for RAK GW, cellular utilities, and led utilities#24

Open
devleesch001 wants to merge 11 commits intochirpstack:masterfrom
devleesch001:master
Open

Feat: add packages for RAK GW, cellular utilities, and led utilities#24
devleesch001 wants to merge 11 commits intochirpstack:masterfrom
devleesch001:master

Conversation

@devleesch001
Copy link
Contributor

@devleesch001 devleesch001 commented Mar 4, 2026

Hello,

Abstract

This pull request follows issue #150 of chirpstack-gateway-os.

It's dependent on issue #151 of chirpstack-gateway-os

It adds tools for RAK Gateways to manage the gateway's LED and modem.

Several things need to be reviewed and discussed, particularly the constante of device files in scripts.

Content

I am adding two new feed repository grouped on rak folder.

  • rak/cellular-utilities
  • rak/led-utilities

rak/cellular-utilities

The packet depends on:

  • socat

The packet contains :

  • atinuout cli to send AT command ussing socat on any bus.

  • modem.at rcpd script to get information from ubus command (can be use for luci web interface) ubus call modem.qmi info

  • 99-rak-cellular-rpcd, uci-default script use to restart rcpd when package isntalled especialy on running system

atinuout

Sending AT commands and parsing the responses is a terrible task. therefore, I developed a script to parse and extract data from the specific format of AT responses.

By default use /dev/ttyUSB2 for rak modem, with 115200 bauds.

(I haven't found anything existing, in the form of a shell script, at least.)

Example :

atinyout AT+CCID
+CCID:89882280666087957449
atinyout --raw AT+CIMI
AT+CIMI
901405108795744

OK

modem.at

It's an sh file can be used by ubus rcpd system, it's to permit any luci app to get modem information. It uses atinuout to send AT commands and get parsed reponses.

Exmaple:

ubus call modem.at info
{
	"model": "EG95",
	"imei": "8628***********",
	"sim_status": "READY",
	"sim_physical_state": "1",
	"iccid": "8988****************",
	"imsi": "9014***********",
	"provider": "OrangeF,OrangeF,1nce.net,0,20801",
	"network_info": "FDDLTE,20801,LTEBAND7,3000",
	"csq_basic": "21",
	"csq_detailed": "LTE,72,-107,109,-15"
}

rak/led-utilities

The packet depends on:

  • i2c-tools

The packet contains :

  • aw2013 cli is used to send i2c commands, to manage led controller on rak7268v2 (it's probly work on rak7268 first version, and other if have aw2013 controler)

Example :

# Top LED continuously lit cyan
aw2013 color cyan

# Top LED breathing purple
aw2013 color purple breathe

# Top LED blinking yellow (fast)
aw2013 rgb 255 255 0 breathe 0

# Top LED blinking red (fast) with verbose, full i2cset used
aw2013 -v color red breathe 0
# init_device
i2cset -y 0 0x45 0x01 0x01
i2cset -y 0 0x45 0x31 0x63
i2cset -y 0 0x45 0x32 0x63
i2cset -y 0 0x45 0x33 0x63
i2cset -y 0 0x45 0x30 0x07
# set_color red
# Setting preset color: red
i2cset -y 0 0x45 0x34 0xFF
i2cset -y 0 0x45 0x35 0x00
i2cset -y 0 0x45 0x36 0x00
# set_breathing
# Enabling Breathing Mode (Synchronized One-Shot)...
# Timings appliqués : LTC0=0, LTC1=0
i2cset -y 0 0x45 0x30 0x00
i2cset -y 0 0x45 0x31 0x03
i2cset -y 0 0x45 0x32 0x03
i2cset -y 0 0x45 0x33 0x03
i2cset -y 0 0x45 0x37 0
i2cset -y 0 0x45 0x3a 0
i2cset -y 0 0x45 0x3d 0
i2cset -y 0 0x45 0x38 0
i2cset -y 0 0x45 0x3B 0
i2cset -y 0 0x45 0x3E 0
i2cset -y 0 0x45 0x39 0x00
i2cset -y 0 0x45 0x3C 0x00
i2cset -y 0 0x45 0x3F 0x00
i2cset -y 0 0x45 0x31 0x13
i2cset -y 0 0x45 0x32 0x13
i2cset -y 0 0x45 0x33 0x13
i2cset -y 0 0x45 0x30 0x07

@devleesch001 devleesch001 marked this pull request as ready for review March 6, 2026 10:31
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

Successfully merging this pull request may close these issues.

1 participant