Saturday, August 28, 2010

L2CAP next steps

Summer is still here, productivity in code is one of the lowest ones since I remember. Summer is to blame, hardly remember which update i need to give now.

Related my development I did a small incrusion in Caya development, implementing some features I needed to feel comfortable regarding the chat windows behaviour. BTW last release with MSN support!

But focusing on bluetooth L2CAP and its sockets interface has been a bit improved. As we said in the previous post, Haiku could initiate a pairing process and establish a communication link.

The next step was to allow Haiku act as a client to request opening a channel in the given communication link to finally interchange real user information from node to node.

There has been implemented a test application in src/test/kits/bluetooth/l2capClient. I was able to request pairing with a device (a Motorola V5), open a communication channel and send dummy data to him. the phone obviously did not understand information, and closed the communication.

Still unmature and some configuration parameters are unsupported, but if both nodes are Haiku, they could send information that each other understand. Therefore with that implemented some small applications could be implemented to have 2 haiku nodes interchanging normal user data wireless through bluetooth. This opens possibilities to implement small custom and non standard applications to:
  • Chat between 2 nodes.
  • Send flattened BMessages
  • File exchanges
between 2 Haiku nodes.

Wednesday, July 14, 2010

Por fin!

Sunday, June 27, 2010

Haiku initiating encrypted pairing

A bit of status update,

During the last months I have been working stabilizing the HCI layer, and the user interaction to pair. Up to now I was using the remote device to be the master of the communication therefore using that incoming information to guide the implementation.

Haiku could before search for remote devices, but could not decide by itself to communicate with them. Then a "Pair" button has been implemented in preferences. Implementing encrypted and non encrypted pairing with them. Additionally there is a new checkbox in preferences(with an unfortunate location at the moment) to indicate that Haiku requires, that link to be placed between devices, to be encrypted:



This is maybe the most complex messages interchange in HCI layer together with scanning devices. There was then work rewriting and refactoring code in the server to be able to see clearly how sequences flowed.

Here we can see how Haiku forces my phone to match a pincode, hardly readeable as usual, but it says in Spanish "haiku-bluetooth, Add to My Devices?"





Next step is make the same at L2cap layer. Haiku more or less handles l2cap channels as slave, so now it is turn to act as master too...

Saturday, May 29, 2010

Some Internal features

There was a bug I carried since long ago, It was hard to detect and its reproduction was depending very much on how well the Slab allocator worked for net_buffers. The debugging shown like trying to send a buffer that was already sent... all fake as it was a reused one.

There were important internal features to be implemented as to have a dedicated thread to handle all incomming RX data, before it was done almost all in interrupt context, therefore the USB or transport bus usage is more responsible now.

Wednesday, March 31, 2010

Bluetooth Tasks for a GSoC project ...

Haiku Bluetooth Stack implements basic functionality on lower and middle layers, this functionality needs to be completed and all Bluetooth 2.X possibilities explored.


Requirement: Bluetooth enabled Haiku system

Skill set: C++ kernel development, userland development, overview bluetooth stack knowledge(optional)

  • New Tasks: 
    • RemoteDevices Database
    • Manage server existence depending of LocalDevices
  • Fixes:
    • Fix monitoring of incoming LocalDevices(USB)
    • Use LayoutManager for debug console + codestyle it
    • LocalDevices allocation/leaking LocalDevice::GetLocalDevice
  • Improvements
    • UI
      • Improve Deskbar Addon
      • Improve PinCode Window
      • Add Remaining Features in DeviceView
        • Put non relevant information under a ToolTip
    • Functionality
      • UserLand tools(Preferences)
        • Retrieve Discovery and DevClass (other settings?) in Startup
        • Store information
          • Window position
          • Default LocalDevice
          • Settings (Inquiry time, Policy)
      • Pairing/Auth/Encryption use cases ...

Saturday, December 26, 2009

Windows 7 overwrites Haiku partitions!

