Page 1 of 1

Satellite Phone CDC-ACM issue

Posted: 23 May 2012, 16:52
by greatarbor
I have a recently released Thuraya GSM/satellite phone (Thuraya XT-Dual) which is running Windows CE 4.2 Am trying to talk to that satellite phone over USB using a router running Openwrt - linux kernel 3.2.5. The mfgr only supports Windows tethering for that phone and am trying to get it to work in Linux. An earlier model of the same phone (which is VxWorks based) worked fine with the CDC-ACM driver (had to set flag_time to 1 while loading the ppp_async module to get ppp working )

On plugging in, the phone does show up as a CDC-ACM device addressable
by /dev/ttyACM0. But attempts to send AT commands to the phone using picocom or minicom or the existing 3G modem chat scripts all fail. The phone does not appear to respond at all. Same behavior on a Ubuntu 11.04 PC which has a stock 2.6.x kernel (x is 32 or maybe higher don't remember now)


On Windows XP, the driver supplied with the phone installs fine and the phone appears as a COM port. A dial up networking connection works fine and connects to AT&T. Hyperterm also works for AT commands.
So clearly the hardware is OK.

Have tried an external powered hub - but no change. I don't think it is a usb_modeswitch storage switching type issue since the phone is not a smart phone and does not show us as an attached drive and the /dev/ttyACM0 port comes up right away . Am wondering if Microsoft Active Sync is creating issues since I see the Microsoft Active Sync
icon on the Windows XP tray when I plug in the phone and perhaps the phone is expecting to get something from the host before responding to AT commands. That is why the usb_modeswitch gurus may be able to give me some pointers here.

Have turned USB_DEBUG on in the kernel The output of lsusb and logread (dmesg) below and
the output of a usbsnoop session using a utility provided by TP-LINK for determining usb_modeswitch parameters is accessible via this link

http://pastebin.com/nQ3Aqs6r

I looked at the comments on Mark Ziesemer's excellent blog posting at
http://blogger.ziesemer.com/2008/10/all ... buntu.html

and I see that the first transfer with the flag USBD_TRANSFER_DIRECTION_OUT has no data at all (URB 5) so usb_modeswitch parameters can't be determined - which is why the TP-LINK utility could not determine the usb_modeswitch parameters.

I just found a response from a linux-usb group member hidden in my gmail which requested further output without power management

"Unfortunately we have no debug message in acm_resume(). Can you please try without runtime power management?"
And I am trying to understand what that means since the Openwrt router has no power management .

Any pointers for further debugging will be greatly appreciated.

Ashok

Posted: 23 May 2012, 18:46
by Josh
First: no problem to post this question here. It is definitely not a problem of usb_modeswitch and I'm no expert for actual serial connections, but let's at least try.

So, the core of the problem is that there is a serial interface, probably standard which does not answer when connected to Linux on an embedded router.

I see the following possible causes:
  • The device uses a special protocol over the serial connection
  • The device uses the standard AT protocol, but needs a special initialization
  • There is a problem with OpenWRT or your hardware
It should be possible to use the USB sniffer in Windows to log the whole process from plugging to connecting. This should make visible the kind of protocol used, plus any special USB commands or AT init strings.

If it turns out that everything is standard, I would suggest using a desktop Linux system and testing the interaction with the phone on that.
If that works, the focus is on OpenWRT or your router hardware.


Posted: 03 Jun 2012, 21:39
by greatarbor
Josh:
Have tested the phone out on Ubuntu and experience exactly the same behavior - no response to AT commands. Have also tried different kernels of different vintages on openwrt (even a 2.4.x kernel) to no avail. Have tried a couple of hubs also to see if this was more of a hardware issue.

I pent some time comparing the wireshark on ubuntu to the snoop logs on Windows XP - and there does not seem to be any special initialization command bulk transfer from the PC to the modem on Windows.
The files can be accessed through the links below:

ubuntu wireshark : http://pastebin.com/bN3mkrmT
Windows XP: http://pastebin.com/4aTU51FN

It's been difficult to correlate all the Windows and Ubuntu USB transactions - but the bulk transfers to the OUT endpoint seem the same in both cases.

Have also disabled USB 2.0 in the BIOS since the device is a USB 1.1 device. No difference.

Also tried a Samsung Blackjack phone which was running a newer version of Windows Mobile - and it worked fine. The initial transactions were similar to the SatPhone but it received responses to the AT commands which the Satphone did not provide.

Any suggestions at this point would be very welcome.

Regards
Ashok

Josh wrote:First: no problem to post this question here. It is definitely not a problem of usb_modeswitch and I'm no expert for actual serial connections, but let's at least try.

So, the core of the problem is that there is a serial interface, probably standard which does not answer when connected to Linux on an embedded router.

I see the following possible causes:
  • The device uses a special protocol over the serial connection
  • The device uses the standard AT protocol, but needs a special initialization
  • There is a problem with OpenWRT or your hardware
It should be possible to use the USB sniffer in Windows to log the whole process from plugging to connecting. This should make visible the kind of protocol used, plus any special USB commands or AT init strings.

If it turns out that everything is standard, I would suggest using a desktop Linux system and testing the interaction with the phone on that.
If that works, the focus is on OpenWRT or your router hardware.

Posted: 05 Jun 2012, 09:04
by Josh
The wireshark log is sort of incomplete. I'm missing the actual data that is transferred in the bulk messages and in the device requests.

I don't know the programm very well, but maybe there is a way to show it in the log?

In the Windows log, there are two init strings that seem to be sent by the driver - in one bulk message. See URB 19 ("AT\n") and URB 20 ("ATS7=60\n") which both receive an "OK" response on the outgoing endpoint.


Posted: 05 Jun 2012, 20:29
by greatarbor
Indeed. The actual wireshark output is in libpcap format and I couldn't put into pastebin. I will find a file storage site and use that.
I'm actually taking a different tack now. I tried the standard Windows CDC-ACM driver (usbser.sys) and a standard inf file and found that I could NOT send AT commands to the device. The usbsnoops are also different somewhat. I am trying to get as close to the mfgrs inf file as possible and use the standard Windows CDC-ACM driver and compare the snoops again.
Will report back one that is done.
Thanks
Ashok

Josh wrote:The wireshark log is sort of incomplete. I'm missing the actual data that is transferred in the bulk messages and in the device requests.

I don't know the programm very well, but maybe there is a way to show it in the log?

In the Windows log, there are two init strings that seem to be sent by the driver - in one bulk message. See URB 19 ("AT\n") and URB 20 ("ATS7=60\n") which both receive an "OK" response on the outgoing endpoint.

Re: Satellite Phone CDC-ACM issue

Posted: 26 Dec 2012, 12:05
by Aalia Nebhan
I am using Ie8 Clear and I still have issues with being able to identify a relationship with my mobile cellphone (motorola w755).

Lucid does have cdc-acm, but I have to do a modprobe to fill the component.
But even after running component Iwhich I can identify with an lsmod), when I link my cellphone through a usb slot, it is not linked with ttyacm0.

