Jump to content

Board Bring Up Station P1 rk3399, M1 rk3328


balbes150

Recommended Posts

36 minutes ago, Chris4arm said:

@Werner :

 

here it is :  http://ix.io/3Q1R

 

Chris

Those 2 images are very old.

 

Try newer images from here.

https://users.armbian.com/balbes150/station-m1/

With the 4.4 legacy kernel images, everything should work or the 5.16 kernel ones.

You are still using kernel 5.10 that might not have drivers for all the components or the drivers might have small bugs.

Link to comment
Share on other sites

4 hours ago, mo123 said:

Those 2 images are very old.

 

Try newer images from here.

https://users.armbian.com/balbes150/station-m1/

With the 4.4 legacy kernel images, everything should work or the 5.16 kernel ones.

You are still using kernel 5.10 that might not have drivers for all the components or the drivers might have small bugs.

 

Thanks @mo123

my image come from official Armbian download page :wacko:

So I followed your advice and tried Armbian_22.02.0-trunk_Station-m1_bullseye_edge_5.16.8.img.xz.

First boot ok, apt-get upgrade; apt-get dist-upgrade, time zone and wifi set and bluetooth installed with armbian-config then reboot and...

the screen stay black (no video signal received), no keyboard response, red and blue leds are lit (and of course no armbianmonitor -u).

Power off, power up idem.

I'll try another image...

Link to comment
Share on other sites

1 hour ago, Chris4arm said:

