This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5529 OSX



I need some guidance on how to get some drivers working with USB. The company I work for developed a product that communicates over usb. This product is giving me some issues now for some reason. Here is the out put form netbeans.

Mac OS X
Human read 0: st375 512
Open st375 512
Product = 885
Serial = 512
Got it!
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000012c92856e, pid=2313, tid=61755
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [STXInterfaceNative.dylib+0x256e] writeUSB+0x1e
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/partialdata/Google Drive/Game and App Dev Backup/Spectrum Techniques /STX DEV Ryan/ST160/hs_err_pid2313.log
#
# If you would like to submit a bug report, please visit:
# bugreport.java.com/.../crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Found a ST Device vendor 0x0c6b, product 0x0375
Unable to open device: e00002c5
Java Result: 134
BUILD SUCCESSFUL (total time: 3 seconds)

the error e00002c5 from what i can find is that USB device is currently in use or locked. Any help on the subject of writing custom usb driver for mac using this would be great. 

  • As far as I can tell, you are running a Java program on top of a native code library. You get an error code because that library crashed. This looks like a bug in your writeUSB() function.
  • Thank you for replying. I was looking back at that code and the thing is it works fine on windows. When you plug in our hardware on windows and power it on it will install the driver automatically its a CDC virtual com port.  Seems that with the newest OS releases of OS X the software isn't working it crashes. From what iv googled i keep seeing that with the error e00002c5 the ftdi generic driver that apple provides takes over so when we try to write it will not work when trying to communicate. I am not sure what the fix is. I have all the source if anyone wants to take a look at it. Netbeans is the IDE I use currently for this and I am using a JNI. Any guidance, tips etc... are really appreciated.

  • The bug is in the writeUSB() function in the STXInterfaceNative library.
  • This is the writeUSB() function. I am not sure what is wrong with this?

    IOReturn writeUSB(IOUSBInterfaceInterface **interface, unsigned char *command) {
    IOReturn kr;
    kr = (*interface)->WritePipe(interface, 2, command, 1);
    if (kr != kIOReturnSuccess) {
    printf("Unable to perform bulk write (%08x)\n", kr);
    //(void) (*interface)->USBInterfaceClose(interface);
    //(void) (*interface)->Release(interface);
    return kr;
    }

    //printf("Wrote \"%x\"to bulk endpoint\n", command[0]);
    return kr;
    }
  • interface or *interface is not a valid pointer.
  • I used the usb prober to do some more digging. Any idea on how to rewrite this driver correctly?

    Full Speed device @ 7 (0x14100000): ............................................. Communication device: "ST375"

    Port Information: 0x101a
    Not Captive
    Attached to Root Hub
    External Device
    Connected
    Enabled
    Connected to External Port
    Number Of Endpoints (includes EP0):
    Total Endpoints for Configuration 1 (current): 4
    Device Descriptor
    Descriptor Version Number: 0x0200
    Device Class: 2 (Communication)
    Device Subclass: 0
    Device Protocol: 0
    Device MaxPacketSize: 8
    Device VendorID/ProductID: 0x0C6B/0x0375 (unknown vendor)
    Device Version Number: 0x0200
    Number of Configurations: 1
    Manufacturer String: 1 "Spectrum Techniques"
    Product String: 2 "ST375"
    Serial Number String: 3 "87D8816F0E002800"
    Configuration Descriptor (current config): ...................... "ST375"
    Length (and contents): 67
    Raw Descriptor (hex) 0000: 09 02 43 00 02 01 04 C0 32 09 04 00 00 01 02 02
    Raw Descriptor (hex) 0010: 01 05 05 24 00 10 01 05 24 01 00 01 04 24 02 02
    Raw Descriptor (hex) 0020: 05 24 06 00 01 07 05 81 03 40 00 FF 09 04 01 00
    Raw Descriptor (hex) 0030: 02 0A 00 00 00 07 05 02 02 40 00 FF 07 05 82 02
    Raw Descriptor (hex) 0040: 40 00 FF
    Number of Interfaces: 2
    Configuration Value: 1
    Attributes: 0xC0 (self-powered)
    MaxPower: 100 mA
    Interface #0 - Communications-Control .............................................. "Virtual COM Port (CDC)"
    Alternate Setting 0
    Number of Endpoints 1
    Interface Class: 2 (Communications-Control)
    Interface Subclass; 2
    Interface Protocol: 1
    Comm Class Header Functional Descriptor
    Raw Descriptor (hex) 0000: 05 24 00 10 01
    Comm Class Call Management Functional Descriptor
    Raw Descriptor (hex) 0000: 05 24 01 00 01
    Comm Class Abstract Control Management Functional Descriptor
    Raw Descriptor (hex) 0000: 04 24 02 02
    Comm Class Union Functional Descriptor
    Raw Descriptor (hex) 0000: 05 24 06 00 01
    Endpoint 0x81 - Interrupt Input
    Address: 0x81 (IN)
    Attributes: 0x03 (Interrupt)
    Max Packet Size: 64
    Polling Interval: 255 ms
    Interface #1 - Communications-Data/Unknown Comm Class Model
    Alternate Setting 0
    Number of Endpoints 2
    Interface Class: 10 (Communications-Data)
    Interface Subclass; 0 (Unknown Comm Class Model)
    Interface Protocol: 0
    Endpoint 0x02 - Bulk Output
    Address: 0x02 (OUT)
    Attributes: 0x02 (Bulk)
    Max Packet Size: 64
    Polling Interval: 255 ms
    Endpoint 0x82 - Bulk Input
    Address: 0x82 (IN)
    Attributes: 0x02 (Bulk)
    Max Packet Size: 64
    Polling Interval: 255 ms

  • Why would the USB descriptors help? Some other code is calling writeUSB() with an invalid parameter.

**Attention** This is a public forum