DSGW-210-HA Home Assistant BT Error

The BT module doesn’t work, but i don’t know why

i executed /usr/bin/test.sh

Testing [ ble]…, please wait…
power on ble…
/dev/ttyUSB0
hciconfig hci0 up
Test Result : OK

can any one help me?

Thanks!

The ble module firmware is in ncp mode, you need to update it to rcp mode. Pls refer to
the document.
Ble Upgrade_V1.1.pdf (931.5 KB)
bflash (26.5 KB)
bt_rcp-BG21_768_OK_32_conn.gbl (109.9 KB)

Thank you very much, I also solved the problem, now Bluetooth works in Home Assistant and BLE devices are being added.

How did you solve it?

First of all this is my output from the testing is the same as yours.
But from the guide:

  1. Upload the firmware to /tmp/, the firmware can be obtained from Dusun technical team → DONE

  2. Run command to stop BLE function
    /etc/init.d/S99bluetooth stop -Z I didn’t have the S99 in front, only bluetooth
    /killall -9 reapp.sh → didn’t work (-bash: /killall: No such file or directory)

  3. Update the firmware
    /tmp/bflash -d /dev/ttyUSB0 -b 500000 -f /tmp/bt_rcp-BG21_768_OK.gbl → sudo: /tmp/bflash: command not found

  4. Wait until the process goes to 100%
    Any ideas? I’m running on ubuntu 12, the same model as you

apt autoremove bluez

reboot

cd /tmp

wget https://community.dusuniot.com/uploads/short-url/u2KlvLx1OscCSvupo1QOlMYkNqK -O bflash

wget https://community.dusuniot.com/uploads/short-url/vN0Pme6nXJOuZBAQ3WitTQ5LEf3.gbl -O btrcp.gbl

chmod +x bflash btrcp.gbl

./bflash -d /dev/ttyUSB0 -b 500000 -f /tmp/btrcp.gbl

wait 1-2 minutes

apt update && apt install bluez

hciattach /dev/ttyUSB0 any 115200 noflow

Thank you @Haade , it kinda worked and I am I’m not receiving any errors from Home Assistant anymore, but I can’t add any devices and its not finding any Bluetooth devices either…

I have a DSGW-210-B-14 with a BG21 module on it.

Just to get this straight, the BG21 Module is operating in NCP mode and needs to be reflashed with bt_rcp-BG21_768_OK_32_conn.gbl to operate in RCP mode so it gets compatible with bluez (btmon, hciattach) and such, is this correct?

My Module is operating at 115200 BAUD though, is this plausible?

root@Debian:~# ./bflash -d /dev/ttyUSB0 -b 500000 -r1
# NO OUTPUT
root@Debian:~# ./bflash -d /dev/ttyUSB0 -b 115200 -r1
2.13.9.65534
root@Debian:~#

It is doing stuff if I call

/home/lam/bin/app_static -d /dev/ttyUSB0 -b 115200

or

/home/lam/bin/app_static -d /dev/ttyUSB0 -b 500000

so 115200 or 500000 are working similarly, is this plausible?

Most importand, if I want to go back to NCP mode, how can I do this?
Ist the .gbl file in this zip archive sufficient:

?

Sidequest:
Where do I get the sources from used to create the /home/lam/bin/app_static program? I can not find it in the debian SDK.
It is compiled for 32Bit and we have only aarch64 in our target available…
The availability also is in question for the bflash binary, where is this from? I have it downloaded twice, a bflash one running in aarch64 natively and a bflash_static somewhere requiring an 32Bit environment.

Kind Regards
Konsti

Is there anyone who has gotten bluetooth to work within Home Assistant?