Re: linux development

"Roger Binns" <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <003201c5552a$41f379b0$3501a8c0@rogersqyvr14d3>
>  One of the 
> things I was looking at is setting up the hotplug scripts properly on Linux. 
>  Currently on my box they don't work, so I have to change all the file 
> permissions by hand to use bitpim with my personal account.

BTW the hotplug scripts have nothing to do with Python.  They do fundamentally
work.  You have to get the usb ids correct which depend on your phone and/or
cable.  We can't install the scripts ourselves since some devices are generic
USB to serial (eg Prolific PL2303 used in many phone as well as other cables)
and there are several different versions of hotplug out there and the various
distro vendors like to move the config files around.

> I am not a python programmer, more like a low level kernel programmer.  

That is exactly what we need at the moment.  Don't worry about the
Python side.  What I do need is C userspace code that will do various 
things and needs to run as a non-root user.

> I understand the comscan logic but not the entire reason.  Does bitpim just 
> scan the /dev/* stuff just to see what is plugged in or does it actually use 
> those devices for reading/writing?   If so, then how does the usb library 
> fit in to the whole picture.

That depends on the phone model and/or cable.  Some phones export a USB
modem interface (ACM) and that is what BitPim needs to talk to.  BitPim
doesn't have the ACM protocol builtin, so we have to talk to a device
node that implements it.

Other cables are USB to serial (eg PL2303 based) and we have to speak
to the device node that has the relevant driver behind that.

And other phones are composite USB devices and have a secondary diagnostics
interface that must be spoken to.  For those phones BitPim uses libusb.

The things we really need are:

 - Being able to map from USB devices to the relevant device nodes.
   Just how can we tell that USB device X on bus Y happens to be
   /dev/ttyACM0?  At the moment we just try to open the various
   device nodes, but when it fails we can't tell if that is because
   there is no device at all, or that there is and there are permissions
   issues.

 - Notification that there has been a device change (appearance or
   removal of any of the relevant device names)

Roger


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.