Issue with pistar-bmapi script

General support for the Pi-Star System
Post Reply
VU3BOJ
Posts: 7
Joined: Sat Jun 05, 2021 3:37 am
Location: India

Issue with pistar-bmapi script

Post by VU3BOJ »

Hi

I have setup the BM api key on the Pistar and have the additional BM panel available on the admin page. And the buttons work fine too.

However, when I invoke the following command, it returns an error.

Code: Select all

$sudo pistar-bmapi dropdyn 0
 Request to BrandMeister API: Drop all Dynamic TG on TimeSlot 0 for DMR ID 4040xxx
Answer from BrandMeister API: Missing role {REPEATER_WRITE} for repeater 4040xxx
Mine is a simplex hotspot and the BM Network ESSID is 4040xxx11. What could be the issue?

Thanks,
Bejoy
Anytone D878UV | TYT MD-380 | Simplex MMDVM_HS + Pi Zero W
AF6VN
Posts: 821
Joined: Fri Jul 20, 2018 1:15 am

Re: Issue with pistar-bmapi script

Post by AF6VN »

While the help text for the command does state timeslot 0 for simplex, most such hotspots put all traffic on TS 2 -- have you tried the command using TS 2 instead of 0?

Though TS 0 is apparently working for me.

Code: Select all

pi-star@pi-star-3b(rw):~$ sudo pistar-bmapi dropdyn 0
 Request to BrandMesiter API: Drop all Dynamic TG on TimeSlot 0 for DMR ID 1126104
Answer from BrandMesiter API: Dropped dynamic groups on slot: 0

pi-star@pi-star-3b(rw):~$ sudo pistar-bmapi dropdyn 2
 Request to BrandMesiter API: Drop all Dynamic TG on TimeSlot 2 for DMR ID 1126104
Answer from BrandMesiter API: Dropped dynamic groups on slot: 2

pi-star@pi-star-3b(rw):~$
{Apparently time to reboot -- to clear the RW state}

Hmmm, I would note that BM is responding with text indicating it thinks you are a repeater (is the 4040xxx really what it returns or are you obscuring the last three digits? A four digit number starting with 4 indicates a reflector [which BM USA hasn't supported in years, and I think the other masters may be dropping reflector usage too).

--
AF6VN
Dennis L Bieber
VU3BOJ
Posts: 7
Joined: Sat Jun 05, 2021 3:37 am
Location: India

Re: Issue with pistar-bmapi script

Post by VU3BOJ »

I tried with 2, 0 and also with no arguments, but the result is same.

yes, xxx is the last 3 digits of the DMR ID.
Anytone D878UV | TYT MD-380 | Simplex MMDVM_HS + Pi Zero W
VU3BOJ
Posts: 7
Joined: Sat Jun 05, 2021 3:37 am
Location: India

Re: Issue with pistar-bmapi script

Post by VU3BOJ »

Ok, with my rusty skill on bash scripts and commands, I looked into the pistar-bmapi script and I was able to reproduce the error. Issue happens when the BM API is expecting 7 digit DMR ID, but the script is sending 9 digit DMR ID, that includes the ESSID.

Turns out the following command in the script is returning 2 lines which is not expected for DMR Gateway configuration. This is causing the DMRID to be set incorrectly.

Code: Select all

pi-star@pi-star(ro):~$ sed -n -e '/\[DMR Network\]/,/\[System Fusion Network\]/p' /etc/mmdvmhost | grep "Address=" | awk -F "=" '/Address=/ {print $2}'
127.0.0.1
127.0.0.1
From /etc/mmdvmhost

Code: Select all

[DMR Network]
Enable=1
Address=127.0.0.1
Port=62031
Jitter=360
Password="none"
Slot1=0
Slot2=1
Debug=0
ModeHang=20
Type=Gateway
Local=62032
RemoteAddress=127.0.0.1
RemotePort=62031
LocalPort=62032
The two lines will match for "Address", causing the incorrect setting of DMRID.
Anytone D878UV | TYT MD-380 | Simplex MMDVM_HS + Pi Zero W
VU3BOJ
Posts: 7
Joined: Sat Jun 05, 2021 3:37 am
Location: India

Re: Issue with pistar-bmapi script

Post by VU3BOJ »

This is fixed https://github.com/AndyTaylorTweet/Pi-S ... /issues/48

Confirmed working.

Thanks Andy for quickly fixing this.
Anytone D878UV | TYT MD-380 | Simplex MMDVM_HS + Pi Zero W
User avatar
MW0MWZ
Site Admin
Posts: 1505
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: Issue with pistar-bmapi script

Post by MW0MWZ »

VU3BOJ wrote: Tue Nov 30, 2021 9:58 am This is fixed https://github.com/AndyTaylorTweet/Pi-S ... /issues/48

Confirmed working.

Thanks Andy for quickly fixing this.
You're welcome :)
Andy

73 de MW0MWZ
http://pistar.uk
Post Reply