BThomas
Posts: 7
Joined: Sun Nov 27, 2005 10:23 pm

Problem with sending OBEX packets

Sat Jan 07, 2006 2:18 am

Hello!

I'm impementing OBEX FTP and I came across a problem that I couldn't solve for days.

To test my application I try to communicate with Widcomm software on a test PC and a cell phone (Sony Ericsson T630). Things go really well when I communicate with the Widcomm software, but when I send a package with length of 127 bytes or more, the phone can't process the it. When I use packets smaller than 127 bytes, everything goes fine.

The phone and the Widcomm software can work together and because the phone can receive OBEX packets with size up to 512 bytes, I'm sure the Widcomm software sends packets larger than 127 bytes to it. This makes me think that there might be a bug in the negotiation of MTU in the lower layers (L2CAP?).

Please investigate the problem and tell me if you've found anything.

Thank you,
Thomas

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Problem with sending OBEX packets

Mon Jan 09, 2006 2:59 pm

I can successfully communicate with a Sony Ericsson T610 from a PC with a Widcomm dongle, with larger packages than 127 bytes, which leads me to believe there could be an error in your implementation of the Obex package.

Some questions that are important to consider:

1) How exactly does the faulty package look like? Does no commands work properly or only some?
2) What do you mean by, "the phone can't process"? Doesn't it respond? Or does it respond something you don't expect it?

Regards,
Jonas

Franson Support

BThomas
Posts: 7
Joined: Sun Nov 27, 2005 10:23 pm

RE: Problem with sending OBEX packets

Mon Jan 09, 2006 4:36 pm

1) The problem occured with PUT request packets and GET response packets too. Probably it would occur with any packet but other packets are usually smaller than 127 bytes.

Here is a GET response, the phone couldn't process:
0xA0008201000E433A5C4254466F6C646572420019782D6F6265782F666F6C6465722D6C697374696E67004900583C666F6C6465722D6C697374696E672076657273696F6E3D22312E30223E3C666F6C646572206E616D653D226122202F3E3C666F6C646572206E616D653D226222202F3E3C2F666F6C6465722D6C697374696E673E
It contains the following folder-listing: "<folder-listing version="1.0"><folder name="a" /><folder name="b" /></folder-listing>"

If I send "<folder-listing version="1.0"><folder name="a" /></folder-listing>" only the phone can process the packet and will display the folder "a" properly.

2) The progress bar on the phone is cycling infinitely while a "Receiving" message is displayed. I can stop the process with "Cancel".

Regards,
Thomas

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Problem with sending OBEX packets

Mon Jan 09, 2006 6:00 pm

From what I can see you have forgotten the double-null termination on the name header. Could that be correct?

BThomas
Posts: 7
Joined: Sun Nov 27, 2005 10:23 pm

RE: Problem with sending OBEX packets

Mon Jan 09, 2006 7:13 pm

Yes, it's true, I've already corrected that but the problem stayed.
It is really about the length of the packet. If I send this, it's OK:
0xA0007C01001B0043003A005C004200540046006F006C0064006500720000420019782D6F6265782F666F6C6465722D6C697374696E67004900453C666F6C6465722D6C697374696E672076657273696F6E3D22312E30223E3C666F6C646572206E616D653D226122202F3E3C2F666F6C6465722D6C697374696E673E
"<folder-listing version="1.0"><folder name="a" /></folder-listing>"

But if I send this, the phone can't receive
0xA0008F01001B0043003A005C004200540046006F006C0064006500720000420019782D6F6265782F666F6C6465722D6C697374696E67004900583C666F6C6465722D6C697374696E672076657273696F6E3D22312E30223E3C666F6C646572206E616D653D226122202F3E3C666F6C646572206E616D653D226222202F3E3C2F666F6C6465722D6C697374696E673E
"<folder-listing version="1.0"><folder name="a" /><folder name="b" /></folder-listing>"

I also tested sending a file to the phone and if the file is small enough to have the packet size below 127 bytes it goes through but above it it can't.
I tested on two different computers with different Bluetooth dongle but using the same 1.4.2.11 Widcomm software and I used two T630 phones.

Now my friend tested my program with a K700 with MS and Widcomm stack too and he could reach the max packet length. He also tested a T630 with the Widcomm stack and he could send packets larger than 127 bytes. He has a MicroStar dongle and the Widcomm stack is version 1.4.3(build 4). So I think the stack may be the key.
Which, version of Widcomm stack do you use?
I'm using 1.4.2(build 11) with a Billionton dongle and I can't download a newer software for this.

Regards,
Thomas

BThomas
Posts: 7
Joined: Sun Nov 27, 2005 10:23 pm

RE: Problem with sending OBEX packets

Mon Jan 09, 2006 8:49 pm

I have finally managed to "solve" the problem.
I've managed (in a rather "unofficial" way) to install a v1.4.3.4. of the Widcomm stack and the problem doesn't occur anymore.
However BlueTools should support Widcomm drivers from version 1.4.2.10. not because it is in the system requirements of BlueTools, but because there are many dongles that are not supported anymore and therefore the new driver can't be installed for them legally.

Regards,
Thomas

User avatar
johan
GpsGate
Posts: 15224
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Problem with sending OBEX packets

Fri Jan 13, 2006 7:50 pm

We have implemented a work around for this WidComm bug now in BlueTools. It will be part of the next BlueTools update (the current is 1.00)

If you need a fix right away, contact us, and we'll send you one.

Regards,
Johan

Franson Support

Return to “BlueTools”