Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Something really ancient - a modem / pyserial
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Sat Mar 25, 2017 7:37 pm    Post subject: Something really ancient - a modem / pyserial Reply with quote

Really all I really want is a "demon dialer", at the moment. In a week I'm going to be trying to make a call to a very busy number, and I'd like my computer to do most of the work for me, letting me know when it gets through.

I dug into the boxes, and have two modems. One is a good old US Robotic 33.6 hardware modem - but my current computer doesn't have a serial port. The other is my late mother's "Best Data V.92 56k USB" modem. The latter is plugged in and dmesg says:
Code:
[26806.792511] usb 2-1: USB disconnect, device number 2
[30262.663841] usb 9-5: new full-speed USB device number 8 using ohci-pci
[30262.840697] usb 9-5: New USB device found, idVendor=0572, idProduct=1301
[30262.840702] usb 9-5: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[30262.840705] usb 9-5: Product: HSF USB V.90 Data/Fax Modem
[30262.840707] usb 9-5: Manufacturer: Conexant Systems, Inc.
[30262.840709] usb 9-5: SerialNumber: 00000001

If I do "ls -l /dev", tty12 has a new time-date stamp, but is currently root-only, no group access. I've installed pyserial and minicom, but am unsure where to go from here. Perhaps the odd and confusing thing is the fact that tty12 has no access for the "tty" group, as the other ttys do. It also seems to get updated every so often, so I'm not sure how well chmod or chgrp would stick.

The web page says that this is a hardware modem, not a winmodem. I have "CONFIG_USB_ACM=m", but it's not currently loaded. Manually loading cdc-acm issues a message, but unplugging and replugging the modem does nothing different.

There is certainly more stumbling to do here, but if anyone has pointers, I'm interested.
_________________
.sigs waste space and bandwidth


Last edited by depontius on Fri Mar 31, 2017 1:19 am; edited 1 time in total
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 501

PostPosted: Sat Mar 25, 2017 7:55 pm    Post subject: Re: Something really ancient - a modem Reply with quote

What happens if you do the following:
Code:
insmod cdc_acm
echo 0x0572 0x1301 > /sys/bus/usb/drivers/cdc_acm/new_id


?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43210
Location: 56N 3W

PostPosted: Sat Mar 25, 2017 7:59 pm    Post subject: Reply with quote

depontius,

There are two bad signs it dmesg there. HSF and Conexant.
I'm fairly sure HSF means its a software modem.

I don't see it picking up a driver either. (3rd bad sign?)
Its one of the linuxant modems.

I'm surprised that page is still around. I hope the driver works with modern kernels.
When you get the fake serial port to talk to, point minicom at it and type AT (not case sensitive).
When all is well, the modem will respond Ok.

-- edit --

The driver page says it works with the 2.6.9 kernel.

-- edit 2 --

Ahh ... I remember that.
www.linuxant.com/drivers/ wrote:
Because the scope of this project has grown beyond the capacity of a single volunteer and legal issues prevent us from using a classic open-source development model, the HCF and HSF drivers are now available in two editions:
a free version (limited to 14.4Kbps data), available at no cost. Please use it to test if your hardware is compatible.

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.


Last edited by NeddySeagoon on Sat Mar 25, 2017 8:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5762

PostPosted: Sat Mar 25, 2017 8:19 pm    Post subject: Reply with quote

NeddySeagoon wrote:
depontius,

There are two bad signs it dmesg there. HSF and Conexant.
I'm fairly sure HSF means its a software modem.

I recognise those three letters too. Maybe you'll get lucky and the USB interface will protect you from the horrors within. If all you're doing is dialling numbers it might work, since you can't do much else with those.

Finding a USB-serial adapter for the real modem would probably be a better idea.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Sat Mar 25, 2017 8:57 pm    Post subject: Re: Something really ancient - a modem Reply with quote

roarinelk wrote:
What happens if you do the following:
Code:
insmod cdc_acm
echo 0x0572 0x1301 > /sys/bus/usb/drivers/cdc_acm/new_id


?

Code:
[44246.952086] cdc_acm 9-5:1.0: Zero length descriptor references
[44246.952096] cdc_acm: probe of 9-5:1.0 failed with error -22
[44246.952168] cdc_acm 9-5:1.1: ttyACM0: USB ACM device


