10 years, 9 months ago.

C027_USSDTest fails when running with USB errors

Hello all,

has anyone got the USSDTest program to work from Ublox?

I've downloaded this program: http://mbed.org/teams/ublox/code/C027_USSDTest/

Steps

  1. Compile for the C027 using online compiler
  2. Save th C027.
  3. Open and mount - make sure you type /> sync on Linux.
  4. Restart modem
  5. Run cutecom at 9600 baud and watch error output.

Below is the error messages I see:

Ublox USSD failure on C027

Starting USSD test on Ublox C027 
Sending *#100# on USSD channel
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_INFO: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:154]New device connected: 100045b8 [hub: 0 - port: 1]
[START]
[WARN] Module ATCommandsInterface.cpp - Line 284: Command returned AT result 1 with code 0
[WARN] Module ATCommandsInterface.cpp - Line 756: Events enabling command failed
[INFO] Module UbloxUSBGSMModem.cpp - Line 548: Using a u-blox LISA-U
[WARN] Module ATCommandsInterface.cpp - Line 284: Command returned AT result 1 with code 0
[WARN] Module ATCommandsInterface.cpp - Line 780: Events disabling command failed
[WARN] Module ATCommandsInterface.cpp - Line 284: Command returned AT result 1 with code 0
[WARN] Module ATCommandsInterface.cpp - Line 756: Events enabling command failed
Result of command: 0393720140664
[USB_WARNING: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:234]td 20081800 processed but not in idle state: USB_TYPE_DEVICE_NOT_RESPONDING_ERROR [ep: 10002bc8 - dev: 100045b8 - Unknown]
[USB_WARNING: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:234]td 200818a0 processed but not in idle state: USB_TYPE_DEVICE_NOT_RESPONDING_ERROR [ep: 10002ca8 - dev: 100045b8 - Unknown]
[USB_INFO: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:433]Device disconnected [100045b8 - Unknown - hub: 0 - port: 1]
[USB_INFO: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:433]Device disconnected [100045b8 - Unknown - hub: 0 - port: 1]

As the output shows it looks like the USB device (modem) is not connecting correctly to the USB hub on the mbed.

Since this is all an integrated solution surely this should work out the box no?!

Regards, Nicholas

Question relating to:

The u-blox-C027 is a complete starter kit that allows quick prototyping of a variety of applications for the Internet of Things. The application board has a MAX-M8Q GPS/GNSS receiver and …

I think the example works: You can see the result of the USSD command: "0393720140664"

posted by Michael Ammann 24 Feb 2014

2 Answers

10 years, 9 months ago.

Ooops!

Do you know why there is an error reported by /USBHost.cpp ? Even once the USB host controller identifies the device there is no further output. This log shows what I see once all libraries are updated.

USB Enumerates the device but comms stops

Starting USSD test on Ublox C027 
Sending *#100# on USSD channel
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_ERR: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:126]usb_thread could not read dev descr
[USB_INFO: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:154]New device connected: 10004680 [hub: 0 - port: 1]

The above log happens most times I try. I'm still not sure why the failure happens - it's 9 fail, 1 good at the minute. I'm in good coverate (Vodafone HQ!) and on the GDSP platform (Vodafone's M2M platform) and it works fine on my other test devices.

What things can I do to help in debugging this?

Kind regards, Nicholas

I am guessing you need to add a delay between powering the module and connecting to it with USB. The modems usually need about 3 seconds to be ready to communicate over the interfaces. Try adding a delay/wait call.

The usb stack behaves different with each release, guess it is still under development.

posted by Michael Ammann 24 Feb 2014

Michael,

can you please try and run this small test program and tell me what you get on your device?

http://mbed.org/users/nherriot/code/C027_USSDTest/

It's very simple and just has a few wait statements. This casuse the whole stack to freeze. I don't even see debug statements now. I'd like to see your output. I get:

USSD output With Wait Statements

Starting USSD test on Ublox C027, first calling mdmPower for the modem 
Waiting for modem to settle after power on...

Regards, Nicholas.

posted by Nicholas Herriot 24 Feb 2014
10 years, 8 months ago.

