Jump to content
43oh

LaunchPad OSX USB drivers (CDC /VCP)


Recommended Posts

Hi All,

 

Soucre code is hosted on Google code.

http://code.google.com/p/msp430lpcdc/

 

Here is the latest link to the Driver. - Version 1.0.3b

http://code.google.com/p/msp430lpcdc/do ... g&can=2&q=

 

lastest atachement here.

MSP430LPCDC 1.0.3b.zip

 

to remove the code less kext.

 

sudo rm -rf /System/Library/Extensions/ez430rf2500.kext

 

replace the name of the kext is you are not using "ez430rf2500.kext'

 

Regards,

Terence

 

Is there an ongoing effort to get the Serial port to work on OSX?

 

I had a quick look last night, if you attach a code less KEXT to the LaunchPad or Ez430-Rf2500, OSX will attach a working HID to the debugger port. (widely know solution).

 

OSX also can detect the Serial Port but cannot configure it, hence the failure.

 

I tried compiling the TIUSB3410 source with some mods, I can get it to match and probe but it can't get a serial device from the USB composite device.

 

My idea for a start is to strip off all code not relevant to LaunchPad, organize / simply the code.

 

From the little study I did, I think the TIUSB3410 loaded it's USB config of the eeprom, so we don't need to detect FW and upload from USB.

 

I will have to look at it again much later in the week. (day job issues)

 

Anyone with any knowledge or help please chip in, will post the source once I clean it up.

 

Regards,

Terence

Link to post
Share on other sites
  • Replies 88
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hi All,   Soucre code is hosted on Google code. http://code.google.com/p/msp430lpcdc/   Here is the latest link to the Driver. - Version 1.0.3b http://code.google.com/p/msp430lpcdc/do ... g&

Finally mashed together a complete set of code to use as base, using mostly apple's code.   Current status.   The KEXT attached nicely to interface, with a BSD TTY port exposed. on the first look

Got a good working commit today, but need to press connect and disconnect a few times to get it to work. Next is clean up, since we know what device we are dealing with, I will remove all unnecessary

Posted Images

My idea for a start is to strip off all code not relevant to LaunchPad, organize / simply the code.

 

From the little study I did, I think the TIUSB3410 loaded it's USB config of the eeprom, so we don't need to detect FW and upload from USB.

 

Will a USB sniffer work? I have one I can play with and get you a dump of data. I have not worked on USB before, so I'm blind here.

Link to post
Share on other sites
My idea for a start is to strip off all code not relevant to LaunchPad, organize / simply the code.

 

From the little study I did, I think the TIUSB3410 loaded it's USB config of the eeprom, so we don't need to detect FW and upload from USB.

 

Will a USB sniffer work? I have one I can play with and get you a dump of data. I have not worked on USB before, so I'm blind here.

 

yeah it will.thanks. but maybe not now.

 

So far I can get the Kext to attach and the driver to enumerate the interface.

 

I am looking at is as a normal usb device, bypass the FW check, plugin in the config with the number I got the from USB Prober and I got pass the Kext:start section.. will have to figure out the rest.

 

I am not very good with USB too and the last time I wrote any driver is like ages ago.. Pretty rusty.

 

Regards,

Terence

Link to post
Share on other sites

Spent some time over the weekend to look at this, this what I found out.

 

TI's Launchpad is implemented as a CDC/ACM device. A composite device with 2 interface, 1 USB serial port, 1 HID device (debugger).

OSX have no problem with the HID device.

 

As for the CDC, OSX supports only pretty standard stuff and for some strange reason TI decided to define their Serial port with a twist. OSX expects a CDC/ACM device to have separate Control and Data interface but TI's engineer stuff the data ports into the Control interface.. haha.. (come on TI, be Mac friendly.)

 

I am now trying to make / hack a driver to combine the Control and Data interface, I don't know how long it will take but it will take awhile.

 

