2009-04-04 20:36:25

by Gene Heskett

[permalink] [raw]
Subject: The link I had working quit. Help

Greetings all;

I had minicom working fine till I reset the passkey on both devices, and now
minicom says there is no /dev/rfcomm0 when there really is.

The init script I use here now reads:
----------------------------------
#!/bin/bash
echo attempting to get bt link to the coco3
hcitool -i hci0 11:11:11:11:11:11 key 4391
rfcomm release hci0
rfcomm -i 11:11:11:11:11:11 bind hci0 00:0c:84:00:86:F8
echo this should show the cocos address
rfcomm -i 11:11:11:11:11:11 show hci0
------------------------------------
and returns:
[root@coyote sysconfig]# connect2coco3

attempting to get bt link to the coco3
this should show the cocos address
rfcomm0: 11:11:11:11:11:11 -> 00:0C:84:00:86:F8 channel 1 clean

But minicom now says /dev/rfcomm0 doesn't exist, or after a couple of minutes:
-------------------------------
[root@coyote system.d]# minicom
minicom: cannot open /dev/rfcomm0: Host is down
-----------------------------

but it does exist:
[root@coyote sysconfig]# ls -l /dev/rfc*
crw------- 1 root root 216, 0 2009-04-04 16:20 /dev/rfcomm0

I am assuming that 'key' here is equal to 'passkey' on the other device.
Is that assumption wrong?

I'm also assuming that a short powerdown for the eb101 device at the other end
will restore it to link mode after I quit the comm proggy on that machine,
which probably puts the eb101 into the command mode with a +++ pause ATH. I
can train that program not to do that I think.

So, which end do I beat on here?, I'm getting lost in the forest, too many
trees.

Thank you all.

--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Please state the nature of the technical emergency



2009-04-05 21:59:31

by Gene Heskett

[permalink] [raw]
Subject: Re: The link I had working quit. Help

On Sunday 05 April 2009, Gene Heskett wrote:
[...]
Been playing with a script, step by step. It gets to the line
hciconfig -a hci0 putkey 0000 (which is the default key at the other end of
this link I'm trying to reliably establish)

The script:
----------------------------------
#!/bin/bash
echo attempting to get bt link to the coco3
echo "rfcomm release hci0"
rfcomm release hci0
sleep 5
echo "hciconfig hci0 down"
hciconfig -a hci0 down
sleep 5
echo "hciconfig -a hci0 up"
hciconfig -a hci0 up
sleep 5
hciconfig -a
sleep 5
echo "hciconfig -a hci0 noauth noencrypt nosecmgr"
hciconfig -a hci0 noauth noencrypt nosecmgr
sleep 5
echo "hciconfig -a hci0 putkey 0000"
hciconfig -a hci0 putkey 0000
--------which returns:
Can't find link key for 0000 on hci0
^C

And as you can see I killed it there. What am I doing wrong?
-------------script continues----------------
sleep 5
echo "rfcomm -i 11:11:11:11:11:11 bind hci0 00:0c:84:00:86:F8"
rfcomm -i 11:11:11:11:11:11 bind hci0 00:0c:84:00:86:F8
sleep 5
echo "rfcomm -i 11:11:11:11:11:11 connect hci0 00:0c:84:00:86:F8"
rfcomm -i 11:11:11:11:11:11 connect hci0 00:0c:84:00:86:F8
sleep 5
echo this should show the cocos address
rfcomm -i 11:11:11:11:11:11 show hci0
-------------------------------
And it did yesterday morning before I broke it somehow trying to make a script
that Just Worked(TM) :(

Where are the bluetooth guru's? Or, where can I find the RFC documents that
describe how all this is supposed to work?

What I want to do, and was doing, is to run a system shell on the bt device
on the other end, and minicom or picocom to /dev/rfcomm0 as a remote terminal
on that system.

Thanks everybody.

--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Learning French is trivial: the word for horse is cheval, and everything else
follows in the same way.
-- Alan J. Perlis


2009-04-05 20:59:47

by Gene Heskett

[permalink] [raw]
Subject: Re: The link I had working quit. Help

On Saturday 04 April 2009, Gene Heskett wrote:
>Greetings all;
>
>I had minicom working fine till I reset the passkey on both devices, and now
>minicom says there is no /dev/rfcomm0 when there really is.
>
>The init script I use here now reads:
>----------------------------------
>#!/bin/bash
>echo attempting to get bt link to the coco3
>hcitool -i hci0 11:11:11:11:11:11 key 4391
>rfcomm release hci0
>rfcomm -i 11:11:11:11:11:11 bind hci0 00:0c:84:00:86:F8
>echo this should show the cocos address
>rfcomm -i 11:11:11:11:11:11 show hci0
>------------------------------------
>and returns:
>[root@coyote sysconfig]# connect2coco3
>
>attempting to get bt link to the coco3
>this should show the cocos address
>rfcomm0: 11:11:11:11:11:11 -> 00:0C:84:00:86:F8 channel 1 clean
>
>But minicom now says /dev/rfcomm0 doesn't exist, or after a couple of
> minutes: -------------------------------
>[root@coyote system.d]# minicom
>minicom: cannot open /dev/rfcomm0: Host is down
>-----------------------------
>
>but it does exist:
>[root@coyote sysconfig]# ls -l /dev/rfc*
>crw------- 1 root root 216, 0 2009-04-04 16:20 /dev/rfcomm0
>
>I am assuming that 'key' here is equal to 'passkey' on the other device.
>Is that assumption wrong?
>
>I'm also assuming that a short powerdown for the eb101 device at the other
> end will restore it to link mode after I quit the comm proggy on that
> machine, which probably puts the eb101 into the command mode with a +++
> pause ATH. I can train that program not to do that I think.

I also set it to the other option of dropping the dtr, either way seems to
leave the device dead.

>So, which end do I beat on here?, I'm getting lost in the forest, too many
>trees.
>
>Thank you all.

Ping! :) I'm still dead in the water here.

--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Etiquette is for those with no breeding; fashion for those with no taste.