So I tried Armbian_22.02.0-trunk_Station-m1_bullseye_current_5.15.18.img.xz and... no bluetooth :(

armbianmonitor -u : http://ix.io/3Q4o

 

Any help welcome

Chris

run armbian-config.  You first have to enable it.  It's under the system option.  I'm not at my computer, so I can recall the name exactly.

Link to comment
Share on other sites

1 hour ago, redjr said:

run armbian-config.  You first have to enable it.  It's under the system option.  I'm not at my computer, so I can recall the name exactly.

 

yes, I've enabled it with armbian-config and then rebooted.

But hciconfig and hcitool don't find any BT device.

The bluetooth stack is present but no device to use :(

Link to comment
Share on other sites

18 minutes ago, balbes150 said:

It's strange, I downloaded the latest official version of Ubuntu for testing, but I don't have BT on it either. Does anyone have BT on any system for M1?

 

Yes, with Station OS ;)

Extract from dmesg if it can help :

rk3328_box:/ $ dmesg |egrep -i "bt|blue|rtl|uart"                                                                                                                                                                                          
[    0.115360] Bluetooth: Core ver 2.22
[    0.115460] Bluetooth: HCI device and connection manager initialized
[    0.115481] Bluetooth: HCI socket layer initialized
[    0.115497] Bluetooth: L2CAP socket layer initialized
[    0.115547] Bluetooth: SCO socket layer initialized
[    0.658679] usbcore: registered new interface driver rtl8150
[    1.109729] usbcore: registered new interface driver kbtab
[    1.174530] Bluetooth: HCI UART driver ver 2.3
[    1.174546] Bluetooth: HCI UART protocol H4 registered
[    1.308019] Bluetooth: RFCOMM TTY layer initialized
[    1.308067] Bluetooth: RFCOMM socket layer initialized
[    1.308134] Bluetooth: RFCOMM ver 1.11
[    1.308172] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    1.308189] Bluetooth: BNEP filters: protocol multicast
[    1.308213] Bluetooth: BNEP socket layer initialized
[    1.308229] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    1.308253] Bluetooth: HIDP socket layer initialized
[    1.308353] [BT_RFKILL]: Enter rfkill_rk_init
[    1.308922] [WLAN_RFKILL]: wlan_platdata_parse_dt: wifi_chip_type = RTL8723DS
[    1.309075] [BT_RFKILL]: rfkill_get_bt_power_state: rfkill-bt driver has not Successful initialized
[    1.411734] [BT_RFKILL]: rfkill_get_bt_power_state: rfkill-bt driver has not Successful initialized
[    1.620420] of_get_named_gpiod_flags: can't parse 'uart_rts_gpios' property of node '/wireless-bluetooth[0]'
[    1.620429] [BT_RFKILL]: bluetooth_platdata_parse_dt: uart_rts_gpios is no-in-use.
[    1.620490] of_get_named_gpiod_flags: parsed 'BT,power_gpio' property of node '/wireless-bluetooth[0]' - status (0)
[    1.620502] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,power_gpio = 56.
[    1.620534] of_get_named_gpiod_flags: can't parse 'BT,reset_gpio' property of node '/wireless-bluetooth[0]'
[    1.620559] of_get_named_gpiod_flags: can't parse 'BT,wake_gpio' property of node '/wireless-bluetooth[0]'
[    1.620597] of_get_named_gpiod_flags: parsed 'BT,wake_host_irq' property of node '/wireless-bluetooth[0]' - status (0)
[    1.620666] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,wake_host_irq = 58.
[    1.620800] [BT_RFKILL]: Request irq for bt wakeup host
[    1.620995] [BT_RFKILL]: ** disable irq
[    1.621278] [BT_RFKILL]: bt_default device registered.
[    3.388945] selinux: avc:  denied  { set } for  scontext=u:r:vendor_init:s0 tcontext=u:object_r:bluetooth_prop:s0 tclass=property_service permissive=1
[    3.589395] ueventd: /vendor/ueventd.rc: 60: invalid gid 'net_bt_stack'
[    3.589438] ueventd: /vendor/ueventd.rc: 61: invalid gid 'net_bt_stack'
[    3.589468] ueventd: /vendor/ueventd.rc: 62: invalid gid 'net_bt_stack'
[    3.589497] ueventd: /vendor/ueventd.rc: 64: invalid gid 'net_bt_stack'
[   14.404921] phy_rtl8211f_led_fixup in
[   15.698381] RTW: rtl8723ds v5.10.1-20-g5af20e016.20200310_beta
[   15.698392] RTW: rtl8723ds BT-Coex version = COEX20200103-3535
[   15.698979] RTW: CHIP TYPE: RTL8723D
[   15.747256] RTW: Hal_EfuseParseBTCoexistInfo_8723D: Enable BT-coex, ant_num=1
[   15.748025] RTW: rtl8723d_FirmwareDownload fw: FW_NIC, size: 29262
[   15.748044] RTW: rtl8723d_FirmwareDownload: fw_ver=31 fw_subver=0000 sig=0x23d1, Month=11, Date=18, Hour=20, Minute=41
[   15.748050] RTW: rtl8723d_FirmwareDownload(): Shift for fw header!
[   15.748081] RTW: rtl8723d_FirmwareDownload by IO write!
[   15.889496] RTW: rtl8723d_FirmwareDownload: download FW count:1
[   15.908228] RTW: rtl8723d_FirmwareDownload success. write_fw:1, 160ms
[   15.908260] RTW:  <=== rtl8723d_FirmwareDownload()
[   16.408375] RTW: rtl8723d_FirmwareDownload fw: FW_NIC, size: 29262
[   16.408388] RTW: rtl8723d_FirmwareDownload: fw_ver=31 fw_subver=0000 sig=0x23d1, Month=11, Date=18, Hour=20, Minute=41
[   16.408394] RTW: rtl8723d_FirmwareDownload(): Shift for fw header!
[   16.409170] RTW: rtl8723d_FirmwareDownload by IO write!
[   16.486589] [BT_RFKILL]: bt shut off power
[   16.686959] [BT_RFKILL]: rfkill_rk_set_power: set bt wake_host high!
[   16.752670] [BT_RFKILL]: bt turn on power
[   16.752712] [BT_RFKILL]: Request irq for bt wakeup host
[   16.752750] [BT_RFKILL]: ** disable irq
[   16.758779] RTW: rtl8723d_FirmwareDownload: download FW count:1
[   16.777464] RTW: rtl8723d_FirmwareDownload success. write_fw:1, 369ms
[   16.777488] RTW:  <=== rtl8723d_FirmwareDownload()
[   16.977959] RTW: rtl8723d_start_thread(wlan0) start RTWHALXT
[   16.983694] RTW: start rtl8723ds_xmit_thread(wlan0)
[   17.218541] RTW: rtw_android_priv_cmd: Android private cmd "BTCOEXSCAN-STOP" on wlan0

 

