nccgroup / nOBEX

nOBEX allows emulating the PBAP, MAP, and HFP profiles to test vehicle infotainment systems and similar devices using these profiles
https://www.nccgroup.trust/uk/about-us/newsroom-and-events/blogs/2016/september/introducing-nobex-a-tool-for-testing-bluetooth-phone-and-messaging-profiles/
GNU General Public License v3.0
74 stars 16 forks source link

IRDA/Serial support? #9

Open TAbdiukov opened 4 years ago

TAbdiukov commented 4 years ago

As ridiculous as it is, is it possible to get the tool to work with Irda or serial?

sultanqasim commented 4 years ago

It would need some modification, as a lot of the code is expecting RFCOMM connections over Bluetooth Classic rather than a raw serial port.

On the server side (https://github.com/nccgroup/nOBEX/blob/master/nOBEX/server.py), the Bluetooth-specific implementations of start_service(), stop_service(), and serve() would need to be modified.

On the client side, you'd need to use set_socket to specify a "socket-like" object representing the serial port. You could make a wrapper for PySerial that implements the necessary socket methods.

There might be some other little Bluetooth-specific bits that have crept in in places too. Certainly Bluetooth-specific profiles are Bluetooth-specific.