Edimax EW-7611ULB on Raspberry Pi with Kernel 4.9
Sunday, February 26th, 2017 03:12 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
This is a quick post to record the changes I needed to make to the Bluetooth driver for an Edimax EW-7611ULB wifi & bluetooth usb dongle to get the bluetooth working on the (currently) new Raspberry Pi 4.9.11 kernel. Hopefully it can help anyone else using this adapter when they upgrade their Raspberry Pi.
The original instructions and source for installing the drivers for this adapter are published by Edimax themselves at: https://edimax.freshdesk.com/support/solutions/articles/14000047172-how-to-install-ew-7611ulb-adapter-on-raspberry-pi - but they currently cover installing the drivers for a Raspberry Pi running kernel 4.4. The wifi driver installation documented by Edimax works fine. There is one minor modification to the bluetooth driver source code required so that it will compile properly due to kernel api changes in kernel version 4.9 for the HCI driver interface.
In Section "(II.) Bluetooth Driver Installation", before running "sudo make install -s
", you need to edit the file bluetooth_usb_driver/rtk_coex.c. At line 448, change
#if HCI_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
#if HCI_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
bt_cb(skb)->req.start = true;
#else
bt_cb(skb)->hci.req_start = true;
#endif
#endif
to:
#if HCI_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
#if HCI_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
bt_cb(skb)->req.start = true;
#elif HCI_VERSION_CODE >= KERNEL_VERSION(4,9,0)
bt_cb(skb)->hci.req_flags |= HCI_REQ_START;
#else
bt_cb(skb)->hci.req_start = true;
#endif
#endif
Save the change, and then continue with the instructions by running the "sudo make install -s
" command.
Otherwise, follow the instructions on the Edimax link to get both wifi and bluetooth working properly with this adapter on the Raspberry Pi.
Re: again problems while installing
Date: 2017-09-03 08:57 am (UTC)Since the directory is there & the kernel version does match, the errors about files not being there (because they were renamed in the first install attempt) don't matter.
Is there a file named "rtk_btusb.ko" in the /lib/modules/4.9.41-v7+/kernel/drivers/bluetooth directory? If so, it means that the driver was correctly compiled, copied to the driver directory, and the next error to double-check is the depmod one: "depmod: ERROR: Bad version passed /lib/modules/4.9.41-v7+".
Google is saying that depmod builds a list of dependencies between kernel modules so that when you load a module it knows what else needs to be loaded (if I understood what I read correctly).
In the directory that you are typing "sudo make -s install" from, there is a file named "Makefile". At line 15 there is a command:
inside the install section. According to https://www.computerhope.com/unix/depmod.htm there are a few options to try.
and then run "sudo make install" (no -s). I expect this to still fail, but it should tell us more about why it is failing.
(with no ${MDL_DIR} at the end). This might allow the install to complete properly, but if not make sure that you use the "sudo make install" without the -s so that we get the error details being reported in full.
If number 2 doesn't work (install still failed), post back the error messages so that we've got more details to work from with troubleshooting the issue.
Re: again problems while installing
Date: 2017-09-03 12:28 pm (UTC)Thanks a lot for your time and help!
Re: again problems while installing
Date: 2017-09-03 01:35 pm (UTC)