Chris

Link to comment
Share on other sites

2 часа назад, Chris4arm сказал:

Yes, with Station OS

I checked the StationOS version, BT also doesn't work for me. Strange. maybe my version (1GB RAM and 8GB eMMC) is faulty.

Try copying firmware files from StationOS to Armbian.

 

 

 

A new version of the P1 pro has been released. A power button has been added, which makes the P1 pro a ready-made solution as a mini PC.

https://www.stationpc.com/product/stationp1pro

Link to comment
Share on other sites

18 minutes ago, balbes150 said:

I checked the StationOS version, BT also doesn't work for me. Strange. maybe my version (1GB RAM and 8GB eMMC) is faulty.

Try copying firmware files from StationOS to Armbian.

 

 

 

A new version of the P1 pro has been released. A power button has been added, which makes the P1 pro a ready-made solution as a mini PC.

https://www.stationpc.com/product/stationp1pro

 

It should use these 2 bluetooth firmware files, but it looks like it is already part of Armbian.

https://github.com/armbian/firmware/pull/24/files

Wifi/bt kernel drivers

https://github.com/lwfinger/rtl8723ds

 

Perhaps the mainline kernel dts or config file don't have bt?

Link to comment
Share on other sites

38 minutes ago, Chris4arm said:

 

If you look at https://en.t-firefly.com/doc/download/65.html#other_432 it seems there are 4 variants of M1 (all with BT :mellow:)

I'll ask the manufacture next week if they can also check the mainline kernel.

I know LibreELEC had a problem with them using Realtek wifi/bt, so they had to remove it to get official LE support.

Not sure if bt changes were added back later.

 

@balbes150

Here is 4.4 kernel dts with working bluetooth on StationOS

https://pastebin.com/1FBB9Jiu

Mainline dts

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/rockchip/rk3328-roc-pc.dts

Maybe uart2 bluetooth things are missing in dts used by mainline kernel?

Link to comment
Share on other sites

8 hours ago, Chris4arm said:

 

Hi mo123,

any news from the manufacturer ?

 

Chris

They are working on it.

 

It might just be as simple as adding the following to

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/rockchip/rk3328-roc-pc.dts#L97

 

+&uart2 {

+status = "okay";

+

+     bluetooth {

+     compatible = "realtek,rtl8723ds-bt";

+     device-wake-gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>; /* PL5 */

+     host-wake-gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; /* PL6 */

+     };

+};

 

then add such a patch to Armbian kernel patches and recompile Armbian.

But the Android 4.4 kernel has some other settings also for bluetooth which I don't know how it works with the 5.17 kernel.

 

What is the result of:

rfkill list

lsmod | grep -i blue     or     dmesg | grep -i blue

lsmod

(Not sure if the commands work)

 

What files do you see here and in the subfolders?

/lib/firmware

Are there rtl8723d*- files?

 

Link to comment
Share on other sites

2 hours ago, mo123 said:

What is the result of:

rfkill list

lsmod | grep -i blue     or     dmesg | grep -i blue

lsmod

(Not sure if the commands work)

 

What files do you see here and in the subfolders?

/lib/firmware

Are there rtl8723d*- files?

 

 

On Armbian 22.02.0-trunk  with bleeding edge Linux 5.16.1-media :

 