The cellphone is recognized as tailing dmesg reveals, but cdc-acm never gets engaged and it is not associated with ttyacm0.

Even if I
sudo mknod /dev/ttyACM0 c 166 0
and the char system ttyACM0 is designed, when I link the cellphone, it is still not linked with ttyACM0.

I am trying to use (perhaps foolishly) moto4lin. Moto4lin finds the mobile cellphone as an AT system. But i don't know what to do with that. I'm trying to be able to obtain images.

Re: Satellite Phone CDC-ACM issue

Posted: 26 Dec 2012, 14:17
by Josh
Aalia Nebhan wrote:I am using Ie8 Clear and I still have issues with being able to identify a relationship with my mobile cellphone (motorola w755).
What is Ie8 Clear?
Aalia Nebhan wrote:Lucid does have cdc-acm, but I have to do a modprobe to fill the component.
That means that something is not right. The cdc-acm module is a class driver which should load automatically if any device with the right class is connected.

Please post the output of "sudo lsusb -v -d <your-device-ID>" (an example for the device ID is 12d1:1446).

Re: Thuraya Satellite Phone CDC-ACM issue

Posted: 06 Feb 2013, 17:15
by ewildgoose
I can help you here. My company ( http://mailasail.com ) has recently worked with Thuraya on the XTD and a new firmware has been developed which appears to work correctly with the linux CDC-ACM mode (and probably also with OSX). I'm just doing testing and validation on it, but I should imagine it will quickly get released as a generally available firmware fairly soon.

Note: I don't believe I have permission to release this firmware, but if anyone had a burning interest I could probably put you in touch with the correct person at thuraya - email our support email address from the website above.

Cheers

Ed W