As my Christmas holiday were really long, I decided to use the occasion to reorganize all my hardware, with the new pieces I got during the last months. I started by putting all together moving RAM here and there, HD's and so on.

Once the candidate final machine was set, it was the time to start installing operating systems.

The first idea was to replace my Haiku development machine with this new one, but this, was to have had 60GB(20+40) so, it was enough space to have all of them: Haiku, Linux, and if all was ok, try a Windows 7. I would not expect that guys from Redmond were going to punish me so much for setting Windows the last in the queue.

So I started with Linux, to get the grub ready, and create within Linux all the partition. Then I went with 2 installations of Haiku: First one, the Alpha release and the second one with a fresh build.

All fine, all so nice with my new desktop, resynced all SVNs did some commits.

Then there was the 40GB HD reserved ONLY for the gigantic OS (even the HD was set as first HD in the IDE bus). After installation I was still happy as Win7 was more or less running smoothly in a moderate machine (Athlon Thunderbird 1,2GHz 768RAM).

All problems came or better said, they showed up trying to set Grub to boot Windows7.

Although I was sure I was pointing to the same partition I keep getting a message "BOOTMGR Missing".

Browsing and browsing I arrived to a really concerning post in the Ubuntu forums:

Quoting Belboz99:

"Just now I realized that Win7 creates at least 2 partitions when you install it, even though you may have only one selected and formatted for it's use."

Ok I thought, no way, I already checked the table and there is no new partition on that disk(40GB windows dedicated one with spare unpartitioned space), Also is impossible to fit another partition on the other disk as it is full with Linux and Haiku.

Checking 2 posts below I can quote from ramzai:

"And what is even worse, Win7 may put its bootloader to other existing FAT or NTFS partitions, even on the other hd, as it was in my case. I installed Win7 to (hd1,2) and then found bootmgr file on the (hd0,2) partition with music and video files."

Oh oh... then I started reviewing carefully all partitions... and there you are, a BFS one, suddenly became a NTFS...

WIN7 installation just went over my disk, even having free unpartitioned space on the same disk it was getting installed it went to the other disk, Found a partition of an unrelevant type (BFS, the first Haiku one), set it to NTFS, FORMATTED IT, and wrote there a bootloader. Win7 just overwrote my Haiku development partition, for just placing its bootloader!!

yeah Microsoft, while fixing all the mess and reinstalling, no opensource was written, you achieved it. I am just really thankful that you did not choose to crash my critical haiku data partition, or the sources one.

Friday, July 10, 2009

Bluetooth Status

There have not been any huge steps forward in the current status of the bluetooth stack, but many small ones which give a bit more visual, and development comfortability:

Little icons for devices list: Jörg Meyer, drew an identifiable icon according to the device class instead of the former empty black square.

Debug information: The bluetooth console opened by the server has improved its debug information, being more clean and formatted.

Close and start server, maybe one of the oldest and most annoying bugs the stack had. The USB pipes of the h2generic driver were not correctly cleaned, therefore at closing the device driver(Quitting the server) compiling the server or the kit and trying to start again the server, to test the changes, the stack was blocked due the usb pipes. The only way to test again was to restart the whole system. Consequences, now you can start the server and quit the server, plug and unplug your dongles. In a user side these are not common operations, but the development is going to be a bit more comfortable.

SetDeviceClass: This is a new method added to the bluetooth kit although it is not in the JSR-82 standard. Once the device class is set, and any remote discovers the Haiku node, it will concretely know if this is a phone, a printer, a GPS, or as we will set by default, a computer. This was an option in preferences, but until now it had no effect.

Here we can see how 2 dongles(BCM2035 and CSR bc-4) in the Haiku node have been discovered by Windows7 as different Device class(handheld, and Laptop).




Deskbar applet: Finally! Michael Weirauch took a day and sent me this patch which adds a deskbar addon, where we will place the most common actions. Currently the ones placed just help the development.