root@station-m1:~# rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
root@station-m1:~# lsmod | grep -i blue 
root@station-m1:~# dmesg | grep -i blue
root@station-m1:~# lsmod
Module                  Size  Used by
xfrm_user              45056  2
xfrm_algo              16384  1 xfrm_user
l2tp_ppp               28672  0
l2tp_netlink           24576  1 l2tp_ppp
l2tp_core              53248  2 l2tp_ppp,l2tp_netlink
ip6_udp_tunnel         16384  1 l2tp_core
udp_tunnel             28672  1 l2tp_core
pppox                  16384  1 l2tp_ppp
ppp_generic            49152  2 pppox,l2tp_ppp
slhc                   20480  1 ppp_generic
uinput                 28672  1
8723ds               1462272  0
hid_apple              20480  0
crct10dif_ce           20480  1
cfg80211              884736  1 8723ds
apple_mfi_fastcharge    20480  0
rfkill                 36864  3 cfg80211
ir_nec_decoder         20480  0
rc_station             16384  0
gpio_ir_recv           16384  0
rc_core                57344  4 gpio_ir_recv,ir_nec_decoder,rc_station
rockchip_rga           28672  0
hantro_vpu            118784  0
rockchip_vdec          49152  0
rockchip_iep           20480  0
videobuf2_dma_sg       24576  1 rockchip_rga
v4l2_h264              16384  2 rockchip_vdec,hantro_vpu
v4l2_mem2mem           40960  4 rockchip_vdec,hantro_vpu,rockchip_rga,rockchip_iep
videobuf2_vmalloc      20480  1 hantro_vpu
videobuf2_dma_contig    24576  3 rockchip_vdec,hantro_vpu,rockchip_iep
videobuf2_memops       20480  3 videobuf2_vmalloc,videobuf2_dma_contig,videobuf2_dma_sg
videobuf2_v4l2         32768  5 rockchip_vdec,hantro_vpu,rockchip_rga,rockchip_iep,v4l2_mem2mem
videobuf2_common       69632  10 rockchip_vdec,videobuf2_vmalloc,videobuf2_dma_contig,videobuf2_v4l2,hantro_vpu,rockchip_rga,videobuf2_dma_sg,rockchip_iep,v4l2_mem2mem,videobuf2_memops
videodev              262144  7 rockchip_vdec,videobuf2_v4l2,hantro_vpu,rockchip_rga,videobuf2_common,rockchip_iep,v4l2_mem2mem
snd_soc_rk3328         16384  1
lima                   61440  0
gpu_sched              49152  1 lima
mc                     61440  6 rockchip_vdec,videodev,videobuf2_v4l2,hantro_vpu,videobuf2_common,v4l2_mem2mem
snd_soc_simple_card    24576  0
snd_soc_simple_card_utils    28672  1 snd_soc_simple_card
snd_soc_rockchip_i2s    24576  4
zram                   40960  3
fuse                  131072  1
phy_rockchip_inno_usb3    28672  0
gpio_syscon            20480  1
adc_keys               16384  0
root@station-m1:~#

 

root@station-m1:/lib/firmware# find . -iname \*8723d\*
./rtl_bt/rtl8723ds_config.bin
./rtl_bt/rtl8723d_fw.bin
./rtl_bt/rtl8723d_config.bin
./rtl_bt/rtl8723ds_fw.bin

 

Chris
 

 

Link to comment
Share on other sites

18 hours ago, Chris4arm said:

Hi,

 

any progress ?

 

Chris

We are a little closer.

Managed to add the driver to 5.17 kernel.

The bluetooth icon shows but then have a problem loading the firmware files.

 

Also going to test the 4.4 kernel and compare with working Ubuntu image.

Link to comment
Share on other sites

5 hours ago, balbes150 said:

A test version in which I added some elements for BT. BT doesn't work on my instance, maybe others will have a different result. Also included in the image is a utility for managing BT

 

 

rtk_hciattach -n -s 115200 /dev/ttyS2 rtk_h5

 

 

https://disk.yandex.ru/d/yY2wu1u4p7j4CQ

 

Thanks,

result on my M1 :

