* [Bluez-users] Serial connection between two Linux machines
@ 2004-07-21 15:36 Thomas Luby
2004-07-21 16:16 ` Marcel Holtmann
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Luby @ 2004-07-21 15:36 UTC (permalink / raw)
To: bluez-users
[-- Attachment #1: Type: text/html, Size: 1907 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bluez-users] Serial connection between two Linux machines
2004-07-21 15:36 [Bluez-users] Serial connection between two Linux machines Thomas Luby
@ 2004-07-21 16:16 ` Marcel Holtmann
0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2004-07-21 16:16 UTC (permalink / raw)
To: Thomas Luby; +Cc: BlueZ Mailing List
Hi Thomas,
> I have two Linux machines. I wish to connect to one from the other
> using a terminal over Bluetooth
>
> The problem I have is annoying because it basically works. Anyway,
> here is the problem
>
> Master (USB bluetooth):
>
> modprobe hci_usb
> hciconfig hci0 up
> hciconfig
>
> mknod -m 666 /dev/rfcomm0 c 216 0
> rfcomm bind 0 00:60:57:18:FB:6E 1
>
> Slave (UART bluetooth):
>
> hciattach /dev/ttyS0 -s 115200 csr
> hciconfig hci0 up
> hcid
> dund --persist --listen
> sdpd
> sdptool add SP --channel=1
>
>
> I open a terminal on the master. A connection is present.
>
> I type echo "Hello" > /dev/bluetooth/rfcomm/0
>
> and on the master terminal I see "Hello"
>
> And this is where the problem comes. If I repeat the echo, I get:
> cannot create /dev/rfcomm0: No such device
>
> because the connection was closed
>
> I have sent huge files down the link with no problem...but when it
> reaches the end of the file, the connection closes everytime!
>
> If anyone knows what Im doing wrong I would appreciate it! I have
> searched for 2 days now and not managed to find the solution
use "rfconn connect ..." instead of "rfcomm bind ..." or keep the link
opened with "cat /dev/rfcomm0".
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Bluez-users] Serial connection between two Linux machines
@ 2004-07-21 16:36 Thomas.Luby
2004-07-21 16:50 ` Marcel Holtmann
0 siblings, 1 reply; 5+ messages in thread
From: Thomas.Luby @ 2004-07-21 16:36 UTC (permalink / raw)
To: marcel; +Cc: bluez-users
Hi Marcel
I have tried "rfconn connect" instead but get the same results.=20
If I keep the connection open it works (using cat as you suggested) =
however this doesnt work if I make a getty port on the slave side
I think the problem is on the slave side because if I connect the slave =
to Windows then I get the same issue. The Windows terminal disconnects =
after 1 "echo" or one file cat
Is there a command I can use on the slave side that keeps the port open =
once connected (this is what I tried with dund --persist)
Are the commands OK on the slave side?
Thanks!
Tom=20
-----Original Message-----
From: ext Marcel Holtmann [mailto:marcel@holtmann.org]
Sent: 21 July, 2004 19:16
To: Luby Thomas (Nokia-NRC/Helsinki)
Cc: BlueZ Mailing List
Subject: Re: [Bluez-users] Serial connection between two Linux machines
Hi Thomas,
> I have two Linux machines. I wish to connect to one from the other
> using a terminal over Bluetooth
>=20
> The problem I have is annoying because it basically works. Anyway,
> here is the problem
>=20
> Master (USB bluetooth):
>=20
> modprobe hci_usb
> hciconfig hci0 up
> hciconfig
>=20
> mknod -m 666 /dev/rfcomm0 c 216 0
> rfcomm bind 0 00:60:57:18:FB:6E 1
>=20
> Slave (UART bluetooth):
>=20
> hciattach /dev/ttyS0 -s 115200 csr
> hciconfig hci0 up
> hcid
> dund --persist --listen
> sdpd
> sdptool add SP --channel=3D1
>=20
>=20
> I open a terminal on the master. A connection is present.
>=20
> I type echo "Hello" > /dev/bluetooth/rfcomm/0
>=20
> and on the master terminal I see "Hello"
>=20
> And this is where the problem comes. If I repeat the echo, I get:
> cannot create /dev/rfcomm0: No such device
>=20
> because the connection was closed
>=20
> I have sent huge files down the link with no problem...but when it
> reaches the end of the file, the connection closes everytime!
>=20
> If anyone knows what Im doing wrong I would appreciate it! I have
> searched for 2 days now and not managed to find the solution
use "rfconn connect ..." instead of "rfcomm bind ..." or keep the link
opened with "cat /dev/rfcomm0".
Regards
Marcel
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Bluez-users] Serial connection between two Linux machines
2004-07-21 16:36 Thomas.Luby
@ 2004-07-21 16:50 ` Marcel Holtmann
0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2004-07-21 16:50 UTC (permalink / raw)
To: Thomas.Luby; +Cc: BlueZ Mailing List
Hi Thomas,
> I have tried "rfconn connect" instead but get the same results.
>
> If I keep the connection open it works (using cat as you suggested) however this doesnt work if I make a getty port on the slave side
>
> I think the problem is on the slave side because if I connect the slave to Windows then I get the same issue. The Windows terminal disconnects after 1 "echo" or one file cat
>
> Is there a command I can use on the slave side that keeps the port open once connected (this is what I tried with dund --persist)
>
> Are the commands OK on the slave side?
there is no easy command to bind a listen RFCOMM channel to a TTY. You
must write your own program that does this the same way as dund does it.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Bluez-users] Serial connection between two Linux machines
[not found] <37AD475D23C5D0469726DD437E59714151177E@esebe022.ntc.nokia.com>
@ 2004-07-22 6:54 ` Marcel Holtmann
0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2004-07-22 6:54 UTC (permalink / raw)
To: Thomas.Luby; +Cc: BlueZ Mailing List
Hi Thomas,
> Sorry to trouble you again.
>
> Quite simply, the connection remains open until I send something over the serial port. Then it closes
>
> There must be some character that causes this like eof
>
> Is this normal? Has you experienced this behaviour before?
this can be possible, but I've never seen it so far. Setting the RFCOMM
TTY into raw mode before using it is maybe a good idea. Otherwise you
should check with strace and hcidump what is really going on.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-07-22 6:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-21 15:36 [Bluez-users] Serial connection between two Linux machines Thomas Luby
2004-07-21 16:16 ` Marcel Holtmann
-- strict thread matches above, loose matches on Subject: below --
2004-07-21 16:36 Thomas.Luby
2004-07-21 16:50 ` Marcel Holtmann
[not found] <37AD475D23C5D0469726DD437E59714151177E@esebe022.ntc.nokia.com>
2004-07-22 6:54 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox