2004-08-30 11:44:25

by Johannes Lintner

[permalink] [raw]
Subject: Re: [Bluez-users] Problems with InputStream and OutputStream

Hi Marcel,

ok, no problem.
The way, to start a server on the Handy I already tried, but I didn't had in
mind, that this has to be so, but to have a completely new connenction
between the devices (or has it to be so?).
The complete protocol is attached to the mail. The accosted lines exists
(see attachment - would it be better to see the java-sources?).

On the pc runs a server, that is listening to a connection. A mobile phone
searches for the device and the service, tries to connect an sends a 7byte
long string ("String!"). This way works without any problems. Immediately
after receiving, the server sends an 6byte long string("Handy!") to the
phone, using the same connection. But the phone only receives an empty
string.


Greetings Johannes

--
Superg?nstige DSL-Tarife + WLAN-Router f?r 0,- EUR*
Jetzt zu GMX wechseln und sparen http://www.gmx.net/de/go/dsl


Attachments:
conProtocol.bz2 (2.66 kB)

2004-08-31 11:05:40

by Johannes

[permalink] [raw]
Subject: Re: [Bluez-users] Problems with InputStream and OutputStream

Marcel Holtmann wrote:

>Hi Johannes,
>
>
>
>>the BTMidServ runs on the Linux side as the server.
>>
>>
>
>I thought you use some C code for the server. I am not a Java expert and
>actually I don't have fun reading Java source code.
>
>
>
>> gotland:~# hcitool info 00:02:72:80:B1:6F
>> Device is not available or not connected.
>>
>>
>
>You must fill in the BD_ADDR of your phone.
>
>Regards
>
>Marcel
>

Hi,

for 1500ms, the string arrives correct the phone, but the sign for a
received emptystring (an 'y' with 2 dots on it, I will write it 'y:') is
added to the end.
The String I receive is: 'Handy!y:'
Do you have any ideas?

Greets John

2004-08-31 10:55:02

by Johannes

[permalink] [raw]
Subject: Re: [Bluez-users] Problems with InputStream and OutputStream

HI,


Marcel Holtmann wrote:

>Hi Johannes,
>
>
>
>>the BTMidServ runs on the Linux side as the server.
>>
>>
>
>I thought you use some C code for the server. I am not a Java expert and
>actually I don't have fun reading Java source code.
>
>
>
>> gotland:~# hcitool info 00:02:72:80:B1:6F
>> Device is not available or not connected.
>>
>>
>
>You must fill in the BD_ADDR of your phone.
>
>
thx, sure, the manual says remote device. my fault:
gotland:~# hcitool info 00:01:E3:29:38:D8
Requesting information ...
BD Address: 00:01:E3:29:38:D8
Device Name: Siemens SX1
LMP Version: 1.1 (0x1) LMP Subversion: 0x55b
Manufacturer: Infineon Technologies AG (9)
Features: 0xef 0xfa 0x19 0x00 0x00 0x00 0x00 0x00
<3-slot packets> <5-slot packets> <encryption> <slot offset>
<role switch> <hold mode> <sniff mode> <RSSI> <SCO link>
<HV2 packets> <HV3 packets> <u-law log> <A-law log> <CVSD>
<transparent SCO>


>Regards
>
>Marcel
>

I have got an success. I let sleep() the connection for 2.5seconds, and
I got nearly the complete string, only the last character was empty. I
will try to hold the connection a little longer open. Then I will tell you.

THX John!

2004-08-31 10:23:50

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Problems with InputStream and OutputStream

Hi Johannes,

> the BTMidServ runs on the Linux side as the server.

I thought you use some C code for the server. I am not a Java expert and
actually I don't have fun reading Java source code.

> gotland:~# hcitool info 00:02:72:80:B1:6F
> Device is not available or not connected.

You must fill in the BD_ADDR of your phone.

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=5047&alloc_id=10808&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-31 07:42:48

by Johannes

[permalink] [raw]
Subject: Re: [Bluez-users] Problems with InputStream and OutputStream

Hi,

the BTMidServ runs on the Linux side as the server.

hcitool info throws an error, although my server is running.
gotland:~# hcitool info 00027280B16F
Requesting information ...
Can't create connection: Input/output error

or

gotland:~# hcitool info 00:02:72:80:B1:6F
Device is not available or not connected.

the hci-interface is running
gotland:~# hciconfig hci0
hci0: Type: USB
BD Address: 00:02:72:80:B1:6F ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:126 acl:0 sco:0 events:16 errors:0
TX bytes:316 acl:0 sco:0 commands:14 errors:0


bye John



Marcel Holtmann wrote:

>Hi Johannes,
>
>
>
>>the relevant parts of the sources are attached (the important parts are
>>the BTMidServ.java and the method doConnect() in BTServiceSearchUI.java).
>>I hope the comments and Info-Messages will be enough declarations.
>>
>>I use Debian Linux with a 2.6.7 Kernel and KDE version 3.2.3.
>>The phone is a Siemens SX1 with firmwareversion 10. It uses a Symbian OS
>>Serie 60.
>>The USB-dongle is from Acer and should be supported from BlueZ.
>>
>>
>
>and what do you use on the Linux side? Please run a "hcitool info ..."
>as root for me.
>
>Regards
>
>Marcel
>
>
>

2004-08-30 12:40:14

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Problems with InputStream and OutputStream

Hi Johannes,

> the relevant parts of the sources are attached (the important parts are
> the BTMidServ.java and the method doConnect() in BTServiceSearchUI.java).
> I hope the comments and Info-Messages will be enough declarations.
>
> I use Debian Linux with a 2.6.7 Kernel and KDE version 3.2.3.
> The phone is a Siemens SX1 with firmwareversion 10. It uses a Symbian OS
> Serie 60.
> The USB-dongle is from Acer and should be supported from BlueZ.

and what do you use on the Linux side? Please run a "hcitool info ..."
as root for me.

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=5047&alloc_id=10808&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-30 12:34:03

by Johannes Lintner

[permalink] [raw]
Subject: Re: [Bluez-users] Problems with InputStream and OutputStream

Hi,

the relevant parts of the sources are attached (the important parts are
the BTMidServ.java and the method doConnect() in BTServiceSearchUI.java).
I hope the comments and Info-Messages will be enough declarations.

I use Debian Linux with a 2.6.7 Kernel and KDE version 3.2.3.
The phone is a Siemens SX1 with firmwareversion 10. It uses a Symbian OS
Serie 60.
The USB-dongle is from Acer and should be supported from BlueZ.

Greeting Johannes

Marcel Holtmann wrote:

>Hi Johannes,
>
>
>
>>The way, to start a server on the Handy I already tried, but I didn't had in
>>mind, that this has to be so, but to have a completely new connenction
>>between the devices (or has it to be so?).
>>
>>
>
>forget about that. I was confused and thought that you wanna connect
>from the PC to your phone,
>
>
>
>>The complete protocol is attached to the mail. The accosted lines exists
>>(see attachment - would it be better to see the java-sources?).
>>
>>
>
>If you put it into a tar then name it this way ;)
>
>
>
>>On the pc runs a server, that is listening to a connection. A mobile phone
>>searches for the device and the service, tries to connect an sends a 7byte
>>long string ("String!"). This way works without any problems. Immediately
>>after receiving, the server sends an 6byte long string("Handy!") to the
>>phone, using the same connection. But the phone only receives an empty
>>string.
>>
>>
>
>The string "Handy!" goes over the connection and right after that the
>Linux side closes the connection. Maybe that is the problem or it is the
>credit based flow control on the phone. I don't see any CFC problem, but
>I also didn't wrote the Bluetooth stack on the phone. I think it is a
>good idea to add a sleep(1) before you close the connection.
>
>Some other information might be handy. What kernel do you use and what
>do you use as server on the Linux side? What kind of phone is this?
>
>Regards
>
>Marcel
>
>
>
>
>


Attachments:
src.tar (20.00 kB)

2004-08-30 11:59:55

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Problems with InputStream and OutputStream

Hi Johannes,

> The way, to start a server on the Handy I already tried, but I didn't had in
> mind, that this has to be so, but to have a completely new connenction
> between the devices (or has it to be so?).

forget about that. I was confused and thought that you wanna connect
from the PC to your phone,

> The complete protocol is attached to the mail. The accosted lines exists
> (see attachment - would it be better to see the java-sources?).

If you put it into a tar then name it this way ;)

> On the pc runs a server, that is listening to a connection. A mobile phone
> searches for the device and the service, tries to connect an sends a 7byte
> long string ("String!"). This way works without any problems. Immediately
> after receiving, the server sends an 6byte long string("Handy!") to the
> phone, using the same connection. But the phone only receives an empty
> string.

The string "Handy!" goes over the connection and right after that the
Linux side closes the connection. Maybe that is the problem or it is the
credit based flow control on the phone. I don't see any CFC problem, but
I also didn't wrote the Bluetooth stack on the phone. I think it is a
good idea to add a sleep(1) before you close the connection.

Some other information might be handy. What kernel do you use and what
do you use as server on the Linux side? What kind of phone is this?

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=5047&alloc_id=10808&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users