AT Commands sent to USB Modem

Hi,
I am trying to send AT commands to a USB modem using VC++. I found the code below online and have tried using it. I do not get any errors but it doesn't appear to be working.
I used Putty to set AT+CMGF= 0. However after I run this code, when I check the value of AT+CMGF it is still 0, so although no error is being thrown up, it doesn't seem to be sending correctly.
Any help would be great thanks.
#include <iostream>
#include <Windows.h>
#include <string.h>
using std::string;
int main() {
std::string data = "AT+CMGF=1";
 DCB dcb; 
 DWORD byteswritten; 
 HANDLE hPort = CreateFile( 
 "COM3", //"\\\\.\\COM10"
 GENERIC_WRITE | GENERIC_READ, 
 FILE_SHARE_READ| FILE_SHARE_WRITE, 
 NULL, 
 OPEN_EXISTING, 
 0, 
 NULL 
 DWORD dwerror = GetLastError();
 if (GetCommState(hPort,&dcb) == 0) {
return false; }
 dcb.BaudRate = CBR_9600; //9600 Baud 
 dcb.ByteSize = 8; //8 data bits 
 dcb.Parity = NOPARITY; //no parity 
 dcb.StopBits = ONESTOPBIT; //1 stop 
 if (!SetCommState(hPort,&dcb)) 
 return false; 
 bool retVal = WriteFile(hPort,&data,200,&byteswritten,NULL);
 dwerror = GetLastError();
 CloseHandle(hPort); //close the handle 
 return retVal; 

SOLVED: just needed to add \r\n after my commands
Okay, not solved! The first command, setting CMGF=1 works, nothing else seems to go through though. i.e. if CMGF is 0 and i run this code setting it to 1, it changes to 1 when I check the value in putty. 
I'm not sure if im doing something wrong in the way I send the CMGS and text message commands.
No errors come up...but the text message isn't sent. I send the CMGF and CMGS commands followed by a carriage return and the text message content followed by the SUB (CTRL+Z). doesn't seem to work. If I try reading the serial port using ReadFile() it
just hangs without setting a timeout. Any help would be appreciated. 
#include <iostream>
#include <Windows.h>
#include <string.h>
using namespace std;
int main() {
string CR;
CR = 13;
string SUB;
SUB = 26;
string mode = "AT+CMGF=1";  //+ CR; // \r";
mode.append(CR);
string phone = "AT+CMGS=\"0430554519\"" ; // \r";
phone.append(CR);
string message = "> Test C++ message " ;
message.append(SUB);
 DCB dcb; 
 DWORD byteswritten1; 
 DWORD byteswritten2; 
 DWORD byteswritten3; 
 DWORD byteswritten4; 
 DWORD byteswritten5; 
 DWORD byteswritten6; 
 HANDLE hPort = CreateFile( 
 "COM3",
 GENERIC_WRITE | GENERIC_READ, 
 FILE_SHARE_READ| FILE_SHARE_WRITE, 
 NULL, 
 OPEN_EXISTING, 
 0, 
 NULL 
 DWORD dwerror = GetLastError();
 if (GetCommState(hPort,&dcb) == 0) {
return false; }
 dcb.BaudRate = CBR_9600; //9600 Baud 
 dcb.ByteSize = 8; //8 data bits 
 dcb.Parity = NOPARITY; //no parity 
 dcb.StopBits = ONESTOPBIT; //1 stop 
 if (!SetCommState(hPort,&dcb)) 
 return false; 
  char UitBuff1[25];
DWORD dwBytesRead;
 bool retVal = WriteFile(hPort,&mode,mode.capacity(),&byteswritten1,NULL);
  retVal = WriteFile(hPort,&CR,CR.capacity(),&byteswritten2,NULL); 
 bool retVal1 = WriteFile(hPort,&phone,phone.capacity(),&byteswritten3,NULL);
  retVal = WriteFile(hPort,&CR,CR.capacity(),&byteswritten4,NULL);
 bool retVal2 = WriteFile(hPort,&message,message.capacity(),&byteswritten5,NULL);
  retVal = WriteFile(hPort,&CR,CR.capacity(),&byteswritten6,NULL);
  dwerror = GetLastError();
CloseHandle(hPort); //close the handle 
 return retVal; 

Similar Messages

  • G3 Usb Modem Huawei E1550 did not work after unplug (NetworkManager)

    Hello, All!
    I have the following problem:
    When I boot with plugged in usb modem everything is fine.
    If I unplug modem and plug it back it can not be used any more.
    Some logs below.
    1. Modem plugged on boot
    lsusb
    Bus 001 Device 003: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
    usb_modeswitch log:
    USB_ModeSwitch log from Sun Apr 08 23:38:27 CEST 2012
    Raw args from udev: /1-1.1:1.0
    Using global config file: /etc/usb_modeswitch.conf
    Using top device dir /sys/bus/usb/devices/1-1.1
    USB values from sysfs:
    manufacturer HUAWEI Technology
    product HUAWEI Mobile
    serial
    bNumConfigurations is 1 - don't check for active configuration
    SCSI attributes not needed, moving on
    checking config: /usr/share/usb_modeswitch/12d1:1446
    ! matched. Reading config data
    config: TargetVendor set to 12d1
    config: TargetProductList set to 1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506
    Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
    Command to be run:
    usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 9 -v 12d1 -p 1446 -f $configBuffer
    Verbose debug output of usb_modeswitch and libusb follows
    (Note that some USB errors are to be expected in the process)
    Reading long config from command line
    * usb_modeswitch: handle USB devices with multiple modes
    * Version 1.2.1 (C) Josua Dietze 2011
    * Based on libusb0 (0.1.12 and above)
    ! PLEASE REPORT NEW CONFIGURATIONS !
    DefaultVendor= 0x12d1
    DefaultProduct= 0x1446
    TargetVendor= 0x12d1
    TargetProduct= not set
    TargetClass= not set
    TargetProductList="1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506"
    DetachStorageOnly=0
    HuaweiMode=0
    SierraMode=0
    SonyMode=0
    QisdaMode=0
    GCTMode=0
    KobilMode=0
    SequansMode=0
    MobileActionMode=0
    CiscoMode=0
    MessageEndpoint= not set
    MessageContent="55534243123456780000000000000011062000000100000000000000000000"
    NeedResponse=0
    ResponseEndpoint= not set
    InquireDevice disabled
    Success check enabled, max. wait time 20 seconds
    System integration mode enabled
    Use given bus/device number: 001/009 ...
    Looking for default devices ...
    bus/device number matched
    searching devices, found USB ID 12d1:1446
    found matching vendor ID
    found matching product ID
    adding device
    Found device in default mode, class or configuration (1)
    Skipping the check for the current configuration
    Using first interface: 0x00
    Using endpoints 0x01 (out) and 0x81 (in)
    USB description data (for identification)
    Manufacturer: HUAWEI Technology
    Product: HUAWEI Mobile
    Serial No.: not provided
    Looking for active driver ...
    OK, driver found; name unknown, limitation of libusb1
    OK, driver "unkown" detached
    Setting up communication with interface 0
    Using endpoint 0x01 for message sending ...
    Trying to send message 1 to endpoint 0x01 ...
    libusb:error [op_clear_halt] clear_halt failed error -1 errno 71
    OK, message successfully sent
    Resetting response endpoint 0x81
    Resetting message endpoint 0x01
    Could not reset endpoint (probably harmless): -34
    Device is gone, skipping any further commands
    Bus/dev search active, referring success check to wrapper. Bye.
    ok:busdev
    (end of usb_modeswitch output)
    Checking success of mode switch for max. 20 seconds ...
    Waiting for device file system (1 sec.) ...
    Waiting for device file system (2 sec.) ...
    Waiting for device file system (3 sec.) ...
    Waiting for device file system (13 sec.) ...
    Waiting for device file system (14 sec.) ...
    Waiting for device file system (15 sec.) ...
    Reading attributes ...
    All attributes matched
    Mode switching was successful, found 12d1:1001 (HUAWEI Technology: HUAWEI Mobile)
    Now checking for newly created ports ...
    new ports found, device is known to driver
    Checking for AVOID_RESET_QUIRK kernel attribute
    AVOID_RESET_QUIRK activated
    All done, exiting
    2.Modem unplugged and plugged back
    lsusb
    Bus 001 Device 008: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
    usb_modeswitch log:
    USB_ModeSwitch log from Sun Apr 08 23:46:12 CEST 2012
    Raw args from udev: /1-1.1:1.0
    Using global config file: /etc/usb_modeswitch.conf
    Using top device dir /sys/bus/usb/devices/1-1.1
    USB values from sysfs:
    manufacturer HUAWEI Technology
    product HUAWEI Mobile
    serial
    bNumConfigurations is 1 - don't check for active configuration
    SCSI attributes not needed, moving on
    checking config: /usr/share/usb_modeswitch/12d1:1446
    ! matched. Reading config data
    config: TargetVendor set to 12d1
    config: TargetProductList set to 1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506
    Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
    Command to be run:
    usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 7 -v 12d1 -p 1446 -f $configBuffer
    Verbose debug output of usb_modeswitch and libusb follows
    (Note that some USB errors are to be expected in the process)
    Reading long config from command line
    * usb_modeswitch: handle USB devices with multiple modes
    * Version 1.2.1 (C) Josua Dietze 2011
    * Based on libusb0 (0.1.12 and above)
    ! PLEASE REPORT NEW CONFIGURATIONS !
    DefaultVendor= 0x12d1
    DefaultProduct= 0x1446
    TargetVendor= 0x12d1
    TargetProduct= not set
    TargetClass= not set
    TargetProductList="1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506"
    DetachStorageOnly=0
    HuaweiMode=0
    SierraMode=0
    SonyMode=0
    QisdaMode=0
    GCTMode=0
    KobilMode=0
    SequansMode=0
    MobileActionMode=0
    CiscoMode=0
    MessageEndpoint= not set
    MessageContent="55534243123456780000000000000011062000000100000000000000000000"
    NeedResponse=0
    ResponseEndpoint= not set
    InquireDevice disabled
    Success check enabled, max. wait time 20 seconds
    System integration mode enabled
    Use given bus/device number: 001/007 ...
    Looking for default devices ...
    bus/device number matched
    searching devices, found USB ID 12d1:1446
    found matching vendor ID
    found matching product ID
    adding device
    Found device in default mode, class or configuration (1)
    Skipping the check for the current configuration
    Using first interface: 0x00
    Using endpoints 0x01 (out) and 0x81 (in)
    USB description data (for identification)
    Manufacturer: HUAWEI Technology
    Product: HUAWEI Mobile
    Serial No.: not provided
    Looking for active driver ...
    OK, driver found; name unknown, limitation of libusb1
    OK, driver "unkown" detached
    Setting up communication with interface 0
    Using endpoint 0x01 for message sending ...
    Trying to send message 1 to endpoint 0x01 ...
    libusb:error [op_clear_halt] clear_halt failed error -1 errno 71
    OK, message successfully sent
    Resetting response endpoint 0x81
    Resetting message endpoint 0x01
    Could not reset endpoint (probably harmless): -34
    Device is gone, skipping any further commands
    Bus/dev search active, referring success check to wrapper. Bye.
    ok:busdev
    (end of usb_modeswitch output)
    Checking success of mode switch for max. 20 seconds ...
    Waiting for device file system (1 sec.) ...
    Waiting for device file system (2 sec.) ...
    Waiting for device file system (3 sec.) ...
    Waiting for device file system (15 sec.) ...
    Reading attributes ...
    All attributes matched
    Mode switching was successful, found 12d1:1001 (HUAWEI Technology: HUAWEI Mobile)
    Now checking for newly created ports ...
    new ports found, device is known to driver
    Checking for AVOID_RESET_QUIRK kernel attribute
    AVOID_RESET_QUIRK activated
    All done, exiting
    dmesg output:
    [ 261.611314] usb 1-1.1: USB disconnect, device number 3
    [ 283.800711] usb 1-1.1: new high-speed USB device number 7 using ehci_hcd
    [ 283.899855] scsi11 : usb-storage 1-1.1:1.0
    [ 283.900156] scsi12 : usb-storage 1-1.1:1.1
    [ 284.638710] usb 1-1.1: USB disconnect, device number 7
    [ 300.687875] usb 1-1.1: new high-speed USB device number 8 using ehci_hcd
    [ 300.787664] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0
    [ 300.788085] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1
    [ 300.788450] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2
    [ 300.789174] scsi16 : usb-storage 1-1.1:1.3
    [ 300.790242] scsi17 : usb-storage 1-1.1:1.4
    P.S. I am using NetworkManager 0.9.2.0
    Any Ideas?
    Thanks in advance

    Hello, All!
    I have the following problem:
    When I boot with plugged in usb modem everything is fine.
    If I unplug modem and plug it back it can not be used any more.
    Some logs below.
    1. Modem plugged on boot
    lsusb
    Bus 001 Device 003: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
    usb_modeswitch log:
    USB_ModeSwitch log from Sun Apr 08 23:38:27 CEST 2012
    Raw args from udev: /1-1.1:1.0
    Using global config file: /etc/usb_modeswitch.conf
    Using top device dir /sys/bus/usb/devices/1-1.1
    USB values from sysfs:
    manufacturer HUAWEI Technology
    product HUAWEI Mobile
    serial
    bNumConfigurations is 1 - don't check for active configuration
    SCSI attributes not needed, moving on
    checking config: /usr/share/usb_modeswitch/12d1:1446
    ! matched. Reading config data
    config: TargetVendor set to 12d1
    config: TargetProductList set to 1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506
    Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
    Command to be run:
    usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 9 -v 12d1 -p 1446 -f $configBuffer
    Verbose debug output of usb_modeswitch and libusb follows
    (Note that some USB errors are to be expected in the process)
    Reading long config from command line
    * usb_modeswitch: handle USB devices with multiple modes
    * Version 1.2.1 (C) Josua Dietze 2011
    * Based on libusb0 (0.1.12 and above)
    ! PLEASE REPORT NEW CONFIGURATIONS !
    DefaultVendor= 0x12d1
    DefaultProduct= 0x1446
    TargetVendor= 0x12d1
    TargetProduct= not set
    TargetClass= not set
    TargetProductList="1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506"
    DetachStorageOnly=0
    HuaweiMode=0
    SierraMode=0
    SonyMode=0
    QisdaMode=0
    GCTMode=0
    KobilMode=0
    SequansMode=0
    MobileActionMode=0
    CiscoMode=0
    MessageEndpoint= not set
    MessageContent="55534243123456780000000000000011062000000100000000000000000000"
    NeedResponse=0
    ResponseEndpoint= not set
    InquireDevice disabled
    Success check enabled, max. wait time 20 seconds
    System integration mode enabled
    Use given bus/device number: 001/009 ...
    Looking for default devices ...
    bus/device number matched
    searching devices, found USB ID 12d1:1446
    found matching vendor ID
    found matching product ID
    adding device
    Found device in default mode, class or configuration (1)
    Skipping the check for the current configuration
    Using first interface: 0x00
    Using endpoints 0x01 (out) and 0x81 (in)
    USB description data (for identification)
    Manufacturer: HUAWEI Technology
    Product: HUAWEI Mobile
    Serial No.: not provided
    Looking for active driver ...
    OK, driver found; name unknown, limitation of libusb1
    OK, driver "unkown" detached
    Setting up communication with interface 0
    Using endpoint 0x01 for message sending ...
    Trying to send message 1 to endpoint 0x01 ...
    libusb:error [op_clear_halt] clear_halt failed error -1 errno 71
    OK, message successfully sent
    Resetting response endpoint 0x81
    Resetting message endpoint 0x01
    Could not reset endpoint (probably harmless): -34
    Device is gone, skipping any further commands
    Bus/dev search active, referring success check to wrapper. Bye.
    ok:busdev
    (end of usb_modeswitch output)
    Checking success of mode switch for max. 20 seconds ...
    Waiting for device file system (1 sec.) ...
    Waiting for device file system (2 sec.) ...
    Waiting for device file system (3 sec.) ...
    Waiting for device file system (13 sec.) ...
    Waiting for device file system (14 sec.) ...
    Waiting for device file system (15 sec.) ...
    Reading attributes ...
    All attributes matched
    Mode switching was successful, found 12d1:1001 (HUAWEI Technology: HUAWEI Mobile)
    Now checking for newly created ports ...
    new ports found, device is known to driver
    Checking for AVOID_RESET_QUIRK kernel attribute
    AVOID_RESET_QUIRK activated
    All done, exiting
    2.Modem unplugged and plugged back
    lsusb
    Bus 001 Device 008: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
    usb_modeswitch log:
    USB_ModeSwitch log from Sun Apr 08 23:46:12 CEST 2012
    Raw args from udev: /1-1.1:1.0
    Using global config file: /etc/usb_modeswitch.conf
    Using top device dir /sys/bus/usb/devices/1-1.1
    USB values from sysfs:
    manufacturer HUAWEI Technology
    product HUAWEI Mobile
    serial
    bNumConfigurations is 1 - don't check for active configuration
    SCSI attributes not needed, moving on
    checking config: /usr/share/usb_modeswitch/12d1:1446
    ! matched. Reading config data
    config: TargetVendor set to 12d1
    config: TargetProductList set to 1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506
    Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
    Command to be run:
    usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 7 -v 12d1 -p 1446 -f $configBuffer
    Verbose debug output of usb_modeswitch and libusb follows
    (Note that some USB errors are to be expected in the process)
    Reading long config from command line
    * usb_modeswitch: handle USB devices with multiple modes
    * Version 1.2.1 (C) Josua Dietze 2011
    * Based on libusb0 (0.1.12 and above)
    ! PLEASE REPORT NEW CONFIGURATIONS !
    DefaultVendor= 0x12d1
    DefaultProduct= 0x1446
    TargetVendor= 0x12d1
    TargetProduct= not set
    TargetClass= not set
    TargetProductList="1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506"
    DetachStorageOnly=0
    HuaweiMode=0
    SierraMode=0
    SonyMode=0
    QisdaMode=0
    GCTMode=0
    KobilMode=0
    SequansMode=0
    MobileActionMode=0
    CiscoMode=0
    MessageEndpoint= not set
    MessageContent="55534243123456780000000000000011062000000100000000000000000000"
    NeedResponse=0
    ResponseEndpoint= not set
    InquireDevice disabled
    Success check enabled, max. wait time 20 seconds
    System integration mode enabled
    Use given bus/device number: 001/007 ...
    Looking for default devices ...
    bus/device number matched
    searching devices, found USB ID 12d1:1446
    found matching vendor ID
    found matching product ID
    adding device
    Found device in default mode, class or configuration (1)
    Skipping the check for the current configuration
    Using first interface: 0x00
    Using endpoints 0x01 (out) and 0x81 (in)
    USB description data (for identification)
    Manufacturer: HUAWEI Technology
    Product: HUAWEI Mobile
    Serial No.: not provided
    Looking for active driver ...
    OK, driver found; name unknown, limitation of libusb1
    OK, driver "unkown" detached
    Setting up communication with interface 0
    Using endpoint 0x01 for message sending ...
    Trying to send message 1 to endpoint 0x01 ...
    libusb:error [op_clear_halt] clear_halt failed error -1 errno 71
    OK, message successfully sent
    Resetting response endpoint 0x81
    Resetting message endpoint 0x01
    Could not reset endpoint (probably harmless): -34
    Device is gone, skipping any further commands
    Bus/dev search active, referring success check to wrapper. Bye.
    ok:busdev
    (end of usb_modeswitch output)
    Checking success of mode switch for max. 20 seconds ...
    Waiting for device file system (1 sec.) ...
    Waiting for device file system (2 sec.) ...
    Waiting for device file system (3 sec.) ...
    Waiting for device file system (15 sec.) ...
    Reading attributes ...
    All attributes matched
    Mode switching was successful, found 12d1:1001 (HUAWEI Technology: HUAWEI Mobile)
    Now checking for newly created ports ...
    new ports found, device is known to driver
    Checking for AVOID_RESET_QUIRK kernel attribute
    AVOID_RESET_QUIRK activated
    All done, exiting
    dmesg output:
    [ 261.611314] usb 1-1.1: USB disconnect, device number 3
    [ 283.800711] usb 1-1.1: new high-speed USB device number 7 using ehci_hcd
    [ 283.899855] scsi11 : usb-storage 1-1.1:1.0
    [ 283.900156] scsi12 : usb-storage 1-1.1:1.1
    [ 284.638710] usb 1-1.1: USB disconnect, device number 7
    [ 300.687875] usb 1-1.1: new high-speed USB device number 8 using ehci_hcd
    [ 300.787664] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0
    [ 300.788085] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1
    [ 300.788450] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2
    [ 300.789174] scsi16 : usb-storage 1-1.1:1.3
    [ 300.790242] scsi17 : usb-storage 1-1.1:1.4
    P.S. I am using NetworkManager 0.9.2.0
    Any Ideas?
    Thanks in advance

  • Faxing with Apple USB Modem (external) - Can you do it?

    I bought the new iMac G5 with built in iSight BUT no built in Modem. Apple offers a USB Modem and it says you can fax BUT one of the posts said they could NOT fax. Has anyone successfully sent and received faxes using the Apple USB Modem preferably from a new iMac?

    The following appeared in yesterday's MacInTouch.com column:
    Chuck Counselman sent a follow-up to his Nov. 16 note about faxing with Apple's new USB external modem:
    I've since solved the problem. Now my Apple USB Modem not only sends and receives faxes; it also dials into Earthlink and makes a PPP connection to the Internet. For others' possible benefit, here is a description of what I did that worked. I don't know how much of what I did was necessary.
    In System Preferences > Network, I defined a new Location (which I named "USB Modem," but the name is not important). In the "Show" pop-up menu, I chose "External Modem." Under the "PPP" tab I entered my Service Provider's name, my Account Name and Password, and primary and alternate telephone numbers for my ISP's modem pools; and I clicked "Apply Now." Under the "TCP/IP" tab, in the "Configure IPv4" menu, I left the default choice "Using PPP" unchanged. Under the "Modem" tab, in the "Modem" menu, I chose "Apple External 56K Modem (v.92)"; I left the other default choices unchanged; and I clicked "Apply Now". Then I closed System Preferences.
    Via the data-modem menu in the OS menu bar, I chose "Connect," and was pleased to hear and see the familiar sounds and sights of a dial-up connection. I surfed the web for a couple of minutes just to test the connection; it was fine.
    In System Preferences > Print & Fax, under the "Faxing" tab I had already entered my fax number and a "Save to" folder name. Now I clicked the "Set Up Fax Modem" button. A day earlier, clicking this button had gotten me an empty "Fax List" window. Now it got me a "Fax List" window containing one entry with the name "External Modem."
    And now the Apple USB Modem answered calls, received faxes, and saved them in the folder I'd designated. Now I could send faxes, too, following the instructions in the OS Help.
    I returned to my original Location, where my Network connection was via Airport, not via the USB modem. Now, in the data-modem menu in the OS Menu Bar, the "Connect" command was grayed out (as expected). However, the USB modem continued to function for faxing.

  • USB Modem no longer working on MacBook

    I have been using my Virgin Broadband (Huawei E169) USB modem with my MacBook for the last twelve months. Apart from a huge hiccup when I upgraded to Snow Leopard it has worked flawlessly. Recently I had to restore my MacBook from my Time Capsule as it refused to boot up, and since then I've not been able to use my USB wireless modem. It works fine on my iMac and on my Son's PC Dell Laptop.
    When I try to connect, I either get a message that says 'unable to connect to PPP server' or I the 'auto open' closes immediately and I get a huge error report. I have copied the report if anyone is interested, I'll include it on a future post.
    I've rung my ISP and Apple Care and have had no success. I've tried a friend's USB modem, and was unable to get it to connect, I also tried mine on her MacBook and got the same errors as on my MacBook.
    At this point, I have also checked that I have the latest Mobile Connect and the latest firmware, and have compared files with those on my iMac, and I cannot find the discrepancy. I still don't know whether my MacBook is at fault of the USB device itself. I am loathe to buy a new USB modem, until I know for sure. I don't know what to try next though.
    Thank you.

    The irony of this problem is that I solved it using a post from here which I'd copied from Whirlpool last year. I'd gone through every solution taht I could find, several times over an in the end used this one which worked perfectly. It was actually my last resort, I'd run out of options. Thought I'd best post back here, just in case someone else has an issue.
    This post was found @ www.whirlpoo.net.au by Designed. The OP posted this solution
    Thought this was important and needed to be posted here too. I'm up and running again, and very very happy
    The solution I found to work is :
    1. Open up Terminal.
    2. Become root using sudo -i (using your user account password when prompted)
    3. Paste the following command in: echo "refuse-chap\nrefuse-mschap\nrefuse-mschap-v2" >> /etc/ppp/options
    Next Step
    Plug in the device, when the disk image mounts, right click on the app and choose 'show package contents'
    Navigate through contents -> resources -> and run the MobileConnect_DrvApp.pkg
    Reboot
    Then in system prefs -> network
    you will see HUAWEI Mobile (not connected)
    Add the following settings
    telephone number : *99#
    account name : VirginBroadBand
    password : VirginBroadBand
    TICKED Show Modem status in menu bar
    I didn't have to change any advanced settings, but to confim them
    (In Advanaced Settings)
    Vendor : Generic
    Model : Dialup Device
    TICKED Enable Error correction and comptession in modem
    Dial Mode: Wait for dial tone before dialing
    Dialing TICKED Tone
    Sound TICKED On
    Now I connect via the icon in the status menu
    Thanks to the following sources of info:
    /forum-replies.cfm?t=1270696#r10
    http://discussions.apple.com/thread.jspa?messageID=10071673&#10071673

  • External USB Modem fax not working under 10.5.8

    I upgraded my Mac Mini home office server (print, fax, backup) to 10.5.8 and now it appears that faxing is completely broken (or maybe the USB modem driver.)
    I've verified that this is broken on another system.
    After booting, the following is seen in the fax log:
    efax: 33:57 command "+FAR=1"
    efax: 33:57 waiting 5.0 s
    efax: 33:57 .956 [<CR><LF>ERROR<CR><LF>]
    efax: 33:57 response "ERROR"
    efax: 33:58 command "S0=1"
    efax: 33:58 waiting 5.0 s
    efax: 33:58 .157 [<CR><LF>OK<CR><LF>]
    efax: 33:58 response "OK"
    efax: 33:58 waiting for activity
    efax: 33:59 activity detected
    efax: 34:00 Error: tcsetattr on fd=5 failed: Invalid argument
    efax: 34:00 Error: tcsetattr on fd=5 failed: Invalid argument
    efax: 34:00 command "Q0V1"
    efax: 34:00 Error: fax device write: Input/output error
    efax: 34:00 waiting 2.0 s
    efax: 34:00 waiting 2.0 s
    efax: 34:00 command "Q0V1"
    efax: 34:00 Error: fax device write: Input/output error
    efax: 34:00 waiting 2.0 s
    efax: 34:00 sync: dropping DTR
    efax: 34:00 Error: tcsetattr on fd=5 failed: Invalid argument
    efax: 34:00 Error: tcsetattr on fd=5 failed: Invalid argument
    efax: 34:00 Error: tcsetattr on fd=5 failed: Invalid argument
    efax: 34:00 waiting 2.0 s
    efax: 34:00 command "Q0V1"
    efax: 34:00 Error: fax device write: Input/output error
    efax: 34:00 waiting 2.0 s
    efax: 34:00 sync: sending escapes
    efax: 34:00 Error: tcsetattr on fd=5 failed: Invalid argument
    efax: 34:00 Error: fax device write: Input/output error
    efax: 34:00 Error: fax device write: Input/output error
    efax: 34:00 Error: tcsetattr on fd=5 failed: Invalid argument
    efax: 34:00 Error: fax device write: Input/output error
    efax: 34:00 Error: fax device write: Input/output error
    efax: 34:02 Error: fax device write: Input/output error
    efax: 34:02 waiting 2.0 s
    efax: 34:02 command "Q0V1"
    efax: 34:02 Error: fax device write: Input/output error
    efax: 34:02 waiting 2.0 s
    efax: 34:02 Error: sync: modem not responding
    efax: 34:03 done, returning 2 (unrecoverable error)
    Anybody else seeing this?

    This solution is a "workaround" and will not affect in any problems, like I saw that they will happen after:
    1.) Removing and changing "IOSerialFamily.kext" : ("The system extension '/System/Library/Extensions/IOSerialFamily.kext' was installed improperly and cannot be used....")
    2.) or go back to OS 10.5.5... (latest security-updates not included)
    Go to your System-Prefs -> Printing and Faxing
    chose the Fax-Modem -> Options
    1.) to receive faxes: choose "receive faxes on this computer"
    2.) to send faxes: choose not to "receive faxes on this computer",
    plug your modem out, wait 5 seconds and plug it in.
    Now you can send faxes, but not receive,
    before you choose "receive faxes on this computer" again.
    To send, you have to start with 2.) again...
    It's strange for a mac, but better than 10.5.5 or a corrupted system...
    APPLE-STUFF: HERE AGAIN: FIX THAT FAX-PROBLEM FOR 10.5.8 QUICK PLEASE - IT'S IMPORTANT!!!
    trollius

  • HylaFax on OS X 10.4.7 Working with internal modem but not USB Modem

    I have managed to configure and install HylaFax on a powerbook G4 with an internal fax/modem.
    Only a couple of hangups to get that configuration to work.
    As per the prerequisites outline here:HylaFax Prerequisites
    You need the Xcode tools to use it's compiler.
    The only other thing you may not have is:
    libtiff
    ghostscript
    If you are running an x-serve you probably already have an MTA as well (postfix)
    There are someOS X Specific install instructions of which I only had to follow the first couple, to create a user. Some of the latter instructions I found unecessary since startup is handled by launchd as far as I understand.
    Before I compiled I had to put the hylafax source on a thumb drive, I know it seems wierd, but it worked. Something to do with the HFS+ format of the hard drive. But low and behold it worked. (the hylafax website mentions issues with other disk formatting besides UFS, but the fat32 formatted thumb drive worked for me)
    A little side note:
    You need to actually download the ghostscript fonts from the ghostscript project FTP site and mv them to the proper location:
    /usr/local/share/ghostscript/8.54/fonts/
    Once installed run:
    /usr/local/sbin/faxsetup
    It should prompt you to install your modems.
    After doing this I had to start hylafax
    #sudo /usr/local/sbin/hylfax start
    and run a faxgetty command to enable incomming and outgoing
    #sudo /usr/local/sbin/faxgetty ttys.modem
    After doing so I was able to receive faxes and open them up with a pdf viewer, as well as send faxes via an application or printer driver on the mac and PC (windows xp with win hylafax print) Super SIMPLE! which is great for end users.
    Okay so here is why I am actually posting on here. It is great that I got this working, but the final configuration will be on an x-serve that has no internal modem, and I would like to use more than one modem in case of high traffic incoming and outgoing. I purchased 2 apple usb fax/modems and when running faxaddmodem it even recognizes the modem, but never is fully able to use it like the internal modem. If anyone has any insight it would be great.
    The issue I am seeing is that when I run
    /usr/local/bin/faxstat -s
    The modem says Waiting for modem to come ready
    Thanks!

    Just wanted to say I got hylafax to work with a usb modem on a powerbook, not sure if it's stable and user friendly enough to be used my a wide base here, but it's definitely cool, and it does work. I just wish it had LDAP/mysql integration, instead of the flat file business it has.
    Anybody with any input on hylafax would be great.

  • Intel Mac mini as a faxserver with more then one USB-Modems?

    Hi there,
    does anybody have a clue if this idea will work?
    We plan to buy a Intel Mac mini and someone had the idea to use it additionally as a faxserver - BUT, we'll need more the one fax-line. So, I wonder if it is possible to buy 3 or even 4 external USB-Modem from Apple to use all of them.
    Does anyone tried this before?
    Any comments are welcome!
    Thanks in advance, Chris.
    Mac mini Core Duo, 2GB, 120GB Mac OS X (10.4.5)

    Hello Chris,
    incl. a four line fax-card. Why isn't it a good
    choice?
    From my experience the Mac's make a terrible fax machine.
    I have tried receiving faxes with a 1.8 GHz iMac G5 (with built-in modem), a 2.0 GHz iMac G5 (with built-in modem), and my 1.25 GHz Mac Mini (with built-in modem).
    In every single case, and experiment, they dropped the fax after the first page.
    So, that means that I've gone round and round trying to get beyond the first page received without trouble.
    I do have a real fax machine, and never have any trouble receiving faxes on the same line with it. So, I only use the computer as a fax when I want to only receive the first page (for example the many local doctors who send me their customers private details).
    In the case of the doctors, my phone rings frequently with customer's private details. All I want is the first page so I can call the doctor and tell them to quit sending me faxes.
    They will send, send, and re-send until a fax machine answers. It keeps the phone busy all day if I don't receive the fax.
    But, it costs money to receive the 30-page faxes just to stop the phone ringing. So, I let the computer capture the first page, and then call them and demand that they quit calling me (which works for a couple of days).
    You wouldn't believe the information they have sent me. And, with an older doner-film fax, a 30-page document is mighty expensive.
    What really gets me, is when they had the nerve to request me to invest even more money and pay to mail the fax back to them. I tell them their free to drive here and get it, otherwise, it's going in the garbage.
    I can tell you from experience, that your medical records are not safe with a doctor. They just assume they are dialing the right number, and will send your entire personal history (and even family history - I've received generations of information) to just about anyone with a fax machine.
    Anyway, now that I explained how I use mine, I hope you can better understand why a real fax machine is going to serve you better.
    The tolerance of a real fax machine will prevent you from constantly trying to receive the same fax over and over and over again.

  • How to use 3110 as a usb modem in Mac

    I use 3110 as a usb modem in my Mac,but it can't work,the Mac can find two usb modem when I plug my 3110,each can't work,I see the log find my modem no responses for the AT command,so it can't work,my phone is good,beacuse I can use it in Windows as usb modem, and I also can use bluetooth modem in Mac,after modify isyn ,I can use isyn when i use bluetooth but can't work when i use usb cable,and I hope i can use usb modem ,is anybody use 3110 as usb modem?thank's your help!

    Hi,
    Listed below is the step by step intructions to configure the Nokia device as a modem to a mac.
    Steps:
    Connecting your Mac to the internet is convenient and easy with your a compatible Nokia S60 device. You'll need a Nokia S60 device that supports a 2G or 3G data connection (such as GPRS or HSDPA), a compatible Mac (with the latest OS X), a USB cable for your Nokia device or a Bluetooth-enabled Mac, and a network subscription with your mobile service provider.
    To set up your device you'll need to know your operator's Access Point Name (APN) and have the packet data service enabled. For help with this please contact your operator.
    In Settings select and open Connection >Select and open Packet data > Select and open Access point >Type in your operator's Access Point Name
    Exit Settings. Your device is now ready to be used as a modem for your Mac!
    Bluetooth Connection: Pairing between Mac and Device using bluetooth, follow the instruction from here: http://europe.nokia.com/get-support-and-software/download-software/device-as-a-modem/connect-to-your...
    Note: Preferred mode is USB as it much faster than Bluetooth.
    Connect the device and then go to System preferences- >Network- >Select Device (Nokia XXX)
    Click on Advanced Tab > Modem tab
    - Vendor : Nokia
    -Model:GPRS (GSM/3G)
    -Telephone Number: *99***1# (contact your operator to get this settings)
    -APN: airtelgprs.com (contact your operator to get this settings)
    CID: 1
    Once connected it will be highlighted in green.
    Hopefully this helps.
    Cheers
    Sandy
    Message Edited by sandy2410 on 30-Mar-2009 04:52 AM
    Helpful information, then dont forget to hit the kudos star :-) Or say it accepted solution and thanks

  • Nokia 6120 Classic USB Modem is not working proper...

    Hello everybody!
    Something strange happened last week with my Nokia 6120 Classic (version: 03.83). I regularly use it as a USB modem and last week's Wednesday it stopped working. What the problem really is due to, is hard for me to say precisely.
    Using Windows Vista (Business, x64, SP1) "Connect to" function, I have previously connected to using HSDPA, but after last week the following happens:
    Starts with "Dialing" then goes to showing status "Verifying user name and password" for less than a second after which Vista informs that "Failed to connect to..." and the phone shows the 3G symbol with dashed arrows below.
    I've tried the following:
    - reinstalling PC Suite (the latest, greatest version)
    - reinstalling the modem drivers (between Nokia USB modem and 6120 USB modem) using the whole reboot thing
    - using another USB port, which doesn't work since Device Manager reports that the driver can't start properly
    - restarting, cold resetting the phone
    - switching to GSM only
    - testing with another computer running SP1
    - removing modem init commands for the Internet connection
    Now, the strange thing with the second computer was that everything worked just fine with it. My computer on the other hand didn't work at all!
    I've put the modem communication logs from the working computer here:
    http://docs.google.com/Doc?id=ah8pw9pjrf55_12g38wqpdt
    And the modem communication logs from my non-working computer here:
    http://docs.google.com/Doc?id=ah8pw9pjrf55_11hjcq39g4
    What was interesting on my computer is the "NO CARRIER" line which makes no sense to me: why on earth is it starting to check for a carrier signal all of the sudden??
    Any tips with this here dilemma would be greatly appreciated.
    Message Edited by manywhere on 18-Feb-2008 09:47 AM

    I tried using a Nokia E90 and connecting to the net using both PC Suite's "Connect to the Internet" and using Windows´ "Connect to" programs. With the E90, I had the same problems: fails at "Verifying user name and password" and the strange looking modem communications log.
    What the heck is going on with my Windows installation here? I tried removing the drivers again, repairing PC suite and restarting the computer, but to no avail.

  • Macbook cannot detect D-Link DWM-156(A7) USB modem after upgrading to OS X Yosemite ver 10.10

    Hi
    My MacBook Pro 13" is unable to detect D-Link DWM-156(A7) USB modem once I open the D-Link Connection Manager app (to connect to the internet) even though the USB is plugged in.
    The MacBook is able to detect the USB at first, but once after I open the D-Link Connection Manger, it can no longer detect the USB Modem and a notification which says "No USB Modem Connected" pops up.
    This problem only surfaced after I upgraded the Macbook to OS X Yosemite ver 10.10. I tried to solve the problem by restarting the Mac but the same problem still arise.
    What do i do?
    Thanks in advance.
    Regards

    I figured it out!
    I had the same problem with the dongle sent to me by Telkom South Africa.
    Mine was D-Link Model: DWM-157. Here's how I fixed it.
    I basically flashed or updated the firmware on the dongle to the latest one I got from the D-Link website.
    1. You need access to a PC (Windows computer).
    2. Go to: http://www.dlink.com/uk/en/support/product/dwm-157-3g-hspa-plus-usb-adapter
    3. Scroll down and download firmware version 4.5.4.7
    4. Once download is complete, move over to your windows PC. Plug in the D-Link USB dongle.
    5. Run the firmware update on the Windows PC while the USB Dongle is plugged, Follow the prompts, it takes a little while, sometimes it seems like it is stuck but be patient. Once its done it will ask you to press any key to continue.
    6. After the install, pull out the dongle and plug it back in, sometimes the device installation prompt will appear. If so, rerun the device installation again. Wait for all the drivers to install. If not open d-link connection manager on your windows PC and test if it is able to make a connection to the internet. If the test was successful go to #7 below.
    7. Go to your Mac. Uninstall the current D-Link connection manager your have.
    8. Plug the USB Dongle back, the installation prompt will pop up again.
    9. Go through the installation steps and a prompt will pop up asking you to restart, restart your machine.
    10. Run D-Link connection manager and you can now get to the connection screen. Wait a while for network to be found.
    11. Click connect.
    12. Come back here and tell us if this worked for you. It certainly worked for me.

  • Macbook Pro + Virgin Mobile USB Modem + WiFi Time Capsule = No Internet :(

    Helping a friend with this. Can connect to Internet OK w Virgin Mobile USB modem. When he then connects to Time Capsule via WiFi, the Internet stops working. Turn off WiFi and it starts working again.
    I looked at the routing tables and both interfaces are set as default. I disabled default on the WiFi interface but had no effect. Here is the output of the netstat -rn command. If anyone has any insight it would be appreciated.
    Internet:
    Destination        Gateway            Flags        Refs      Use   Netif Expire
    default            68.28.49.71        UGScI          10        0    ppp1
    10.0.1/24          link#5             UCS             8        0     en1
    10.0.1.1           0:24:36:a3:d5:da   UHLWI           0        1     en1   1149
    10.0.1.2           127.0.0.1          UHS             1        4     lo0
    10.0.1.255         ff:ff:ff:ff:ff:ff  UHLWbI          3       33     en1
    127                127.0.0.1          UCS             0        0     lo0
    127.0.0.1          127.0.0.1          UH              0      130     lo0
    169.254            link#5             UCS             0        0     en1

    What's the ordering of the interfaces in System Preferences : Network? My first guess would be it's favouring the wifi by default so you will need to change the ordering.

  • Apple USB Modem 56K

    Hello Friends
    Now 2 days ago the update of Snow Leopard 10.6.3 released, but once again WITHOUT a 64-bit drivers for the original Apple USB 56K Modem. Can anyone say whether there's what is planned? I have often professionally faxes by modem to send and receive.
    With the 32-bit mode of the 10.6.3 is the USB modem without any problems. But since I mainly use the 64 bit mode, which is effective, it would be nice here can also send faxes using the USB modem.
    Someone has a tip, whether it alternetaiven a driver (kext) for the USB modem for 64-bit there?
    Thanks Info for this.
    Fritz122

    Hi there, I jut bought an Apple USB modem on eBay bnib. It works intermittently with my Snow Leopard Server, Mac Mini. I just get the first inch of the received fax. This is painful as it is such a simple and normal solution for a small business sever.
    I spoke to AppleCare who were unaware on any issues. I sent the modem back for a replacement and have the same problem.
    What do I do? Buy a Zoom Model 3095 V.92 USB Mini External Modem, trail a wire across my studio to an HP Fax Printer.
    Come on Apple, please fix this.
    Drew

  • USB modem won't work with Panther

    My girlfriend has a black G3 powerbook and uses a Speedtouch 330 USB modem successfully on OS9. However I have also installed Panther 10.3.9 and installed the Speedtouch Panther driver update from their site but when I open the Network preferences panel Speedtouch USB does not come up as an option.
    If I go to the list of modems it is there but if I select it it still doesn't work.
    In the past I have used a USB modem with my G4 and Panther and after installing the driver it immediately appeared as a new connection option called Speedtouch USB and it worked fine.
    I have tried reinstalling the driver several times. I have spoken to Apple and I have spoken to Speedtouch with no result.
    I can only assume that it is something to do with the black G3 compatibility.
    I have done a test with her powerbook in Panther and plugged in my ethernet router and it works fine.
    But these routers are quite expensive and it bugs me... why won't Panther recognise the USB driver?
    Any suggestions please ?
    thanks
    Pete
    London, UK

    My westell modem is very flakey and will often reset its connection from PPOE to bridge all by itself. From what I read on the web, setting the westell to bridge is the way to go since it allows the router to actually route. But, for me it only works when sent to PPOE. That means that the westell is both a modem and DNS/NAT router so I disabled those capabilities in airport. The verizon dslstart.verizon.com has some help on how to do this. search on westell 6100.

  • No carrier in UK on Apple USB modem

    Is there a special trick needed to connect the Apple USB modem to a UK phone socket to get a signal? OS X reports 'no carrier' although dial tone can be heard through phone OK.
    The Apple USB modem has a US-style socket (with two pins in use inside) and the UK-style wall socket is a different shape and has 4 pins to choose from. Perhaps I need to make sure the correct two UK pins are being used?
    Would be greateful for any help.

    Try adding this to your Moidem Script...
    &Gn Guard tone selection (used only when in CCITT modes)
    n=0, no guard tones
    n=1, 550 Hz guard tone
    n=2, 1800 Hz guard tone
    This command need never be used when communicating over U.S. phone lines. Outside the U.S. the modem may need to generate an additional tone, along with its carrier, to disable echo suppressors in the central office. The guard tone varies by country.
    Or maybe even this one...
    &Jn Telephone jack selection
    n=0, RJ-11/RJ-41S/RJ-45S
    n=1, RJ-12/RJ-13

  • Cannot send faxes w/ Apple USB modem, can you offer some help please?

    Hi,
    I am using the Apple USB modem connected to my brand new MacBook and so far could not send any faxes. The modem is working because I was able to receive 1 fax (which I sent to myself from my Nokia 9300i).
    The monitor tells me that: dialing... ok, connecting...ok, sending... and then it fails.
    On the other side (my Nokia 9300i) the fax is starting to come in but shortly thereafter it stops.
    I tried Apple Fax (embbedded in the OS) and also PageSender v.4 with the same results.
    Anyone of you can offer any suggestion/help as to why this is happening?
    Thanks

    I have always believed that the answer to this is yes, however, I have never had occasion to test it. In the past when we all used dialup it was either/or, because you couldn't fax with the same modem you were using to connect to an ISP at the same time. But since you are configuring internet through one network and faxing through another, it should work. Maybe someone actually doing it will wade in here.
    Of course, there are a lot of efax services out there now that let you send and receive faxes through the internet.

Maybe you are looking for