Can i see my Bluetooth connection as network interface in Linux?

7,812

Yes, you can run Ethernet over Bluetooth (BNEP) using a PAN.

  • For BlueZ 4, see the HOWTO-PAN documentation; basically, run pand on both devices and you'll get a bnep0 interface on both. (If I remember correctly, one computer has to be in NAP or GN (controller) mode, all others in PANU (client) mode connecting to the controller device.)

    server:
      # pand --listen --role NAP --sdp
    
    client:
      # pand --connect 01:ab:23:cd:45:ef
    

    (The HOWTO is slightly outdated – you don't have to compile anything custom anymore; it's a native part of the kernel and BlueZ now.)

  • For BlueZ 5, this is done using D-Bus calls to bluetoothd, e.g. using Blueman or bt-pan:

    server:
      # ip link add br0 type bridge
      # ip link set br0 up
      $ bt-pan server br0
    
    client:
      $ bt-pan client 01:ab:23:cd:45:ef --wait
    

    See also http://blog.fraggod.net/2015/03/28/bluetooth-pan-network-setup-with-bluez-5x.html.

Note that Bluetooth also has its own file transfer mechanisms – ObexPush and ObexFTP.

Share:
7,812

Related videos on Youtube

kkara
Author by

kkara

Updated on September 18, 2022

Comments

  • kkara
    kkara over 1 year

    I have 2 laptops. I have paired them successfully with each other via Bluetooth, so I can exchange files between each other.

    Both of my laptops have Linux installed. when I run the ifconfig command to see the network interfaces, my Bluetooth interface is not shown.

    Is there any way that this Bluetooth connection between my 2 laptops, can be shown as a network interface, so I can send files there via command line (for testing purposes)?

    • user1686
      user1686 about 8 years
      Do you have BlueZ v4 or v5?