Till date, I got the Kext to attach to the device, OSX to recognize the Data interface and set up a BSD port. but port won't open cause it cannot find the Control port. I will try to coax it to recognize the control port and see if the port will open.

 

Regards,

Terence

Link to post
Share on other sites

Finally mashed together a complete set of code to use as base, using mostly apple's code.

 

Current status.

 

The KEXT attached nicely to interface, with a BSD TTY port exposed.

on the first look everything is working in debug mode, tested using Launchpad to echo.

Somehow when I turn off debug logs, it stop working, port still opens and close nicely, just don't echo anymore.

KEXT won't unload..so there must be some sort of leak in the code.

 

it is 3am now, time to sleep and have another look tomorrow.

Once I have a working code, I will clean it up and post it.

 

Regards,

Terence

Link to post
Share on other sites

Ok.. I'm a little bad at mac stuff. I've never handled one. What is KEXT? A search does not define it well.

 

- What was working before you started with this? I already thought there was a driver for MACs(correct me if wrong please)

- You now can enumerate the HID part(debugger), but having problems with the serial (CDC class).. correct?

 

Thanks for your work.

Link to post
Share on other sites

The CDC isn't working on Linux as well?

 

The idea is very simple(from where I am now).

Launchpad/Ez430-RF2500 have the control and data pipes built into 1 interface, so take the code for the control interface(for the interrupt pipe) and insert it into the Codes for the data pipes. Merge the 2 interface together by referencing the 2 interfaces to 1. look like a mess now but it works, the problem I am facing now might be some problem with the delay code, will look into it later.

Link to post
Share on other sites

Got a good working commit today, but need to press connect and disconnect a few times to get it to work.

Next is clean up, since we know what device we are dealing with, I will remove all unnecessary code etc.

 

A shot of the Terminal with real time data from my Energy Harvesting kit.

6190953075_fea80bf137_b.jpg

 

Attached nicely to the USB interface

 

6191412482_d6bf53d241_o.jpg

 

as a BSD port

 

6191412534_9f14a09957_o.jpg

Link to post
Share on other sites

Good work. Now can any of you tell me how significant this is. I asked a few questions earlier, but it got lost. I always thought there was already a driver.

If it is, then awesome job!

 

Ok.. I'm a little bad at mac stuff. I've never handled one. What is KEXT? A search does not define it well.

 

- What was working before you started with this? I already thought there was a driver for MACs(correct me if wrong please)

- You now can enumerate the HID part(debugger), but having problems with the serial (CDC class).. correct?

 

Thanks for your work.

Link to post
Share on other sites

If it makes the LP USB interface work reliably, it's pretty significant :D

 

(On Linux, it's more or less in a "works-ish, but depending on the phase of the moon you may have to sacrifice a black rooster"-state. Interestingly, it works much better on FreeBSD.)

 

A KEXT is a "kernel extension", fancy word for "driver" if you will :).

Link to post
Share on other sites

Ok, it is pretty reliable over 1 day of testing..

 

The code is still messy. Most of the of the code is from Apple's CDC drivers, it is use to cover a wide range of device, so a lot of not relevant code is still there. This is an addition to apple's drivers not a replacement.

 

Some quirks since the last commit.

1. The driver won't load if you boot with the Launch Pad on. (same for apple's driver)

2. You need to send the line setting thru the driver before it can be used. I makes sense since you have to do that in HyperTerm.

3. Crashes on some occasion. ( I am programing a KEXT crashes are a normal part of it.)

 

To Do.

1. Further Testing. on another MAC.

2. Test it with another Serial Terminal.

3. Test if the HID debugger works with MSPdebug. (should as I did not code anything on that part.)

4. Remove and clean up the code more.

5. Have fun, get some sleep and stay off the coffee.

 

Anyone willing to try it with MSPdebug, or don't mind taking the risk using a KEXT with my debug code still in it, please pm me.

This is very early stage of the development, but it working fine. I will not be responsible for any hurt or damages cause by it in anyway..

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...