Christian W. Zuckschwerdt | 13 Oct 2007 21:32

Re: Siemens MC60 + USB + OpenBSD

Hi,

basicly it should work. You are referring to baud rate (which is
auto-detected in the BFB code and 19200 is the default) but also write
about USB. What is your exact setup, if you use USB the cable type is
important (I know of three different cables -- active and passive
TTY<->USB and pure USB).

The S45 support is the origin of obexftp and the bfb lib. More recent
phones don't require the intricate bfb mode anymore.

regards,
Christian

christiaan simons schrieb:
> Does anyone tried/tested the Siemens MC60 with
> openobex over USB?
> I found the openobex + openftp
> packages in the OpenBSD tree, and tried those, without
> luck.
>
> Then read something about S45 compatibility, requiring
> a recent version, so then I grabbed the following
> sources:
>
> openobex-1.3
> (minor build fixes needed in lib/usbobex.h and .c,
> probably an issue with locating
> /usr/local/include/usb.h
> and some strcpy's really need to be strncpy)
(Continue reading)

christiaan simons | 15 Oct 2007 19:13
Picon
Favicon

Re: Siemens MC60 + USB + OpenBSD


--- "Christian W. Zuckschwerdt"
<Christian <at> Zuckschwerdt.org> wrote:

> What is your exact setup, 

Using a DCA-510, a USB-to-serial cable (Prolific
PL2303),  The driver seems to detect the cable, but
that's it. All commands failed, and the TXD LED
blinked some times.

Hendrik mentioned the BFB mode. As I can remember from
the slink stuff: it used BFB. So I'll try that first
thing and see if that helps.

Tnx for the info's so far.

Bye,
Christiaan.

       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
(Continue reading)

Christian W. Zuckschwerdt | 15 Oct 2007 19:43

Re: Siemens MC60 + USB + OpenBSD

Hi Christiaan,

I ordered the whole slew of DCA cables today and will do some testing
when they arrive.

Tests with another phone uncovered problems with fast machines and/or
usb serial converters. You're best chance is to use the latest 0.22 rc
with the patch I sent yesterday.

The BFB mode is automatic you only need to select a TTY input (i.e. "-t
/dev/ttyUSB0").

btw: your mail setup is not too good. It triggers SF's spam detection
(forged "From:" header).

regards,
Christian

christiaan simons schrieb:
> Using a DCA-510, a USB-to-serial cable (Prolific
> PL2303),  The driver seems to detect the cable, but
> that's it. All commands failed, and the TXD LED
> blinked some times.
> Hendrik mentioned the BFB mode. As I can remember from
> the slink stuff: it used BFB. So I'll try that

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
(Continue reading)

Hendrik Sattler | 15 Oct 2007 22:07
Picon

Re: Siemens MC60 + USB + OpenBSD

Am Montag 15 Oktober 2007 schrieb Christian W. Zuckschwerdt:
> I ordered the whole slew of DCA cables today and will do some testing
> when they arrive.
>
> Tests with another phone uncovered problems with fast machines and/or
> usb serial converters. You're best chance is to use the latest 0.22 rc
> with the patch I sent yesterday.
>
> The BFB mode is automatic you only need to select a TTY input (i.e. "-t
> /dev/ttyUSB0").

Don't forget to use "-U S45", that's probably the only UUID that works in BFB 
mode. If you ever used another one, you have to reboot the phone before being 
able to contact it.

> btw: your mail setup is not too good. It triggers SF's spam detection
> (forged "From:" header).

This is because he uses Yahoo, like many spammers. If Yahoo changes something, 
such filter rules can get confused.

HS

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Christian W. Zuckschwerdt | 17 Oct 2007 17:51

Re: Siemens MC60 + USB + OpenBSD

Hi,

I did some tests with a Siemens S65 now. The DCA-500 cable seems dead.
Both the DCA-510 and DCA-540 work. (It doesn't matter if the converter
in the cable or the one in the phone is used.)

While the BFB/BFC mode behaves friendly and can be left/reset, I had
some trouble leaving the plain OBEX mode. Neither reset nor escapes
work. Any hints on how to leave the Siemens transparent OBEX(3) mode
(BFB/QWE=3) are appreciated!

I tested and applied the patch for better io handling with USB serial
converters posted earlier http://dev.zuckschwerdt.org/obexftp/changeset/201

And I also added a check for transparent OBEX connections
http://dev.zuckschwerdt.org/obexftp/changeset/202

This way connects should work repeatedly even when the OBEX mode is
still active. No need to unplug your phones anymore. S.a.
http://dev.zuckschwerdt.org/openobex/wiki/ObexFsScreenshots

regards,
Christian

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
(Continue reading)

Sergey Vlasov | 17 Oct 2007 18:41
Picon
Favicon

Re: Siemens MC60 + USB + OpenBSD

On Wed, Oct 17, 2007 at 05:51:52PM +0200, Christian W. Zuckschwerdt wrote:
> I did some tests with a Siemens S65 now. The DCA-500 cable seems dead.
> Both the DCA-510 and DCA-540 work. (It doesn't matter if the converter
> in the cable or the one in the phone is used.)
> 
> While the BFB/BFC mode behaves friendly and can be left/reset, I had
> some trouble leaving the plain OBEX mode. Neither reset nor escapes
> work. Any hints on how to leave the Siemens transparent OBEX(3) mode
> (BFB/QWE=3) are appreciated!

This code from siefs works (or at least worked a year ago):

        static const char QRESETCMD[] =
        { 0x81, 0x00, 0x03 };

                case LINK_QWE3:
                        comm_tx(b->h, (char *)QRESETCMD, sizeof(QRESETCMD));
                        bflush(b);
                        usleep(1000000);
                        comm_tx(b->h, "+++", 3);
                        bflush(b);
                        usleep(1000000);
                        break;

(Actually, the upstream version does not work, because the second
usleep(1000000) is missing.)

The bflush() function in siefs tries to read until the buffer is empty
with the 0.2 seconds timeout (therefore it introduces an additional 0.2 s
delay - maybe the problem is that the existing sleep(1) in the obexftp
(Continue reading)

Hendrik Sattler | 17 Oct 2007 23:46
Picon

Re: Siemens MC60 + USB + OpenBSD

Am Mittwoch 17 Oktober 2007 schrieb Sergey Vlasov:
> On Wed, Oct 17, 2007 at 05:51:52PM +0200, Christian W. Zuckschwerdt wrote:
> > I did some tests with a Siemens S65 now. The DCA-500 cable seems dead.

Mine works (with S55) but I didn't test the patch, yet. However, the S65 
should do NewSiemens mode, not BFB. The S55 and other phones based on this 
hardware are the last ones supporting BFB, all later ones are BFC.

> > Both the DCA-510 and DCA-540 work. (It doesn't matter if the converter
> > in the cable or the one in the phone is used.)

Never used the DCA-510 but it should work _exactly_ like the DCA-500 because 
the the phone's side of the cable doesn't differ. Some non-original DCA-500 
(non easily to spot but I guess most on epay are non-original) are not 
working properly, though.
Both return "WIRE" as connection type but DCA-540 returns "USB".

> > While the BFB/BFC mode behaves friendly and can be left/reset, I had
> > some trouble leaving the plain OBEX mode. Neither reset nor escapes
> > work. Any hints on how to leave the Siemens transparent OBEX(3) mode
> > (BFB/QWE=3) are appreciated!
>
> This code from siefs works (or at least worked a year ago):
>
>         static const char QRESETCMD[] =
>         { 0x81, 0x00, 0x03 };
>
>                 case LINK_QWE3:
>                         comm_tx(b->h, (char *)QRESETCMD,
> sizeof(QRESETCMD)); bflush(b);
(Continue reading)

Christian W. Zuckschwerdt | 18 Oct 2007 00:12

Re: Siemens MC60 + USB + OpenBSD

Hi,

Hendrik Sattler schrieb:
> That's what I already mentioned some time ago when we fixed NewSiemens Obex 
> mode:
>  wait one second after last sent/received bit
>  send "+++"
>  wait at least one second
>   
I'll try that asap. Sergey, thanks for the prompt hint!

> I don't know about the BFB(0x81 0x00 0x03) command,
Well Siefs works and Dmitry is a really nice guy (and he helped a lot
with BFB development), but that is exactly the kind of code grandma
warned us about... it's not BFB but plain textbook OBEX DISCONNECT :)

> trunk/multicobex/multi_cobex.c line 68:
> c->type can be either CT_BFB _or_ CT_SIEMENS, both need the same sequence, IIRC.
>   
BFB needs (read: works best with) a wrapped AT^SQWE. SIEMENS on the
other hand is the transparent mode and needs (mostly likely) the
wait-"+++"-wait mentioned above.

regards,
Christian

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
(Continue reading)

christiaan simons | 21 Oct 2007 15:05
Picon
Favicon

Re: Siemens MC60 + USB + OpenBSD

--- "Christian W. Zuckschwerdt"
<Christian <at> Zuckschwerdt.org> wrote:

> I'll try that asap. Sergey, thanks for the prompt
> hint!

Just found a spare 5minutes for testing :)
And... the patch you've sent didn't work for me.

The Rx LED blinks a few times, and then lights steady
after the first connection attempt fails. After this
all further connection attempts fail.

Tried all sorts of UUIDs (and reset the phone and
cable after each UUID change and connection attempt)

Also tried both /dev/ttyU0 and the lowerlevel
/dev/cuaU0, but still no luck.

So, if I can test something else, please give me a
hint
(e.g. pull something from cvs ?).

And Yeah!, I! really! must! ditch! Yahoo! ;-)
Other lists worked ok with it, maybe sf is a bit
picky.

Bye,
Christiaan.

(Continue reading)

Hendrik Sattler | 14 Oct 2007 17:31
Picon

Re: Siemens MC60 + USB + OpenBSD

Am Samstag 13 Oktober 2007 schrieb Christian W. Zuckschwerdt:
> Hi,
>
> basicly it should work. You are referring to baud rate (which is
> auto-detected in the BFB code and 19200 is the default) but also write
> about USB. What is your exact setup, if you use USB the cable type is
> important (I know of three different cables -- active and passive
> TTY<->USB and pure USB).
>
> The S45 support is the origin of obexftp and the bfb lib. More recent
> phones don't require the intricate bfb mode anymore.

As alread mentioned in the last post, the BFB transfer does not fully work.
That said, it kind of works for directory listing but not for getting files.

I attached a strace log of a file transfer. The requested file is never 
created on disk.

HS
Attachment (obexftp.log): text/x-log, 31 KiB
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Openobex-users mailing list
(Continue reading)

Christian W. Zuckschwerdt | 14 Oct 2007 20:47

Re: Siemens MC60 + USB + OpenBSD

Hi,

Hendrik Sattler schrieb:
> As alread mentioned in the last post, the BFB transfer does not fully work.

I experienced problems with serial port usb adapters and fast machines.
It seems the main problem is that the current code doesn't work well
with incomplete reads. Some initial backoff (sleep for a second or so)
will help.

That is a bad workaround though. I've ported some off my ongoing
multicobex rewrite for a quick fix. The attached patch fixes:
 - at-command reads to expect a final result code of "OK" or "ERROR"
(considering some timeout)
 - initial bfb reads to wait for a complete frame (again with timeout).

Let me know if this works as expected.

If the BFB mode get operations still fail, try disabling the SETPATH
(-S) and remove the first (root) slash from filenames. E.g. obexftp -t
/dev/ttyUSB0 -U S45 -S -g Bitmap/smiley.bmp

regards,
Christian

Index: bfb/bfb_io.c
===================================================================
--- bfb/bfb_io.c	(Revision 199)
(Continue reading)

Hendrik Sattler | 14 Oct 2007 03:00
Picon

Re: Siemens MC60 + USB + OpenBSD

Am Samstag 13 Oktober 2007 schrieb Christian W. Zuckschwerdt:
> Hi,
>
> basicly it should work. You are referring to baud rate (which is
> auto-detected in the BFB code and 19200 is the default) but also write
> about USB. What is your exact setup, if you use USB the cable type is
> important (I know of three different cables -- active and passive
> TTY<->USB and pure USB).
>
> The S45 support is the origin of obexftp and the bfb lib. More recent
> phones don't require the intricate bfb mode anymore.

The MC60 has the *55 hardware base and thus requires BFB.
There are three cables, the pure serial one (DCA-500), the USB-to-serial one 
(DCA-510) and a pure USB one (DCA-540). For >= S65, all three types should 
work (with some known problems, see Wiki).
However, for the MC60, the DCA-540 will not work, only the DCA-510.
(that is all noted in the Wiki).

The baudrate is auto-detected by the phones since S45 with firmware revision 
>=21 but BFB add additional restrictions (like being at 19200 when entering 
BFB mode)
Last time I checked with my S55, old BFB mode did not work well, don't 
remember exactly what was wrong. For the newer phone, the Plain OBEX mode 
works, though.
I may take a look at it if there is a need for it.

HS

-------------------------------------------------------------------------
(Continue reading)


Gmane