linux - Cannot open /dev/rfcomm1 : Host is down

07
2014-07
  • srj0408

    I am working on raspberry PI and on Bluetooth. I am using old raspberry pi kernel as the new one has got some bugs that were not resolved with respect to the bluez daemon. At present my kernel version is 3.6.11.

    I am using a USB bluetooth dongle and my sole purpose is to auto connect the bluetooth dongle when ever it is in range. For that i think i have to run a script in the backend on RPI that will keep on checking the existence of usb bluetooth dongle. I started from the very scratch. I installed bluez daemon using

    apt-get install bluetooth bluez utils blueman
    

    and then i used

    hciconfig
    

    which gives me that my bluetooth usb dongle is working fine. But when i did

    hcitool scan
    

    , it give me no device in range even though my Serial bluetooth Device was on. I wasn't able to find any device in vicinity. Also when i unplugged and plug the USB dongle again, i was able to scan the serial device , but when i repeat the process, i find the earlier condition of not finding any deice. I had find another useful link, but that need address of the bluetooth device that need to be connected. I want to automate this using hcitool scan, storing the output to the a file and then comparing it with already paired devices and their name. For that i need to figure out why hcitool scan is sometime working and sometime not. ?

    Can some one help me in figuring out why this is happening. Is there any problem on hardware side i.e Bluetooth dongle is buggy or i had some problem in bluez utils.

    Edit 1: While as of now, hcitool scan is giving me my remote device address but still i am getting the same issue of HOUST IS DOWN, '/dev/rfcomm1'. I am really not getting any idea of what to be done.

  • Answers
  • srj0408

    I don't know what i did or what happened randomly, i am able to get the hcitool scan results after i used sudo apt-get install python-bluez. Also i find that hardware was a probable faulty thing i was having. When i switched the USB-BLuetooth dongle , things work fine.


  • Related Question

    linux - How to share a folder as an USB mass storage device (from a raspberry pi)
  • Cerber

    I'd like to do something quite simple ... in my mind.

    I've got an "old" photo frame with an usb port and SD card slot (but without networking) that I would like to keep in sync with my NAS "Photo folder"

    Since I'm looking forward to buy a PI, I'd like to know how I could achieve this ... in a cheap way ($ and computing power).

    My main guess would be to connect both on USB.

    Looking at other answers I found Serve up PC hard drive as USB mass storage and What is a USB WiFi dongle device that can emulate virtual mass storage device for home video player? and on the PI board itself Emulate USB mass storage device

    So from what I found so far I have two options : an Host-to-Host USB cable or a Wifi-to-USB adapter (Both as expensive as the PI itself)

    The problem is that both device are Windows only and neither seem to allow to select a specific folder to share.

    Getting back to my goal, does any of you have an idea on how to to connect both on USB ?

    Bonus question : is there a way to do this multiple times on the same "server" to connect different folders to differents clients (other frames/radios/...) ?

    Thanks for the time spent reading my (long) question !


  • Related Answers
  • haimg

    Basically USB protocol requires one device to act as a Master, and others as Slaves. Master-master connections are not supported. Master devices typically have A-type connectors: computers, photo frames that support external USB media, etc. Slaves are your typical USB sticks, mice, etc. Master supplies power to slave over USB bus.

    To cloud the water, USB OTG specification allows devices that support it to behave both as a master and as a slave (some Android phones, etc.).

    Your photo frame is a master device, you need your Raspberry Pi acting as a slave. As far as I know, it is rather tricky, if possible at all: As a computer, Raspberry Pi supports USB master mode, but apparently USB slave mode also should be possible on some devices. Quoting the forum you mentioned in your question:

    The model B has a built in 2 port USB hub, which does not know how to act as a USB device. The model A directly connects the processor USB interface, which can be configured either as a USB device or USB host.

    Obviously, that won't work until people have Model A's to develop on, and someone has the talent, the time, the inclination, and the documentation, to write the device driver.

    Bit-banging a slow speed USB device over GPIO should be possible on the model B.

    This all will require some very significant hacking, many hours of programming/debugging time. In my opinion, waste of time.

    My suggestion: Throw out your photo frame, get some second-hand/cheap small LCD display, connect it to your Raspberry Pi and use it as a photo frame. Much easier, faster, etc.