root@station-m1:~#  rtk_hciattach -n -s 115200 /dev/ttyS2 rtk_h5 
noflow
Realtek Bluetooth init uart with init speed:115200, final_speed:115200, type:HCI UART H5
Realtek Bluetooth :Realtek hciattach version 4.1 

Realtek Bluetooth :3-wire sync pattern resend : 1, len: 8

Realtek Bluetooth :Get SYNC Resp Pkt

Realtek Bluetooth :Get SYNC pkt-active mode

Realtek Bluetooth :3-wire config pattern resend : 1 , len: 10
Realtek Bluetooth :Get CONFG pkt-active mode

Realtek Bluetooth :Get CONFG resp pkt-active mode

Realtek Bluetooth :H5 init finished

Realtek Bluetooth :H5 IC
Realtek Bluetooth :RTK send HCI_VENDOR_READ_RTK_ROM_VERISION_Command

Realtek Bluetooth :Received reliable seqno 0 from card
Realtek Bluetooth :receive hci command complete event with command:1001

Realtek Bluetooth :Read Local Version Information with Status:0
Realtek Bluetooth :HCI Version 0x08
Realtek Bluetooth :HCI Revision 0x000d
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :RTK send HCI_VENDOR_READ_RTK_ROM_VERISION_Command

Realtek Bluetooth :Received reliable seqno 1 from card
Realtek Bluetooth :receive hci command complete event with command:fc6d

Realtek Bluetooth :Read RTK rom version with Status:0
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :EVersion 2
Realtek Bluetooth :IC: RTL8723DS

Realtek Bluetooth :Firmware/config: rtl8723d_fw, rtl8723d_config

vendor_storage open fail
Realtek Bluetooth ERROR: vendor storage read bt addr failed, generate one
vendor_storage open fail
Realtek Bluetooth ERROR: can't access bt config file:/lib/firmware/rtlbt/rtl8723d_config, errno:2

Realtek Bluetooth ERROR: Get Config file error, just use efuse settings
Realtek Bluetooth ERROR: Can't access firmware /lib/firmware/rtlbt/rtl8723d_fw, No such file or directory
Realtek Bluetooth ERROR: Get BT firmware error
Can't initialize device: No such file or directory
root@station-m1:~# hciconfig 
root@station-m1:~# rfkill 
ID TYPE      DEVICE          SOFT      HARD
 0 bluetooth bt_default unblocked unblocked
 1 wlan      phy0       unblocked unblocked
 2 wlan      phy1       unblocked unblocked
root@station-m1:~# hcitool dev
Devices:
root@station-m1:~# 

 

A firmware file seems missing...

 

 

Link to comment
Share on other sites

13 часов назад, Chris4arm сказал:

A firmware file seems missing...

copy 

/lib/firmware/rtl_bt/rtl8723ds_config.bin     to     /lib/firmware/rtlbt/rtl8723d_config  

/lib/firmware/rtl_bt/rtl8723ds_fw.bin    to   /lib/firmware/rtlbt/rtl8723d_fw

 

Enable Bluetooth Manager

 

run

rtk_hciattach -n -s 115200 /dev/ttyS2 rtk_h5

Link to comment
Share on other sites

27 minutes ago, balbes150 said:

copy 

/lib/firmware/rtl_bt/rtl8723ds_config.bin     to     /lib/firmware/rtlbt/rtl8723d_config  

/lib/firmware/rtl_bt/rtl8723ds_fw.bin    to   /lib/firmware/rtlbt/rtl8723d_fw

 

Enable Bluetooth Manager

 

run

rtk_hciattach -n -s 115200 /dev/ttyS2 rtk_h5

 

The rtk_hciattach command don't release the prompt but, so far, that works :thumbup:

More tests ASAP...

 

Link to comment
Share on other sites

Version 20220311-legacy for Station M1, which adds support for BT.

To turn on BT, after the initial system startup and logging in to XFCE, turn on BT in the bluetooth manager and restart the system. After that, you can connect BT devices.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines