meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
peerhood:solution [2010/03/22 11:13]
julaakko
peerhood:solution [2011/09/02 12:05] (current)
Line 26: Line 26:
  
  
-==== Genral bugs in code ====+===== Genral bugs in code =====
  
 === HasData() -function === === HasData() -function ===
Line 33: Line 33:
  
 FIXED - [[wiki:​user:​julaakko]] FIXED - [[wiki:​user:​julaakko]]
 +
 +===== Slight problems with Bluetooth ====
 +
 +==== Problem description ==== 
 +
 +Briefly: after PeerHood daemon (alone, no services or applications using the daemon) has been running for ~7 hours or more it either crashes (segfault or in latest tests assertion error in ''​CBTConnection''​ line 40) or starts reporting -1 responses from surrounding bluetooth devices and also errors reported by ''​BTPlugin::​Inquirythread''​ : <​code>​Too many open files</​code>​ and
 +<​code>​Device or resource busy</​code>​
 +First could be result from ''​hci_inquiry''​ -function functionality,​ second could be from thread safety issue in BlueZ bluetooth library. For further information,​ see: [[peerhood:​peerhood_bluetooth_feature_and_testing|a possible feature found in Bluetooth library/​hardware functionality - incl. testing]].
 +
 +==== Problem solution ====
 +
 +Copied the inquiry-function from hci.h and modified it not to open new socket on every inquiry. Currently PeerHood uses a raw socket to bluetooth device to control it via ioctl commands, currently only inquiry and adapter reset are using this. New socket is created when the bluetooth plugin is loaded. This reduces the errors mentioned in the problem description,​ there still exists some faulty socket/​handle usages which at some point can cause "Too many open files" error. ​
 +