Luminary eval boards, USB serial, and Linux

This is kind of off-topic, but maybe someone has an answer.

I use a laptop running Ubuntu for giving presentations, and my latest presentation involves talking to a Luminary LM8S311 evaluation board to give a demonstration.

This works fine on Windows XT -- connects right up, and I can do damage from the comfort of my chair. But the laptop (running Ubuntu 8.04) doesn't see the FTDI chip on the eval board as a serial port -- even though it sees my el-cheapo Radio Shack USB-RS232 cable as such.

Has anyone run into this? Have any pointers? Any Linux groups where the folks may (a) have useful information and (b) won't treat me like a Londoner in Paris?

Thanks.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott
Loading thread data ...

What is the LM8S311? I have a LM3S811.

Does it detect and load the ftdi driver? What does dmesg say?

Reply to
linnix

That would seem to be the path of inquiry.

Also determine the vid/pid pair either from dmesg or from windows, and google on that in combination with linux.

Probably there is a driver .deb that needs to be installed

Reply to
cs_posting

It should work fine.

It should appear as /dev/ttyUSB0 (or 1 etc). As others have said look at dmesg to find which. The ftdi driver is in all recent kernels AFAIK.

How are you trying to access the serial port? Direct from linux or from e.g. wine? Wine probably needs a symlink to the device node to be manually created in ~/.wine/dos_devices.

--

John Devereux
Reply to
John Devereux

At this point I'm just looking at the /dev directory for anything containing USB. The Rat Shack example cable comes up with /dev/ttyUSB0 as expected.

Ha: More info. dmesg isn't very informative, but the Syslog is. The Rat Shack cable comes up as a Prolific PL2303, and appears (per syslog) to be referenced by a driver (pl2303.c and usb-serial.c). The Luminary part refers to "New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_403_bcd9_LM000001.if0') (and if1, and just ...LM000001).

Argh.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

What format? It shows up on lsusb as 0403:bcd9 -- I'll try that first.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

The LM8S311 is a special version of the LM3S811 for dyslexics.

Dmesg doesn't say a heck of a lot, but syslog is informative. No, it doesn't appear to load the ftdi driver, and when I attempted to do so the other day using sysmon ttyUSB0 didn't pop up, although I hadn't thought to look in syslog.

--

Dyslexics Untie!
Reply to
Tim Wescott

Tim Wescott wrote: [ ... ]

I think you need to go to and download Linux drivers. We've been using an FT232B (I think it's a B) with Debian 4 (a 2.6 kernel) for a long time -- so long that I've forgotten what we had to do to get it going. As that page says, FT232 support is built into 2.6 kernels, but not 2.4 .

Good luck, Mel.

Reply to
Mel

Yes, the driver code is there, but you have to enable it in building the kernels or modules.

Reply to
linnix

I'm confused (well, that's obvious, but...). I'm using Ubuntu 8.04 with a 2.6 kernel, and the ftdi_sio driver is already in there -- it's just not recognizing the chip.

Is this a driver that I can load and have the device show up in /dev? I got the impression that the driver in the 2.6 kernels was essentially the ftdi driver -- am I wrong?

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

I wonder whether there's something wrong with the udev rules. I'll have a look at work tomorrow to find out what we're doing.

Mel.

Reply to
Mel

Did you (or they) reprogram the ftdi chip to have a different vendor/product ID? The ftdi chips have eeproms in them, and if you change the ID (for example, so that the eval software can recognize its own board), the generic drivers won't recognize it.

FTDI has software on their web site to program those chips, and you can view and/or reset the IDs if needed.

My FTDI chips are ID 0403:6001

If you "lsusb" after plugging yours in, you can see what it's ID is.

Reply to
DJ Delorie

It's 0403:bcd9. The chip is a FT2232D, with one port being used for asynchronous serial and the other bit-banging JTAG debug.

Is there a way to configure the driver to look for that chip? Is there a way to tell it to use the right half and ignore the wrong one?

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

Sure, it's open source after all (the version distributed with the kernel at least).

Find a kernel tree and look in linux-xx/drivers/usb/serial/ftdi_sio.c and so on

You may need to learn about how to compile kernel modules; it's a little different doing it the debian (which ubuntu inherits) package way than doing it on a raw kernel (though you could of course fall back to that).

It's also possible that you can hex edit the module without recompliing it... but

Another little issue: kernel drivers don't usually mknod the entires in /dev/ - usually they just listen at the chosen device numbers, and it's up to someone else (once upon a time _you_) to make the approrpiate /dev entries as handles to them. Today there are some daemons that do some of that, but don't seem to work perfectly.

Also, with a multifunction device it may not be obvious what driver should be auto loaded - serial, jtag, etc.

Reply to
cs_posting

Seems as though the key to this is in

/lib/modules/modules.alias

With our FTDI FT232B, ID 0403:6001, this file has a line:

alias usb:v0403p6001d*dc*dsc*dp*ic*isc*ip* ftdi_sio

It's possible that a similar line with "b0403pBCD9" would recognize the FT2232D

Maybe, Mel.

Reply to
Mel Wilson

At this point I'd be happy with just the serial and broken jtag.

I think I'm going to have to end up using a Windows laptop, or hack in an RS-232 chip and use a regular cable. (I'm not even sure if the Windows machine doesn't work because of drivers that came hidden in the eval board installation package -- so I may have to install the dang thing on my cruddy old Windows laptop -- sigh).

Any good pointers to building Linux kernel modules, specifically for Debian?

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

It's just a mess. Are you using the Keil evaulation CD that come with the board? I got two versions that looks identical on the labels. First of all, they only work on Win2000 or XP, not Win98 (too old) or Vista (too new). The first version work only if I keep the clock in

2007. The second version compile but would not download the flash.

Althought I am using the boards all the time , I only update the code occasionally, so I keep a separate PC with XP running in 2007 for programming it. The boards and uC (M3) are nice, but the "free" tools are horrible.

Reply to
linnix

I use debian, but for some windows-only tasks I have setup a virtual machine under it running windows. I used to use vmware, but now use Suns VirtualBox. It works great, and you can install windows USB drivers under it fine. They provide a debian repository for it too.

(I would guess that your problem is due to them programming in custom VID/PID values so that the proper drivers are not being loaded. There is probably a udev config file somewhere that you could edit, but I don't know enough about it to really help here).

--

John Devereux
Reply to
John Devereux

Have you tried using modprobe usbserial, with the appropriate product and vendor arguments, to force usbserial to see the device ?

Major warning: Do this at your own risk and make sure that you have not got anything important running or unsaved when you do this. :-) There may be very good reasons why usbserial is not seeing your device.

Check the dmesg and lsmod output first to make sure that another module hasn't been loaded (which you will to first need to unload) instead of usbserial - I have a 3G modem that is initially loaded as a cdrom device until I unload the module (with rmmod) and then force usbserial to see it by specifying the vendor and product arguments to modprobe.

Simon.

PS: BTW, nice book (at least of what I've read so far).

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980's technology to a 21st century world
Reply to
Simon Clubley

Doesn't work -- oh well. It's looking like the long range solution is to patch ftdi_sio.c with appropriate code and recompile. I've found a page which lists a patch for the Olimex JTAG programmer, of which I think the Luminary part is a clone.

I'm glad you like it, and hope that you're finding it useful. The part that I'm building is in support of a seminar series from the book, if the implementation details don't drive me crazy.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.