You need to indicate to the modem that you want to use USB with a call to mdmUsbEnable(true).

    printf("Starting USSD test on Ublox C027, first calling mdmPower for the modem \n");
    printf("Waiting 15 sec for modem to settle after power on...\n");
    c027.mdmUsbEnable(true);
    c027.mdmPower(true);
    wait(4);
    printf("Creating modem object...\n");
    UbloxUSBGSMModem modem; // for LISA-C use the UbloxUSBCDMAModem instead
    char result[32];
    wait(4);
    printf("\n....wait over!\n");
    printf("Sending %s on USSD channel\n", USSD_COMMAND);
    int ret = modem.sendUSSD(USSD_COMMAND, result, 32);
    
    if(ret) {
        printf("Send USSD command returned %d\n", ret);
    }

    printf("Result of command: %s\n", result);

    c027.mdmPower(false);

My network operator does not understand this request and returns "Service not available"

Starting USSD test on Ublox C027, first calling mdmPower for the modem
Waiting 15 sec for modem to settle after power on...
Creating modem object...
[USB_INFO: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:154]New device connected: 10004680 [hub: 0 - port: 1]

....wait over!
Sending *#100# on USSD channel
09 02 9F 01 0E 01 00 E0 32 09 04 00 00 01 02 02 01 15 05 24 00 10 01 05 24 06 00 01 05 24 01 00 01 04 24 02 07 07 05 81 03 40 00 01 09 04 01 00 02 0A 00 00 16 07 05 82 02 40 00 00 07 05 02 02 40 00 00 09 04 02 00 01 02 02 01 17 05 24 00 10 01 05 24 06 02 03 05 24 01 00 03 04 24 02 07 07 05 83 03 40 00 01 09 04 03 00 02 0A 00 00 18 07 05 84 02 40 00 00 07 05 04 02 40 00 00 09 04 04 00 01 02 02 01 19 05 24 00 10 01 05 24 06 04 05 05 24 01 00 05 04 24 02 07 07 05 85 03 40 00 01 09 04 05 00 02 0A 00 00 1A 07 05 86 02 40 00 00 07 05 06 02 40 00 00 09 04 06 00 01 02 02 01 1B 05 24 00 10 01 05 24 06 06 07 05 24 01 00 07 04 24 02 07 07 05 87 03 40 00 01 09 04 07 00 02 0A 00 00 1C 07 05 88 02 40 00 00 07 05 08 02 40 00 00 09 04 08 00 01 02 02 01 1D 05 24 00 10 01 05 24 06 08 09 05 24 01 00 09 04 24 02 07 07 05 89 03 40 00 01 09 04 09 00 02 0A 00 00 1E 07 05 8A 02 40 00 00 07 05 0A 02 40 00 00 09 04 0A 00 01 02 02 01 1F 05 24 00 10 01 05 24 06 0A 0B 05 24 01 00 0B 04 24 02 07 07 05 8B 03 40 00 01 09 04 0B 00 02 0A 00 00 20 07 05 8C 02 40 00 00 07 05 0C 02 40 00 00 09 04 0C 00 01 02 02 01 21 05 24 00 10 01 05 24 06 0C 0D 05 24 01 00 0D 04 24 02 07 07 05 8D 03 40 00 01 09 04 0D 00 02 0A 00 00 22 07 05 8E 02 40 00 00 07 05 0E 02 40 00 00

[START]
[INFO] Module UbloxUSBGSMModem.cpp - Line 548: Using a u-blox LISA-U
Result of command: Service nicht verfuegbar
[USB_WARNING: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:234]td 20081800 processed but not in idle state: USB_TYPE_DEVICE_NOT_RESPONDING_ERROR [ep: 10002c90 - dev: 10004680 - Unknown]
[USB_WARNING: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:234]td 20081880 processed but not in idle state: USB_TYPE_DEVICE_NOT_RESPONDING_ERROR [ep: 10002d70 - dev: 10004680 - Unknown]
[USB_INFO: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:433]Device disconnected [10004680 - Unknown - hub: 0 - port: 1]
[USB_INFO: /src/UbloxUSBModem/CellularUSBModem/USBHost/USBHost/USBHost.cpp:433]Device disconnected [10004680 - Unknown - hub: 0 - port: 1]

The strange hex dump is from printf is the USBhost.cpp line 857 where the If should be (#if DEBUG > 3)

Michael