> This doesn't really explain what you are trying to do (more "how you are
> trying to do it").

What I'm trying to do is start the driver running. When it is registered to
a device it sets up some structures but won't start communicating until the
UDSL_IOCTL_START ioctl has been sent. I want it to start functioning and
therefore want to send the ioctl. I'm messing about with an alternative to
the Alcatel binary only management program that keeps crashing my kernel.

> The ioctl()s for speedtouch probably don't require a usb device. It is
> probably a network device.

You had me confused for a while with sockets and network devices - It
doesn't use them. After much messing around I've finally figured out how to
call the ioctl function. I needed use ioctl with USBDEVFS_IOCTL which passes
an usbdevfs_ioctl structure it to the driver. The only codes the driver
speedtouch accepts are UDSL_IOCTL_START( =1 as below) and
UDSL_IOCTL_STOP(=2) and are passed in the ioctl_code variable. The code to
do it is:

  #include <linux/usbdevice_fs.h>
  struct usbdevfs_ioctl rpioctl ;

  rpioctl.ifno = 1;
  rpioctl.ioctl_code = 1;
  rpioctl.data="";

  file_desc = open("/proc/bus/usb/001/002", O_RDWR);

  ret_val = ioctl(file_desc, USBDEVFS_IOCTL, &rpioctl);

Non of this is documented anywhere other than in the include file (that I
can find online anyway). I eventually found it by chance and guessed how to
use it... I'm posting it so it's in the list archives.

I'll also add for the record that if you run the "modem_run" program from
Benoit Papillault's alternative driver, install the speedtch module, run the
above bit of code, then open a ppp link over pppoatm it all works and you
get a connection. On my machine modem_run then dies sometime later - I've no
idea why (my next job) but at least I have the source to this program... (It
does this with their pppoa2/3 as well so I doubt it's a compatibility
problem with the kernel driver).

Anyway, Looks like I'm finally getting somewhere :)

Cheers,

RP






_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to