Ian,
yes, I have those lines on the ftdi_sio.cpp/h files, as I use a quite recent kernel version.
 
Have you changed somthing more in your driver?
 
Thanks
 
 
 


De: playerstage-users-admin@lists.sourceforge.net [mailto:playerstage-users-admin@lists.sourceforge.net] En nombre de Ian Gough
Enviado el: jueves, 25 de mayo de 2006 18:58
Para: playerstage-users@lists.sourceforge.net
Asunto: Re: [Playerstage-users] ER1 driver

On 5/25/06, Jorge Santos Simon <jsantos@gmv.es> wrote:
Thank you a lot, Ian.
 
I tried your patch but I had exactly the same result:
 
    read() failed: Resource temporarily unavailable
    failed to read response
Does it work for your configuration? Maybe we should tweak something
in the kernel driver for serial USB communications. What do you think?

One thing I have noticed is that the ftdi_sio driver in 2.4 versions of the kernel that I have looked at does not support the USB vendor Id and product Id that Evolution Robotics uses for the USB device in the ER1. Regardless of whether you are using the 2.4 or 2.6 kernel, you can tell for sure by looking in /usr/src/linux/drivers/usb/serial/ftdi_sio.h and searching for DEEE, which is the vendor ID that Evolution Robotics is using. You should see something like the following:

/*
 * Evolution Robotics products (http://www.evolution.com/).
 * Submitted by Shawn M. Lavelle.
 */
#define EVOLUTION_VID           0xDEEE  /* Vendor ID */
#define EVOLUTION_ER1_PID       0x0300  /* ER1 Control Module */

and in ftdi_sio.c you should see the following in the usb_device_id structure:

        { USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) },

If not, then this is probably the cause of your problems. Just throw this into the files and rebuild.

ian


Jorge
 
 
PS: You need only to add #include <linux/serial.h> and replace
SIOtransport_data->hPort with this->_fd to make it compile.
 

Enviado el: miércoles, 24 de mayo de 2006 14:13
Asunto: Re: [Playerstage-users] ER1 driver

Jorge,

I finally figured out how do do custom baud rates. You can try replacing the following lines in the ER1 driver:

  cfsetispeed(&term, B230400);
  cfsetospeed(&term, B230400);

with

  // Set the baud rate to 38.4kbaud for custom baudrates
  cfsetispeed(&term, B38400);
  cfsetospeed(&term, B38400);

  struct serial_struct serial_info;

  // Set up a custom serial clock divisor to get
  // a baud rate of 250000.
  // round off to get the closest divisor.
  serial_info.flags = ASYNC_SPD_CUST | ASYNC_LOW_LATENCY;
  serial_info.custom_divisor = (float)24000000/(float)250000 + 0.5;

  if ( ioctl( SIOtransport_data->hPort, TIOCSSERIAL, &serial_info ) < 0)
  {
      perror("config_serial_port: ioctl TIOCSSERIAL");
      return(-1);
  }

Now, I have not compiled this for the ER1 driver so you may have to fiddle with it a bit to get it to compile properly. Let me know if this works for you.

ian

On 5/22/06, Jorge Santos Simon <jsantos@gmv.es> wrote:
Hi again (you are right: this has been a hard work week-end for me!)
 
I have failed making the er1 driver works. It seems to properly send
data, but always fails when reading the RCM responses:
 
    read() failed: Resource temporarily unavailable
    failed to read response
 
My guest is that I must tweak the baud rate, as explained in this post:
 
        (see it below)
 
Unfortunately, I have no idea about how to do that in the robot...
Any help?
 
Jorge

 

De: playerstage-users-admin@lists.sourceforge.net [mailto:playerstage-users-admin@lists.sourceforge.net] En nombre de Ian Gough
Enviado el: viernes, 17 de marzo de 2006 15:43
Para: playerstage-users@lists.sourceforge.net
Asunto: [Playerstage-users] ER1 driver

I have a couple of questions about the ER1 driver library that is contained in the Player/Stage project.

Keep in mind that the following testing was done using the PS v1.6 since the ER1 driver has not yet been modified to work with v2.0.

Our version of the ER1 has a Robot Control Module (RDM) that has a USB port on it. On the RCM is a PMD motion control chip that by default accepts a baud rate of 250000 baud. This works fine for MS Windows which accepts arbitrary baud rates, but of course in Linux, this is not a valid baud rate (or at least does not map to a valid Bxxx baudrate). I noticed that in the PS player lib for the ER1 that  a baud rate of 230400 is specified. Now this doesn't work for our ER1 since this baud rate is not close enough to 250000 baud for the serial stream to be recognized properly and results in many communications errors. Sooooo, can anybody tell me if they have gotten this to work with an ER1? If so, I would like to know if you had to do anything special to get it working.

In order to get it to work, I had to mod the RCM board and ER1 driver to allow communication at 115200 baud but this is quite a bit slower than I would like.

Ian Gough
Frontline-Robotics


Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener información clasificada por su emisor como confidencial en el marco de su Sistema de Gestión de Seguridad de la Información siendo para uso exclusivo del destinatario, quedando prohibida su divulgación copia o distribución a terceros sin la autorización expresa del remitente. Si Vd. ha recibido este mensaje erróneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboración.
This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it.




Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener información clasificada por su emisor como confidencial en el marco de su Sistema de Gestión de Seguridad de la Información siendo para uso exclusivo del destinatario, quedando prohibida su divulgación copia o distribución a terceros sin la autorización expresa del remitente. Si Vd. ha recibido este mensaje erróneamente, se ruega lo notifique al remitente y proceda a su borrado.
Gracias por su colaboración.
This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it.




Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener información clasificada por su emisor como confidencial en el marco de su Sistema de Gestión de Seguridad de la Información siendo para uso exclusivo del destinatario, quedando prohibida su divulgación copia o distribución a terceros sin la autorización expresa del remitente. Si Vd. ha recibido este mensaje erróneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboración.
This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it.