Menu

ATH0 issue

Help
2019-12-02
2019-12-26
  • Alessandro Russo

    Hi, I'm trying to make a call blocker with rpi but I've an issue when it comes to hang up. I've tried the ATH0 or ATH command but the lines remains up. If I give the command with minicom or putty (on windows) the behaviour is the same. I made some tests: If I make a call with the ATD command and then use ATH0 it ends the call; if I use the ATH1 command the line is busy but is I use the ATH0 the line returns free. What I'm missing?

    Thanks

    Modem US Robotics USB
    RPI or Win10
    analog line out from a modem router with GPON technology

     
  • Ed Attfield

    Ed Attfield - 2019-12-02

    I use NCID on a raspberry Pi to do call blocking. It has the ability to call my own external hangup scripts to decide when to hang up on the caller. You might want to explore this option further.

    To do a simple hangup in your own software, send ATH1 to pick up the call, wait a few seconds and then send ATH0.

     
  • Alessandro Russo

    Yes I can try but I use putty or minicom to send the ATH0 but it takes no results

     
  • Ed Attfield

    Ed Attfield - 2019-12-02

    With minicom, you should always see an OK return from the modem after ATH0.
    Perhaps it is talking to the wrong tty device?

    Watch the kernel log with "tail -f /var/log/kern.log" as you unplug the modem from the Pi and plug it in again. The log will show what tty device name is assigned, perhaps ttyACM0

    [ 4.336267] usb 2-9: new full-speed USB device number 5 using ohci-pci
    [ 4.591251] usb 2-9: New USB device found, idVendor=0572, idProduct=1340
    [ 4.591253] usb 2-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 4.591255] usb 2-9: Product: USB Modem
    [ 4.591256] usb 2-9: Manufacturer: Conexant
    [ 4.591257] usb 2-9: SerialNumber: 12345678
    [ 7.871088] cdc_acm 2-9:1.0: ttyACM2: USB ACM device

    Then you can run "minicom -s" to start in setup mode and configure the device name. ("Exit" will then start a minicom session.)

    In the minicom session, type AT (enter) until it says OK.

     
  • Alessandro Russo

    I'm sure that I'm using the right tty port because the ATH1 or ATD commands works weel. The ATH0 command works well after the ATD for example...

     
  • Ed Attfield

    Ed Attfield - 2019-12-02

    I must be misunderstanding something here.

    Could you give the complete sequence of what you are sending to the modem with minicom, what it is sending back, and what you are expecting to happen at each step?

     
  • Alessandro Russo

    These is the output of dmesg:
    [ 5.301523] cdc_acm 1-1.3:2.0: ttyACM0: USB ACM device
    [ 5.302462] usbcore: registered new interface driver cdc_acm
    [ 5.302473] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

    These is the minicom session:
    Welcome to minicom 2.7.1 OPTIONS: I18n Compiled on Aug 13 2017, 15:25:34. Port /dev/ttyACM0, 19:54:17
    Press CTRL-A Z for help on special keys

    RING
    ATH1
    RING

    OK
    ATH0
    OK

    After the ATH0 the line remains active

     
  • Alessandro Russo

    If I use ATD<number> the modem makes a call
    during the ring phase if I send ATH0 command the modem hangs up with NO CARRIER message</number>

     
  • Ed Attfield

    Ed Attfield - 2019-12-02

    With the second RING arriving after the ATH1 and before the OK, I'm thinking that there may not have been enough time allowed between the ATH1/OK and the sending of ATH0.
    NCID sends AT, waits for OK, then sends ATH1, waits for OK, then waits 2 seconds for the phone system to notice before sending ATH0.

     
  • Alessandro Russo

    I wait 10sec befaore ath1 and ath0

     
  • Ed Attfield

    Ed Attfield - 2019-12-02

    I'm out of suggestions. Perhaps there is something wrong with your modem.

     
  • Alessandro Russo

    I wrote to the usr support...I hope to receive an answer

     
  • Alessandro Russo

    No, Is still not working...may be there some incompatiblity with the line (GPIO modem)? It is strange that if I use atd to make a call from the modem I'm able to hang up with ath0

     
  • Alessandro Russo

    So I make some test and the problem is the line/modem....I'm not able to hang-up neither from the phone

     
  • Alessandro Russo

    So the problem is that the voip of my carrier is set to not hang up when I put down the phone and has a time-out of 60s. So everything is working from my side and now I'ìve a working ncid raspi.

    Thanks to all
    Alex

     
  • Todd Andrews

    Todd Andrews - 2019-12-19

    Hi Alessandro,

    Glad you got it working and thanks for letting us know. In case someone else runs into this same issue, can you tell us the name of your carrier? Is the time-out something you're able to change (if so, can you provide specific instructions) or do you just have to live with it?

     
  • Alessandro Russo

    Hi,
    sure!
    Carrier: Fastweb IT
    Time-out: 60sec based on experience and not officially confirmed, I'm not able to change it and is not configured in the modem they provide.
    The official answer is: You have to live with it

    Thanks

     

Log in to post a comment.