« Return to Thread: How do you get an ez430 going under Linux?

Re: How do you get an ez430 going under Linux?

by Steve Underwood :: Rate this Message:

Reply to Author | View in Thread

Hi,

If you have a recent kernel, the USB FET tools should just work.
However, some distros don't have hotplug set up properly. You may need
something like a file called /etc/hotplug/usb/ti_usb_3410_5052 containing

#!/bin/bash
BOOT_CONFIG=1
ACTIVE_CONFIG=2

if [[ "$ACTION" != "add" ]]
then
     exit
fi

CONFIG_PATH=/sys${DEVPATH%/?*}/bConfigurationValue

if [[ 0`cat $CONFIG_PATH` -ne $BOOT_CONFIG ]]
then
     exit
fi

PRODUCT=${PRODUCT%/?*}               # delete version
VENDOR_ID=`printf "%d" 0x${PRODUCT%/?*}`
PRODUCT_ID=`printf "%d" 0x${PRODUCT#*?/}`

PARAM_PATH=/sys/module/ti_usb_3410_5052/parameters

function scan() {
     s=$1
     shift
     for i
     do
             if [[ $s -eq $i ]]
             then
                     return 0
             fi
     done
     return 1
}

IFS=$IFS,

if (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_3410` && scan
$PRODUCT_ID 13328 62512 `cat $PARAM_PATH/product_3410`) ||
   (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_5052` && scan
$PRODUCT_ID 20562 20818 20570 20575 `cat $PARAM_PATH/product_5052`)
then
     echo $ACTIVE_CONFIG > $CONFIG_PATH
fi


Steve


Grant Edwards wrote:

> Is there any documentation on using an ez430 under Linux?
>
> When I plug in my ez430, I don't get a corresponding
> /dev/ttyUSB device. Google found this page, which describes the
> symptoms exactly:
>
> http://people.ee.ethz.ch/~npreyss/msp430/
>
> The solution it describes is this:
>
>    Notice: Your output may vary regarding different usb device
>    names. The problem results from a wrong USB device
>    configuration selected. You can manually fix this by:
>
>    # echo "2" > /sys/bus/usb/devices/2-1.1/bConfigurationValue
>
> Except I don't have a "bConfigurationValue" file:
>
>   # tail -n4 /var/log/messages
>   Sep 24 12:26:28 grante usb 5-1: new full speed USB device using uhci_hcd and address 6
>   Sep 24 12:26:28 grante usb 5-1: configuration #1 chosen from 2 choices
>   Sep 24 12:26:28 grante ti_usb_3410_5052 5-1:1.0: TI USB 3410 1 port adapter converter detected
>   Sep 24 12:26:28 grante ti_usb_3410_5052: probe of 5-1:1.0 failed with error -5
>
>   # ls  /sys/bus/usb/devices/5-1:1.0    
>   bAlternateSetting  bInterfaceProtocol  bus       power      usb_endpoint:usbdev5.6_ep01
>   bInterfaceClass    bInterfaceSubClass  ep_01     subsystem
>   bInterfaceNumber   bNumEndpoints       modalias  uevent
>
> I'm using the "stock" driver from the Gentoo 2.6.22-r5 kernel.
>
>  


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@...
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

 « Return to Thread: How do you get an ez430 going under Linux?