Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to connect to a Totalstation that doesn't offer bluetooth drivers. As I am doing this for purely diagnostic reasons, I'd like to see the raw output from the established serial connection.

What do I have to do to pipe all output from a bluetooth connection to a terminal?

share|improve this question
    
Are you doing Bluetooth->Serial, Serial->Bluetooth, or two-way? –  hexafraction Jan 29 '13 at 0:14
    
Totalstation Bluetooth<->Ubuntu Bluetooth. Given that the totalstation has the standard serial configuration over USB, I suspect it is establishing a serial connection over Bluetooth. Of course, I could be completely wrong, at which point the answer that I'm wrong and the bluetooth uses XYZ is completely permissible. –  Brian Ballsun-Stanton Jan 29 '13 at 0:18
    
In terms of the two-way proof, I have managed to establish a blank serial connection via "screen" that causes an error beep on the device when I hit a key on the keyboard. So I suspect that I'm half-way there, I just don't know which half. –  Brian Ballsun-Stanton Jan 29 '13 at 0:19
    
Can you draw up a quick diagram? I can't understand whether it's serial over or bluetooth over serial, as well as who's passing on the data to where. Just do it in GIMP or something and upload it here –  hexafraction Jan 29 '13 at 0:20
add comment

1 Answer

1) Use hcitool scan to find the Mac address of the device.

The device should be set to slave mode with a known pin. If you don't use a known pin, ubuntu makes one up and you generally won't have time to enter it in the clunky menus of your measuring tool.

2) I'm not entirely sure this is necessary, but in the bluetooth gui menu, pair the device.

3) in /etc/bluetooth/rfcomm.conf

rfcomm0 {
        bind no;
        device 00:07:80:44:4F:37;
        channel 1;
        comment "Serial Port";
        }

The "bind no" is important, otherwise it will try to autmatically bind, which presents all sorts of problems for actually accessing the device (as it's quite picky about when its associated)

4) sudo rfcomm connect 0

If you have errors, restart the bluetooth service.

5) screen /dev/rfcomm0

For actual serial commands transmitted this way, contact your vendor and beg.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.