BPI-R2 Kernel bluetouh module


(ZB) #41

do you try this command “hciconfig hci0 leadv 0” to enter LE mode? then try “hcitool lescan” to scan BLE devices.

image

here is the device:

after change to BLE,my phone can search R2: image


(Mark Edworthy) #42

I am having a similar problem with the Banana R2 variant of CentOS, I am getting a ‘RTNETLINK answers: Operation not supported’ error when ever I bring wlan0 up (I have also notice that the wlan0 interface with a randomised MAC addess on bootup).


My ifcfg-wlan0 configuration:

DEVICE=wlan0
TYPE=ethernet
MACADDR=00:17:a4:77:77:03
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.0.2.1
NETMASK=255.255.255.0
IPV6INIT=no
HOTPLUG=no


(ZB) #43

Hello, Mark, Do you installed macvlan? Could you please share your image to me, Let me have a try. thanks


(Mark Edworthy) #44

@Jackzeng, Thanks but a couple of hours ago, I decided to scrap my CentOS install and am considering to install some variant of Debian on to this device.

Are you aware of any Debian images (either Jessie or Stretch) that can be installed on EMMC and use Hostapd for SSD access point.?

I would also like this image not have any end-user applications, not to have a DE and not use the NetworkManager framework (ie. using WiCD instead) – In fact, I would like a minimum version of Debian that can be directly installed to the EMMC.


(Frank W.) #45

I have put my minimal debian stretch on gdrive…one image is for emmc. As a start. Make sure you have pconf set to 0x48 and burn preloader to boot0

https://drive.google.com/open?id=1oP7jy1KrrIOifvImo2nQ59wx3_9hHkgk

But this thread is for bluetooth and not wifi or emmc


(xbgmsharp) #46

hello,

i try the BT leadv command.

+ hciconfig -a hci0
hci0:	Type: Primary  Bus: SDIO
	BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
	DOWN 
	RX bytes:0 acl:0 sco:0 events:0 errors:0
	TX bytes:0 acl:0 sco:0 commands:0 errors:0
	Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	Packet type: DM1 DH1 HV1 
	Link policy: 
	Link mode: SLAVE ACCEPT

+ hciconfig hci0 up
+ hciconfig hci0 leadv 0
+ hciconfig -a hci0
hci0:	Type: Primary  Bus: SDIO
	BD Address: 00:00:46:85:90:01  ACL MTU: 1021:4  SCO MTU: 184:1
	UP RUNNING 
	RX bytes:370 acl:0 sco:0 events:19 errors:0
	TX bytes:114 acl:0 sco:0 commands:15 errors:0
	Features: 0xbf 0x3e 0x8d 0xfe 0xdb 0xff 0x5b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH SNIFF 
	Link mode: SLAVE ACCEPT 
	Name: 'MTK MT8590 #1'
	Class: 0x001f00
	Service Classes: Unspecified
	Device Class: Invalid Device Class!
	HCI Version: 4.0 (0x6)  Revision: 0x0
	LMP Version: 4.1 (0x7)  Subversion: 0x0
	Manufacturer: MediaTek, Inc. (70)

+ hciconfig list
hci0:	Type: Primary  Bus: SDIO
	BD Address: 00:00:46:85:90:01  ACL MTU: 1021:4  SCO MTU: 184:1
	UP RUNNING 
	RX bytes:647 acl:0 sco:0 events:22 errors:0
	TX bytes:126 acl:0 sco:0 commands:18 errors:0

+ hcitool dev
Devices:
	hci0	00:00:46:85:90:01

(ZB) #47

Hello,

Then you can try “hcitool lescan” to scan BLE devices.


(xbgmsharp) #48

Hang for ever.

# hcitool lescan
LE Scan ...

A normal scan see all my devices. but none see the BPI-R2.

# hcitool scan
Scanning ...
	B4:9D:0B:4D:xx:xx	phone1
	8C:85:90:42::xx:xx	phone2
	DC:41:5F:0B:xx:xx	phone3

(Mark Edworthy) #49

@Frank-w, thanks for this, very much appreciated.


(Frank W.) #50

Have you tried Bluetooth with Kernel 4.4? Maybe i made a mistake while porting


(ZB) #51

Hello,I think there is a different between BT and BLE,“hcitool lescan” probably only could search BLE devices,and “hcitool scan” probably only could serach BT devices,could you please use a BLE app on your phone to have a try?


(Frank W.) #52

Any new information here?


(Frank W.) #53

@garywang any updates here? did you got BT working?