From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 1 14:18:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAC1516A4CE for ; Thu, 1 Jul 2004 14:18:47 +0000 (GMT) Received: from mailhub.intercaf.ru (mailhub.intercaf.ru [195.96.167.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9B8443D1F for ; Thu, 1 Jul 2004 14:18:46 +0000 (GMT) (envelope-from lesha@intercaf.ru) Received: from [195.96.167.70] (sick@[195.96.167.70]) (authenticated bits=0) by mailhub.intercaf.ru (8.12.10/8.12.10) with ESMTP id i61E5qMG012987; Thu, 1 Jul 2004 18:05:53 +0400 (MSD) (envelope-from lesha@intercaf.ru) From: Alex K Organization: InterCAF To: ticso@cicely.de, "Daniel O'Connor" Date: Thu, 1 Jul 2004 18:05:55 +0400 User-Agent: KMail/1.6.2 References: <200406301904.44292.lesha@intercaf.ru> <20040701123615.GA57889@cicely12.cicely.de> In-Reply-To: <20040701123615.GA57889@cicely12.cicely.de> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Message-Id: <200407011805.55432.lesha@intercaf.ru> X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' cc: freebsd-hackers@freebsd.org Subject: uplcom.c changes (was: USB driver selection algorithm?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2004 14:18:47 -0000 Hello! =20 Bernd Walter wrote: > uplcom takes devices (or maybe interfaces) based on vendor/product ID. > > > What approach will you recommend? > > What is your problem? 2 different USB devices with same vendor/product ID, only revision differes. They both will be handeled by uplcom, but initialization should be differen= t, because chips are different (PL2303 and PL2303X) Daniel O'Connor wrote: > The probe and attach routines shouuld be able to select on revision, > although I'd be suprised if the 2 differ by enough that one driver could= n't=20 > cover them both. Technically it will be 1 driver, but device initialization should differ based on revision. (just trying to add some functionality to uplcom.c to support PL2303X USB-2-Serial chipset) I have already sent some mail to personal @freebsd.org boxes of people who were tweaking uplcom.c during last few months, but I think I should copy it to the list, as it is not the only problem I have. Cheers, AL. =2D------[ Cut here ]--------------- I have recently got USB cable for my Nokia 6100 phone, which is based on PL2303X chipset, I thought it will work with uplcom driver, but no, something changed. After some investigation and USB bus snooping on "Other OS"=20 I have found that upon connection host sends some special initialization sequences to the cable. I have tried modifing uplcom.c to do this initialization, now I can "cu -l /dev/ucom0" and speak "AT" commands to phone. But connection to phone is somehow not "binary safe", some=20 characerts typed will return garbage - for example "F" returns "=FD"=20 but some characters work OK, and if I will type a working letter -=20 any one character following will also be OK. So if I type "AF"=20 it will work correctly What can be causing such problem? Patch here: http://gate.intercaf.ru/~lesha/6100/pl2303x.patch Also Prolific people gave me Linux driver for PL2303X (it is not included with Linux as for now, and not avaible via their web site) http://gate.intercaf.ru/~lesha/6100/pl2303x-linux.zip This may be of interest. If anyone of you, magisters, will have some spare time and/or ideas how to make this work - I will be very pleased. My kernel programming knowledge is very limitied, not to say "none".