Menu

#1 Portability + bug fixes

open
nobody
None
5
2005-09-23
2005-09-23
No

Bug fixes:

1) Memory corruption in writeAndReadSeq whereby we
overflow the input write buffer and corrupt the
OBEX_init string
2) Inconsistent API usage - lgConnect: change unsigned
long bytesRead to long bytesRead so we can actually
detect error conditions

Portability fixes:

1) Re-define ReadBytes and WriteBytes macros to do the
right thing. Ugly workaround, but works.
2) Open the com port with 'rw+' rather than 'rwb'

I have used this library thus far to successfully list
the images on the device (I'm sure the rest works fine
as well).

Let me know how you prefer your diffs - this one is
quite simple so it's no problem to apply by hand.

Discussion

  • Richard Kinder

    Richard Kinder - 2005-09-23

    diff -ur of the bug/portability fixes

     
  • Andrei Slavoiu

    Andrei Slavoiu - 2005-12-03

    Logged In: YES
    user_id=1396008

    Hi, I am trying to use this library (version 1.2) on Linux
    and after patching it with your fixes (and after adding
    some code to change the baudrate to 115200) I can get to
    the point where lgConnect() returns -5. I checked the IMEI
    number and it's read ok.
    The problem seems to be that the phone replies with "ERROR"
    to the "at$lgapp=1" command.
    You said you tested it, did you test on Linux?
    My phone is a U8330.
    And, btw, the correct string for opening the port is "r+b",
    not "rw+".

     
  • Richard Kinder

    Richard Kinder - 2005-12-05

    Logged In: YES
    user_id=20532

    Yeah, I've got this working quite nicely
    uploading/downloading images, audios, recordings, java etc.
    I've also done some simple python bindings for the library
    if you're interested in them - makes writing cli tools for
    upload/download trivial.

    re: the at$lgapp=1 command - sounds like your phone uses a
    different connection mechanism to mine. You probably need to
    contact the library author for connectivity issues.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.