Rather weird, the web page I found suggests that it's a real hardware modem, but the HSF it reports says otherwise.

I'll have to take a look at the Linuxant drivers. Though I've been signing my kernels for a while, and am not sure what is involved in signing an out-of-kernel module. No big problem, just an annoyance. We'll also have to see how it does with a new kernel.

Might need to look for a USB/serial adapter. Problem is that I need to be demon dialing Saturday morning, so that might mean Staples or Best Buy. I guess Amazon Prime would get it here in time, too. Probably not standard Newegg.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43210
Location: 56N 3W

PostPosted: Sat Mar 25, 2017 9:14 pm    Post subject: Reply with quote

depontius,

You only care about the Hayes command set and auto dialer. You won't be sending any data .. you hope.

If /dev/ttyACM0 actually exists and belongs to the modem, point minicom at it and try
Code:
ATZ
wait for the Ok response
ATDT<phone_number>


Thats reset and tone dial <phone_number>.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Sun Mar 26, 2017 5:32 pm    Post subject: Reply with quote

No /dev/ttyACM0. Despite what the web page said, the HSF on dmesg makes it quite clear that this is a winmodem, in spite of only being USB1. I did download the conexant drivers, and those are toast. They were done against kernels 2.4 or 2.6, and at the moment it looks like they won't go against 4.x. I dislike stuff like "run cnstinstall.run" as root. I know I need to be root to actually install, but I'd rather minimize the time as root, and not do the whole thing that way - including authenticating as root in a firefox session.

Anyway, I used --keep and --target, and got the stuff somewhere where I could look for it. I had to download the actual drivers - which also wanted me to do the whole process as root. I then found the source code to the module and simply tried "make" against it. It failed to find "asm/system.h". ISTR in the past few years that the kernel guys tried to really push back on asm code, and get more of it into c. Looking in /usr/src/linux/include I find asm-generic, but in there, there is no system.h to be found.

I've ordered a usb-to-serial converter from Amazon - one that mentioned Linux right in the description. I dug out my old USR 33.6k modem, plugged it in to make sure lights still lit up, and put it on a shelf to wait until the usb-to-serial adapter gets here (Amazon Prime) in a few days.

I also installed "iwar" from the sunrise overlay, in case that can be persuaded to do what I need. Otherwise it will be a bit of a rush to have this all in place by 9:00EST, 7:00MST on Saturday.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 837

PostPosted: Sun Mar 26, 2017 6:01 pm    Post subject: Reply with quote

I have a

/usr/src/linux-4.9.6-gentoo-r1/tools/perf/util/include/asm/system.h

Not much help in getting tools compiled for your modem.

As for splitting your time between root and an non-privileged user, I do all browsing non-privileged, including downloading. The tools acquired can be used by root, without root going online.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Fri Mar 31, 2017 1:26 am    Post subject: Reply with quote

OK, I've given up on my mother's modem. I believe I've also given up on my external modem, too.

I ordered a USB-serial adapter and am using it with a friend's external modem. I can dial with both minicom and iwar. I haven't even tried a data connection, but then again, for my immediate application I don't care. I just want it to dial.

However I can't get iwar to war-dial. It doesn't seem to be detecting the busy signal. I can add the "X4" init code, and things hang up after the busy signal, but iwar doesn't seem to register it. It has a status page, and on that the Busy count stays at 0. Plus since it doesn't detect busy, it doesn't redial.

I can sort of wardial with minicom, by hitting the spacebar every time, but I'd really prefer something automated. I'm anticipating a 3-hour sit, trying to get through to this one phone number. (That's the way it went on March 1, using the redial button on the phone.)

I've attempted to use pyserial, but so far it looks like a loopback - everything I send, I receive back, instead of "OK". It doesn't get a dial tone, and I hear no dialing. I've given it the same init string being used by iwar.

Help!?!?
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43210
Location: 56N 3W

PostPosted: Fri Mar 31, 2017 8:32 am    Post subject: Reply with quote

depontius,

Use chat. You write a script for cat to follow.
The man page example should be all you need.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum