lwfinger / rtl8723be

This repo is obsolete. Use lwfinger/rtlwifi_new instead.
46 stars 41 forks source link

rtl8723be #2

Open jp5400 opened 10 years ago

jp5400 commented 10 years ago

I get error with kernel 3.14

CC [M] /home/janusz/rtl8723be/rtl8723be/trx.o /home/janusz/rtl8723be/rtl8723be/trx.c: In function ‘rtl8723be_rx_query_desc’: /home/janusz/rtl8723be/rtl8723be/trx.c:621:3: error: implicit declaration of function ‘_ieee80211_is_robust_mgmt_frame’ [-Werror=implicit-function-declaration]

Do you have any suggestion.

JP

lwfinger commented 10 years ago

On my system, I get:

make -C /lib/modules/3.14.0-rc3-wl+/build M=/home/finger/rtl8723be/rtl8723be modules make[2]: Entering directory /home/finger/wireless-testing-new' CC [M] /home/finger/rtl8723be/rtl8723be/hw.o CC [M] /home/finger/rtl8723be/rtl8723be/table.o CC [M] /home/finger/rtl8723be/rtl8723be/sw.o CC [M] /home/finger/rtl8723be/rtl8723be/trx.o CC [M] /home/finger/rtl8723be/rtl8723be/led.o CC [M] /home/finger/rtl8723be/rtl8723be/fw.o CC [M] /home/finger/rtl8723be/rtl8723be/phy.o CC [M] /home/finger/rtl8723be/rtl8723be/rf.o CC [M] /home/finger/rtl8723be/rtl8723be/dm.o CC [M] /home/finger/rtl8723be/rtl8723be/pwrseq.o CC [M] /home/finger/rtl8723be/rtl8723be/pwrseqcmd.o LD [M] /home/finger/rtl8723be/rtl8723be/rtl8723be.o Building modules, stage 2. MODPOST 1 modules CC /home/finger/rtl8723be/rtl8723be/rtl8723be.mod.o LD [M] /home/finger/rtl8723be/rtl8723be/rtl8723be.ko make[2]: Leaving directory/home/finger/wireless-testing-new' make[1]: Leaving directory `/home/finger/rtl8723be/rtl8723be' finger@larrylap:~/rtl8723be> git push Everything up-to-date finger@larrylap:~/rtl8723be> uname -r 3.14.0-rc3-wl+

Have you done the latest pull?

jp5400 commented 10 years ago

I found the problem in additional character "_" before "ieee80211" in single line of trx.c file (the latest repo). When corrected the make works well. This was easy. The major problem I found is with bluetooth (hcitool scan braking without message, scanning with wifi tool endless). I tried almost all kernels from various distros. My believe is that the antenna is down. Supposedly the device is sharing the antenna with wifi and this has not been yet worked out. The lsusb shows realtek b728 device (not like lspci b723). When I looked into windows driver their various inf files containing refs to bluetooth version b728. I can post the windows 64x7 driver if it can be helpful.
JP

lwfinger commented 10 years ago

There is no driver in the kernel that works for the BT part of the rtl8723*e. Where are you getting a driver?

jp5400 commented 10 years ago

I hoped that rk8723be module from above repo would incorporate bluetooth driver (btcoexist). I tried 8723au and 8192 modules as well. Indeed it has not been said precisely that bluetooth was different problem although the same chipset , jp

lwfinger commented 10 years ago

btcoexist allows a wifi driver to coexist with a bluetooth driver. It is not a bluetooth driver.

Realtek sent me a driver for BT some time ago. I tried to submit it to the kernel, but it was rejected. I have not had time to look at it much lately. There is another version of it at http://github.com/lwfinger/rtl8723au_bt.git. It may work, or it may not. I have no way to test it.

jp5400 commented 10 years ago

I tested your au_bt driver. The device behaved strangely: registered as hci0, visible on system but no radio detected either by outside devices or hcitool scan. I did not test it after installing latest wifi module. Will check and wait patiently. Thank you very much for your explanations.

gatorliu commented 10 years ago

I tried the rtl8723au_bt drive too. It is not work, because firmware version is different. Then I try to forced to load firmware(rtk8723a.bin), then get the error: rtk_btusb: download_data failed! rtk_btusb: Rtk patch end -110 rtk_btusb: btusb_open failed pm_usage_cn (0x0)

Could you share the BT' driver of Realtek given or the current firmware?

Thank you very much.

jp5400 commented 10 years ago

As far as I know there is no BT driver for RLT8723 PCI card (725wifi&723BT) availiable for any kernel. There is only RLT8723 PCI wifi driver or RLT8723 BT dongle driver. jp

On 05/26/2014 09:45 AM, Gator Liu wrote:

I tried the rtl8723au_bt drive too. It is not work, because firmware version is different. Then I try to forced to load firmware(rtk8723a.bin), then get the error: rtk_btusb: download_data failed! rtk_btusb: Rtk patch end -110 rtk_btusb: btusb_open failed pm_usage_cn (0x0)

Could you share the BT' driver of Realtek given or the current firmware?

Thank you very much.

— Reply to this email directly or view it on GitHub https://github.com/lwfinger/rtl8723be/issues/2#issuecomment-44165034.

lwfinger commented 10 years ago

The repo at http://github.com/lwfinger/rtl8723au_bt.git drives every BT device that Realtek has delivered. These include the units attached to (at least) RTL8723AU, RTL8723AE, RTL8723BE, and RTL8821AE. Firmware is needed, and it has been added to the "new" branch of the repo.

jp5400 commented 10 years ago

Thank you for link to "new". I hope it will work with kernel 3.14 although the readme file says up to 3.10. jp On 05/27/2014 03:26 AM, lwfinger wrote:

The repo at http://github.com/lwfinger/rtl8723au_bt.git https://github.com/lwfinger/rtl8723au_bt.git drives every BT device that Realtek has delivered. These include the units attached to (at least) RTL8723AU, RTL8723AE, RTL8723BE, and RTL8821AE. Firmware is needed, and it has been added to the "new" branch of the repo.

— Reply to this email directly or view it on GitHub https://github.com/lwfinger/rtl8723be/issues/2#issuecomment-44227807.

lwfinger commented 10 years ago

Don't believe everything you read. I built it with kernel 3.15-rc6.

jp5400 commented 10 years ago

There is problem with file names: some start with rtk and others with rtl This is causing errors during installation. make create files with rtk but installation script ask for rtl8723a_config.bin although the file name is actually rtk8723a_config.bin. After changing the name installation went OK. I will check later how it communicate with some devices. Anyway Thank you for very much indeed

On 05/27/2014 07:24 AM, lwfinger wrote:

Don't believe everything you read. I built it with kernel 3.15-rc6.

— Reply to this email directly or view it on GitHub https://github.com/lwfinger/rtl8723be/issues/2#issuecomment-44236974.

jp5400 commented 10 years ago

Well so far not working but may be the problems is in BT device which acctually shows different chipset b728. Wifi which suppose is a kind of combo with bt is b723 and your firmware for wifi works very well.

"Bus 001 Device 003: ID 0bda:b728 Realtek Semiconductor Corp"

Many thanks anyway.

On 05/27/2014 07:24 AM, lwfinger wrote:

Don't believe everything you read. I built it with kernel 3.15-rc6.

— Reply to this email directly or view it on GitHub https://github.com/lwfinger/rtl8723be/issues/2#issuecomment-44236974.

lwfinger commented 10 years ago

I have fixed the file naming problem. My copy was OK, but a file with the wrong name got pushed.

According to the source, both b723 and b728 should work with the same driver and firmware. My test device is b723, and I do not have one with b728.

jp5400 commented 10 years ago

The problem is the same as with previous version of driver: endless search for new outside device to communicate with although the BT device itself seemed to work ok. Previously I searched several forums and I found quite a magic explanation that the device antenna is switched off and the only way to go around is to install win8 and turned the device on after installing the driver. I have not tried it out. The antenna is supposedly shared by wifi so if wifi works, bt should as well. I have to go through my old procs to test is fully. I appreciate your previous help with wifi. jp

On 05/27/2014 05:00 PM, lwfinger wrote:

I have fixed the file naming problem. My copy was OK, but a file with the wrong name got pushed.

According to the source, both b723 and b728 should work with the same driver and firmware. My test device is b723, and I do not have one with b728.

— Reply to this email directly or view it on GitHub https://github.com/lwfinger/rtl8723be/issues/2#issuecomment-44287805.

lwfinger commented 10 years ago

Although the wifi and BT have a common antenna and probably a common TX and RX amplifiers, there might be different ways to turn them on. You might use wireshark or kismet on a second computer to see if the BT MAC address is transmitting anything.

gatorliu commented 10 years ago

Thank you guys so much. I will try it today and report later.

jp5400 commented 10 years ago

I had one more problem during installation. After ~$sudo install the BT interface (Ubuntu 12.04 LTS) did not work so I did ~$sudo modprobe btusb and the interace started but the device can not communicat when I tried ~$sudo modprobe rtk_btusb I got error telling that device is busy I remove btusb ~$sudo modprobe -r btusb then ~$sudo modprobe rtk_btusb worked well and after that ~$sudo modprobe btusb which added the interface and the driver is marked as active and working although the scan is negative. Many thanks, jp

On 05/27/2014 05:00 PM, lwfinger wrote:

I have fixed the file naming problem. My copy was OK, but a file with the wrong name got pushed.

According to the source, both b723 and b728 should work with the same driver and firmware. My test device is b723, and I do not have one with b728.

— Reply to this email directly or view it on GitHub https://github.com/lwfinger/rtl8723be/issues/2#issuecomment-44287805.

gatorliu commented 10 years ago

Unfortunately, my bt doesn't work yet. I don't know why the firmware can't be loaded. I check the rtl8723_config.bin is exist. I got the message as following:

[  272.819468] rtk_btusb: module verification failed: signature and/or  required key missing - tainting kernel
[  272.831663] usbcore: registered new interface driver btusb
[  272.837075] rtk_btusb: check_fw_version : read_ver_rsp->lmp_subver = 0x8723
[  272.837082] rtk_btusb: check_fw_version : read_ver_rsp->status = 0x0
[  272.837084] rtk_btusb: check_fw_version : read_ver_rsp->hci_ver = 0x6
[  272.837086] rtk_btusb: check_fw_version : read_ver_rsp->hci_rev = 0xb
[  272.837088] rtk_btusb: check_fw_version : read_ver_rsp->lmp_ver = 0x6
[  272.837091] rtk_btusb: check_fw_version : read_ver_rsp->manufacturer = 0x5d
[  272.837093] rtk_btusb: check_fw_version : read_ver_rsp->lmp_subver = 0x8723
[  272.837095] rtk_btusb: check_fw_version : patch_entry->lmp_subver = 0x8723
[  272.838238] rtk_btusb: hci0 rtk_get_eversion failed (-56)
[  272.838246] rtk_btusb: load_firmware start ,lmp_version = 0x8723
[  272.838307] usb 1-3.2: Direct firmware load failed with error -2
[  272.838311] usb 1-3.2: Falling back to user helper
[  272.847835] usb 1-3.2: Direct firmware load failed with error -2
[  272.847843] usb 1-3.2: Falling back to user helper
[  272.858583] rtk_btusb: patch_entry->fw_len = 0

and

$ hciconfig 
hci0:   Type: BR/EDR  Bus: USB
    BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
    DOWN 
    RX bytes:20 acl:0 sco:0 events:2 errors:0
    TX bytes:6 acl:0 sco:0 commands:2 errors:0
$ lsusb
.....
Bus 001 Device 005: ID 0bda:b723 Realtek Semiconductor Corp.
....

Is it a chip or bios issue?

I using a 'legacy mode' as BIOS. OS: ubuntu 14.04 kernel 3.15.0-031500rc6-generic x86_64

gatorliu commented 10 years ago

Thank you everybody. My bt works, after

cd /lib/firmware/
cp rtl8723_config.bin rtl8723_config
cp rtl8723_fw.bin rtl8723_fw
etercert commented 10 years ago

Works for me as well.

ghost commented 10 years ago

Hi all,

I had no luck so far with the above solution. I have a Realtek wifi chip-set combo (wifi and BT), but only wifi works properly (with module rtl8723be). I do have bluetooth up and apparently running, but it cannot recognize any device, and vice-versa devices cannot see the computer (made "visible" via the bluetooth applet). Note that my BT is internal, it is not a USB dongle, but my understanding of posting #

I use Ubuntu 12.04 x86_64, kernel linux 3.11.0-23-generic. Below are results of few bash commands.


~$ lsusb | grep Realtek Bus 003 Device 003: ID 0bda:b002 Realtek Semiconductor Corp.

~$ lspci -nn | grep Realtek 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b723] 04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device [10ec:5289](rev 01) 04:00.2 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168](rev 0a)

~$ hciconfig hci0: Type: BR/EDR Bus: USB BD Address: 54:27:1E:4E:98:0A ACL MTU: 820:8 SCO MTU: 255:16 UP RUNNING PSCAN ISCAN RX bytes:2148 acl:0 sco:0 events:97 errors:0 TX bytes:2174 acl:0 sco:0 commands:95 errors:0

~$ lsmod | grep blue bluetooth 391726 25 btusb,rtk_btusb,rfcomm,bnep

~$ lsmod | grep wifi rtlwifi 133576 1 rtl8723be mac80211 623710 2 rtl8723be,rtlwifi cfg80211 499466 2 rtlwifi,mac80211

~$ sudo lshw -C network -network
description: Interface réseau sans fil produit: Realtek Semiconductor Co., Ltd. fabriquant: Realtek Semiconductor Co., Ltd. (...) nom logique: wlan0 (...) bits: 64 bits horloge: 33MHz fonctionnalités: pm msi pciexpress bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=rtl8723be driverversion=3.11.0-23-generic firmware=N/A ip=192.168.1.91 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn ressources: irq:47 portE/S:e000(taille=256) mémoire:f7d00000-f7d03fff
-network description: Ethernet interface produit: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller fabriquant: Realtek Semiconductor Co., Ltd. (...) nom logique: eth0 (...) bits: 64 bits horloge: 33MHz fonctionnalités: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8411-1_0.0.3 06/18/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s ressources: irq:42 portE/S:d000(taille=256) mémoire:f0004000-f0004fff mémoire:f0000000-f0003fff


My other 8-year-old computer grabs any BT device in seconds (with Ubuntu 12.04 as well, but with a non-Realtek BT chipset....).

Can someone help me ? Thanks in advance.

ghost commented 10 years ago

OOps, here is the missing part of above posting:

.... but my understanding of posting << lwfinger commented 29 days ago >> in response to << jp5400 commented on 26 May >> is that this does not matter, the solution offered here should work with my RTL8723BE.

Also, I noticed that even after running the installation of rtl8723au_bt, without any error message, I have neither file /lib/firmware/cp rtl8723_config.bin nor file /lib/firmware/rtl8723_fw.bin . Is this expected? Did I miss something?

lwfinger commented 10 years ago

Your BT device is USB, even though you do not have a dongle. A USB device can be built into the motherboard; however, in this case it is part of the PCIe board.

If you switch to the new branch and do "make && sudo make install", you will have the necessary firmware. The BT device that is part of the RTL8723BE will never work on the master branch!

ghost commented 10 years ago

<< If you switch to the new branch >>, what do you mean?

This is what I did: git clone https://github.com/lwfinger/rtl8723au_bt cd rtl8723au_bt make sudo make install sudo modprobe rtk_btusb sudo modprobe btusb

Where was/were my mistakes? Thanks.

lwfinger commented 10 years ago

The git repo has more than one branch. You can see all of them with 'git branch -a'. You are on branch "master", which is OK for the BT attached to an RTL8723AU chip, but you need branch "new".

Use 'git checkout origin/new -b new' to get the correct one.

ghost commented 10 years ago

Getting there, thanks for your help.

At the command: ~$ git clone https://github.com/lwfinger/rtl8723au_bt I have the response: Cloning into 'rtl8723au_bt'... WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-yV1x8v/pkcs11: No such file or directory remote: Reusing existing pack: 43, done. remote: Total 43 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (43/43), done.

Apart from that, the git checkout, make, and sudo make install went well.

Now the issue is that my BT still does not see BT devices (I double check with my old computer that BT devices are visible, and indeed this old crap does a better job than my new computer when it comes to BT - it works with Broadcom BCM2046B1).

Can you help me further? Thanks.

ghost commented 10 years ago

Also, the other issue that I have is that, unlike jp5400 above (29 days ago), I cannot load both btusb and rtk_btusb, no matter in which order I do it. Once one of them is loaded, the attempt to load the other tells me that the device is busy. Howeveer, with only one of them loaded, I have the BT icon in the menu bar, and the complete menu if I click on it. The problem remains the same: no BT device is being detected (and the same is true with a scan command in a terminal).

I hope that we can solve the problem. Of course, I could just drop this and buy for $10 and Intel or a Broadcam wifi-BT combo, which are known to work under Linux/Ubuntu, but I find it unsatisfactory to have some material in my computer that does not work with Ubuntu. And besides, the wifi part of that Realtek chipset does work, it's only the BT part that does not.

Again, thanks in advance to those of you who could help to solve this.

lwfinger commented 10 years ago

Drivers rtk_btusb and btusb are mutually exclusive. If you want to use the Realtek BT device, you must blacklist btusb.

An attempt to merge the two drivers was attempted many months ago, but the BT community rejected the patches. I have not had time to rework the patches.

ghost commented 10 years ago
Ok, but how do you explain why, when I load rtk_btusb and not btusb,
my buetooth does not work properly (unabilty to detect BT devices
around)?Le 26/06/2014 11:28, lwfinger a écrit :

  Drivers rtk_btusb and btusb are mutually exclusive. If you want
    to use the Realtek BT device, you must blacklist btusb.
  An attempt to merge the two drivers was attempted many months
    ago, but the BT community rejected the patches. I have not had
    time to rework the patches.
  —
    Reply to this email directly or view
      it on GitHub.
lwfinger commented 10 years ago

I did not say that rtk_btusb did not have bugs. I just said that it could not possibly work with btusb. As of yet, I have not had an opportunity to debug it.

jp5400 commented 10 years ago

Thank you for including me in your mail-list. I found your firmware and activities around firmware for rlt very appreciated. There are so many reason why the BT module might not work including hardware problems or its interaction that even timeless effort are just not enough. My laptop B5400 had Ubuntu certification but I just did not noticed that some are send with different component (even sellers were not aware about details). I had interesting a story with Chinese made device with Rockcheep which exemplify the problem.
Firmware is crucial for smooth work and this has not been appreciated by OS providers. So thank you again.

Well unfortunately the BT module is not working for my device. I think it does not detect the device although it is recognized by general Ubuntu module btusb (which does not work appropriately so it is useless any way). Comparing the modules might be helpful. My knowledge towers drivers is insufficient to do it.

JP

On 06/26/2014 08:08 PM, lwfinger wrote:

I did not say that rtk_btusb did not have bugs. I just said that it could not possibly work with btusb. As of yet, I have not had an opportunity to debug it.

— Reply to this email directly or view it on GitHub https://github.com/lwfinger/rtl8723be/issues/2#issuecomment-47259013.

jp5400 commented 10 years ago

I agree, althoug at some point I was able to load both modules using "Additional driver toools" or modeprobe. I agree thay can not be loaded in parallel and playing with addiing them together crushed my kernel at some point. Well unfortunately the BT module is not working for my device. I think it does not detect the device although it is recognized by general Ubuntu module btusb (which does not work appropriately so it is useless any way). Comparing the modules might be helpful. My knowledge about drivers is insufficient to do it myself.

JP

On 06/26/2014 06:20 PM, madpentiste wrote:

Ok, but how do you explain why, when I load rtk_btusb and not btusb, my buetooth does not work properly (unabilty to detect BT devices around)?Le 26/06/2014 11:28, lwfinger a écrit :

Drivers rtk_btusb and btusb are mutually exclusive. If you want to use the Realtek BT device, you must blacklist btusb. An attempt to merge the two drivers was attempted many months ago, but the BT community rejected the patches. I have not had time to rework the patches. — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/lwfinger/rtl8723be/issues/2#issuecomment-47246924.

jp5400 commented 10 years ago

Which is the recommended order for installing the nodules: rtk_btusb.ko rtl8723be.ko btcoexist.ko JP

On 06/26/2014 08:08 PM, lwfinger wrote:

I did not say that rtk_btusb did not have bugs. I just said that it could not possibly work with btusb. As of yet, I have not had an opportunity to debug it.


Reply to this email directly or view it on GitHub https://github.com/lwfinger/rtl8723be/issues/2#issuecomment-47259013.

dsd commented 10 years ago

I'm working on sending the code from the new branch upstream into mainline Linux so that everyone is free of these pains, it will then "just work".

I would like to check on 1 detail though - the identification of these devices. Can a handful of people please post lsusb -v output for their hardware? If it's long then use a pastebin or http://gist.github.com

You can do this whether or not you have got the driver working.

jp5400 commented 10 years ago

Good luck I placed the printout as anonymous JP On 07/01/2014 09:56 AM, Daniel Drake wrote:

|lsusb -v|

dsd commented 10 years ago

Thanks JP but you also need to post the link to where you pasted it :)

jp5400 commented 10 years ago

https://gist.github.com/anonymous/32d75f8fa74e18a6ccea JP On 07/01/2014 10:16 AM, Daniel Drake wrote:

Thanks JP but you also need to post the link to where you pasted it :)

— Reply to this email directly or view it on GitHub https://github.com/lwfinger/rtl8723be/issues/2#issuecomment-47629015.

dsd commented 10 years ago

Thanks.

ghost commented 10 years ago

Here is mine: https://gist.github.com/madpentiste/0809d612bfcf23df966b

Thanks and good luck.

freechelmi commented 10 years ago

Hi , I'm working with rtl8723BE and the "new" branch is installing fine after renaming the firmware files.

But like before the scan returns nothing.... any idea ?

lwfinger commented 10 years ago

"Nothing" is not an exhaustive description. Any number of things can prevent a scan. Check the output of dmesg for clues. You might post the output of the scan command you used.

idpnd commented 10 years ago

Ive tried compiling it for RTL8723be, including

cd /lib/firmware/ cp rtl8723_config.bin rtl8723_config cp rtl8723_fw.bin rtl8723_fw

what would you like for debugging purposes?

idpnd commented 10 years ago

lsmod | grep bluet bluetooth 391196 12 bnep,rtk_btusb,rfcomm

dmesg | grep rtk [ 8058.492949] rtk_btusb: hci0 reading rtk fw version command failed (-110) [ 8058.492958] rtk_btusb: check_fw_version 1 error [ 8478.012149] rtk_btusb: hci0 reading rtk fw version command failed (-110) [ 8478.012157] rtk_btusb: check_fw_version 1 error

hciconfig -a hci0 hci0: Type: BR/EDR Bus: USB 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:6 acl:0 sco:0 commands:2 errors:0

rkline1963 commented 10 years ago

The issue that jp5400 noted on Feb 25 about an additional "_" in the file trx.c (in line 621) preventing the module from compilin appears to be in the current version of the code in the repository. I had to delete it to get the module to compile, and now it is working albeit with a lot of messages showing up in the kernel ring buffer when I check with dmesg.

lwfinger commented 10 years ago

What kernel and branch are you using? That "_" is needed for the latest kernel versions. Without it, the code will compile with warnings, but fail execution.

There are always a lot of messages in the ring buffer. Please be a little more specific. Are they errors, or just general stuff. As the drivers come from Realtek, they are always chatty. They selece DBG_DMESG as the default level. I prefer DBG_EMERG.

rkline1963 commented 10 years ago

I don't think the messages in ring buffer are errors since you say Realtek code is chatty (seeing 20 lines of stuff show up every couple of seconds was concerning to me). It seems to be stuff like the following: [ 1626.391463] rtlwifi-0:rtl_cam_add_one_entry():<0-0> end [ 1626.391532] rtlwifi-0:rtl_op_set_key():<0-0> Using hardware based encryption for keyidx: 2, mac: ff:ff:ff:ff:ff:ff [ 1626.391534] rtlwifi-0:rtl_op_set_key():<0-0> alg:TKIP [ 1626.391535] rtlwifi-0:rtl_op_set_key():<0-0> set group key [ 1626.391537] rtl8723be-0:rtl8723be_set_key():<0-0> add one entry [ 1626.391538] rtl8723be-0:rtl8723be_set_key():<0-0> set group key

For the module compliation issue, I'm running the Debian Wheezy backport options kernel 3.14-0.bpo.2-amd64 under Crunchbang Waldorf. There was also a compile error for the orignal 3.2 kernel from Wheezy, but there was forum post elsewhere that gave the checksum to use for a "git checkout" command to create a branch for a version before you made the changes for the latest kernels. I just cloned the repository into a temporary directory and have put the output from when I type "make" at the end of the post. Is there any other information you need from me to make sense of what is going on?

make -C /lib/modules/3.14-0.bpo.2-amd64/build M=/home/rkline/tmp/rtl8723be modules make[1]: Entering directory /usr/src/linux-headers-3.14-0.bpo.2-amd64' CC [M] /home/rkline/tmp/rtl8723be/base.o CC [M] /home/rkline/tmp/rtl8723be/rc.o CC [M] /home/rkline/tmp/rtl8723be/debug.o CC [M] /home/rkline/tmp/rtl8723be/regd.o CC [M] /home/rkline/tmp/rtl8723be/efuse.o CC [M] /home/rkline/tmp/rtl8723be/cam.o CC [M] /home/rkline/tmp/rtl8723be/ps.o CC [M] /home/rkline/tmp/rtl8723be/core.o CC [M] /home/rkline/tmp/rtl8723be/stats.o CC [M] /home/rkline/tmp/rtl8723be/pci.o LD [M] /home/rkline/tmp/rtl8723be/rtlwifi.o Building modules, stage 2. MODPOST 1 modules CC /home/rkline/tmp/rtl8723be/rtlwifi.mod.o LD [M] /home/rkline/tmp/rtl8723be/rtlwifi.ko make[1]: Leaving directory/usr/src/linux-headers-3.14-0.bpo.2-amd64' make[1]: Entering directory /home/rkline/tmp/rtl8723be/btcoexist' make -C /lib/modules/3.14-0.bpo.2-amd64/build M=/home/rkline/tmp/rtl8723be/btcoexist modules make[2]: Entering directory/usr/src/linux-headers-3.14-0.bpo.2-amd64' CC [M] /home/rkline/tmp/rtl8723be/btcoexist/halbtc8723b2ant.o CC [M] /home/rkline/tmp/rtl8723be/btcoexist/halbtcoutsrc.o CC [M] /home/rkline/tmp/rtl8723be/btcoexist/rtl_btc.o LD [M] /home/rkline/tmp/rtl8723be/btcoexist/btcoexist.o Building modules, stage 2. MODPOST 1 modules CC /home/rkline/tmp/rtl8723be/btcoexist/btcoexist.mod.o LD [M] /home/rkline/tmp/rtl8723be/btcoexist/btcoexist.ko make[2]: Leaving directory /usr/src/linux-headers-3.14-0.bpo.2-amd64' make[1]: Leaving directory/home/rkline/tmp/rtl8723be/btcoexist' make[1]: Entering directory /home/rkline/tmp/rtl8723be/rtl8723be' make -C /lib/modules/3.14-0.bpo.2-amd64/build M=/home/rkline/tmp/rtl8723be/rtl8723be modules make[2]: Entering directory/usr/src/linux-headers-3.14-0.bpo.2-amd64' CC [M] /home/rkline/tmp/rtl8723be/rtl8723be/hw.o CC [M] /home/rkline/tmp/rtl8723be/rtl8723be/table.o CC [M] /home/rkline/tmp/rtl8723be/rtl8723be/sw.o CC [M] /home/rkline/tmp/rtl8723be/rtl8723be/trx.o /home/rkline/tmp/rtl8723be/rtl8723be/trx.c: In function ‘rtl8723be_rx_query_desc’: /home/rkline/tmp/rtl8723be/rtl8723be/trx.c:621:3: error: implicit declaration of function ‘_ieee80211_is_robust_mgmt_frame’ [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make[5]: * [/home/rkline/tmp/rtl8723be/rtl8723be/trx.o] Error 1 make[4]: * [module/home/rkline/tmp/rtl8723be/rtl8723be] Error 2 make[3]: * [sub-make] Error 2 make[2]: * [all] Error 2 make[2]: Leaving directory /usr/src/linux-headers-3.14-0.bpo.2-amd64' make[1]: *** [default] Error 2 make[1]: Leaving directory/home/rkline/tmp/rtl8723be/rtl8723be' make: *\ [all] Error 2

lwfinger commented 10 years ago

I fixed the problem with the build, and changed the default debug level.

Pull again, and rebuild.

rkline1963 commented 10 years ago

The revised code does not put the large number of messages in to the kernel ring buffer, but I still had to edit the trx.c since the compiler does not like line 261 "if ((_ieee80211_is_robust_mgmt_frame(hdr)) &&" It looks like you changed the if statement not to use that branch for 3.14.0 or less kernels instead 3.13.0 in the previous version, but on my system, the compiler still sees it and complains. Could it be something with default compiler flags being different on the system you're developing on? I'm out of my depth when it comes to serious system program with C.

lwfinger commented 10 years ago

There was an API change in cfg80211 that changed the calling sequence for ieee80211_is_robust_mgmt_frame(). The version with the underscore was created to allow certain drivers to use the old calling sequence. It has nothing to do with compiler flags. The change was introduced into the mainline kernel in 3.15, but was present in the wireless-testing version in 3.14. That was the source of the confusion on my part.

The code says to use the version without the underscore if the kernel is 3.14 or older. According to what you posted above, you are using 3.14 and it should have worked. I do not understand.