O_NONBLOCK in irmc

Phil Dibowitz <[email protected]> Sat, 31 Jul 2004 23:41:40 -0700
Newsgroups gmane.comp.gnome.apps.multisync.devel
Message-ID <[email protected]>
Folks,

I mentioned this on the users list, but (1) I think it's more 
appropriate here and (2) I didn't get any response there.

After getting a kernel patch for the pl2303 driver, I can now get 
multisync to talk to my Sony Ericcson T637 over a USB cable -- but only 
to a certain extent.

It sync's about 20 numbers and then dies. After some looking, it appears 
to be because the irmc plugin opens the port with O_NONBLOCK but doesn't 
expect short writes.

Unfortunately the DCU-11 cable that connects the phone is a USB to 
Serial converter, and the phone acts as a basic serial device taking AT 
commands.

Therefore multisync writes some data, and then tries a few times to 
write more data but fails and therefore gives up.

I have no objection to using nonblocking ports, but then the app needs 
to be prepared for this cable, since its the cable used for most Sony 
Ericsson phones.

I've started looking through the code trying to fix it, but I'm getting 
quite lost, and my socket-programming skills aren't very good.

Any patches, thoughts, help, would be greatly appreciated.

-- 
Phil Dibowitz                             [email protected]
Freeware and Technical Pages              Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
  - Benjamin Franklin, 1759
signature.asc (application/pgp-signature, 256 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBDJCkN5XoxaHnMrsRAnm3AKCm0sgNASxqkmrHtvqY1sgQoX0F6ACeKEYL
5CjMkyGiaQZI34b8SEyCFfo=
=2jtS
-----END PGP SIGNATURE-----