nymea / nymea-networkmanager

This daemon allows to set up the wireless network using a Bluetooth LE connection.
GNU General Public License v3.0
57 stars 17 forks source link

L2CAP write request incomplete: 0 of 23 #39

Open ericmigi opened 4 years ago

ericmigi commented 4 years ago

Very weird problem! Generally Berrylan is working great, except for one user.

Fresh install, fresh boot. Getting this error: L2CAP write request incomplete: 0 of 23

iPhone 12 max iOS 14.0. Hardware: amlogic s912 tv box running Armbian on 5.9 kernel

also tested with an iPhone 8, on iOS 13.6.1. same issue. But it totally works for other users :/

image

t-mon commented 4 years ago

Watching at your logs, the commands arrive successfully to the nymea-networkmanager, are you getting responses in the app, like network list or something? Are you able to set up a wifi network at all or what is the effect?

Which Qt version do you have installed on your device? If this is an Armbian, I guess you have a buster underneath?

ericmigi commented 4 years ago

No, the network list never appears in the app. The spinner just keeps spinning. The weird part is that this exact setup works for other phones, it's only for this specific user that the error appears. He's tried with several different iPhones too!

Yes, it's stock Armbian buster.

ericmigi commented 4 years ago

this is happening on arm64, forgot to mention

t-mon commented 4 years ago

So currently I have no idea why the writing back to the phone is not working. Something seems to went wrong while writing to any characteristic. This could happen on qt, bluez, firmware or even kernel level. Is it working if you restart nymea-networkmanager, since there was a bug in the past when advertising started the second time.

Also having the full log from the start until this error might be helpful.

Please make sure there is no password in the logs!

pastudan commented 4 years ago

I'm the user having this issue that @ericmigi is referring to. http://ix.io/2D8j are the full logs when I run running nymea-networkmanager directly.

mzanetti commented 4 years ago

Can you please try to a) Remove the device from the phone's bluetooth settings (if it's in there) b) sudo rm -r /var/lib/bluetooth/* and reboot

FWIW, this is the line in QtBluetooth that bails out... Apparently when writing to the l2cap file provided by BlueZ. https://code.qt.io/cgit/qt/qtconnectivity.git/tree/src/bluetooth/qlowenergycontroller_bluez.cpp#n979

No idea right now why this might happen for that particular device only...

Does this phone work when trying to set up e.g. a Raspberry Pi with the original image from berrylan.org?

pastudan commented 4 years ago

Sure!

a) I never paired it with my phone, so it's not in the list of devices b) tried removing /var/lib/bluetooth/* on the pi... same issue still


After installing the official BerryLan image, I am still having the same issue :-(

logs from official BerryLan image running on rPI4, using iPhone 11 Pro Max BerryLan app: http://ix.io/2Dgw