Re: [SOLVED!] Communicating with USB Modem

2010-10-18 Thread Hal Vaughan
I was going to just reply to Phil privately, but there are a few points that 
could effect someone else's decision in a similar case, so I'm going to address 
them on list.  Phil makes some good points, so I thought it appropriate to 
include my thoughts on them.

On Oct 18, 2010, at 12:38 AM, Phil Requirements wrote:

 On 2010-10-13 22:28:10 -0400, Hal Vaughan wrote:
 Comments and some info at the bottom, so it makes sense when you read it.  
 (Hey, there's NO way I'm going to top post on this list!)
 
 Now I have a few notes on this, since there's been a few private
 conversations with people who are in or have seen this thread.
 
 1) I'm basically making a black box for the people I'm working
 with.  I do NOT want them messing with the computer I give them.
 Many times, in embedded systems, there is no PCI slot.  Sometimes
 there is, but I can't count on that.  (I haven't picked my hardware
 config yet.)  So I really need an external modem since the only
 connection I can count on is a USB connector.  (Even with embedded,
 most systems have 2 or more USB connectors, and some people may need
 to hook up a printer there.)
 
 I see that here in Point 1 you rule out a PCI card-based solution
 while also admitting that the hardware has not yet been specified. It
 seems feasible that if you found a really great and cheap PCI modem,
 you could spec the hardware around that.

I spent close to a week researching possible mobos or all-in-one package 
systems.  Some boards do have PCI slots, but some don't, so that's a big issue 
to consider.  I'd much rather be able to spec the hardware around the mobo than 
a modem.  Also, if I go for something like Soekris, which I like, but which may 
cost more than I want (they still haven't released final specs and cost on 
their Net6501, which is what I'd likely use), using a PCI card would be 
problematical.  While I've seen PCI slots on their boards, I'd have to cut a 
hole in it to allow someone to plug a phone cable in.

That's one of the two biggest strikes against a PCI modem: I can't be sure how 
it'll fit in with the rest, and finding an appropriate mobo or mobo/case combo 
is a bigger concern than using a PCI modem.  If I go in order of my reasoning, 
I listed that as strike 2 against PCI modems.

 I mention this because it seems to me that an external USB modem is
 not very black box. There would be your discrete little appliance
 with a very conspicuous dongle coming off it. A PCI internal modem
 that fits inside the appliance would be much more black-box-like.

I agree.  Until I read how you phrased it here, I had not thought of stating my 
reasoning here.  I'll be working intelligent people who work in technical 
fields, but not in computer fields.  The tradeoff is that if I need someone in 
another city to work with me so I can walk them through solving a problem so I 
don't have to make 4-10 hour round trip to get there and end up just flipping a 
switch, that's good, since they can work with me.  But, on the flip side, when 
you're working with someone with an intelligent and technical mind, they're the 
ones more likely to think they can break the rules in some way because they 
know they're smart.

I'm more concerned about this being black boxy in terms of them not trying to 
log on or hook up a keyboard and monitor than anything else.  I don't want them 
thinking of this box as a computer where, if it starts acting odd, they think 
they can work with.

On the other hand, even though I'm within 8 miles of the state capital 
building, I didn't get broadband for years, due to bureaucratic attitudes at 
the cable company (which kept changing ownership) and Verizon.  I had to work 
with Linux and dial-up modems for several years.  I also had to replace my PCI 
modems every few months.  I don't remember why, but I do remember tossing out a 
lot of PCI modems that worked and stopped working.  Sometimes it was due to a 
distro upgrade, other times it was a new modem that docs said would work that 
didn't.

If a PCI modem goes bad on me, then it means paying for them to ship me the 
unit overnight, me replacing it and sending it back overnight.  If a USB modem 
goes bad, it means having a new one drop-shipped from Newegg.  Considering 
package size, that's much easier and cheaper than replacing a PCI modem.

That, on my list, was strike 3 against PCI.

 The problem with PCI card modems is that they are not so likely to
 support GNU/Linux. So they aren't a clear winner. But they would be
 better for a black box.

And that was my strike 1 against PCI -- along with seeing some work now and not 
with later drivers.

As I said, my black box was a bit of a compromise.  It's a black box as far 
as being something a user can log onto, but not 100% in that it has the 
external modem.  Still, what I'm looking at now includes the embedded box, a 
PCI modem, and a wall-wart transformer.  All the user has to do on receiving it 
is plug in a CAT5, plug in the USB modem, plug 

Re: [SOLVED!] Communicating with USB Modem

2010-10-17 Thread Phil Requirements
On 2010-10-13 22:28:10 -0400, Hal Vaughan wrote:
 Comments and some info at the bottom, so it makes sense when you read it.  
 (Hey, there's NO way I'm going to top post on this list!)
 
 Now I have a few notes on this, since there's been a few private
 conversations with people who are in or have seen this thread.
 
 1) I'm basically making a black box for the people I'm working
 with.  I do NOT want them messing with the computer I give them.
 Many times, in embedded systems, there is no PCI slot.  Sometimes
 there is, but I can't count on that.  (I haven't picked my hardware
 config yet.)  So I really need an external modem since the only
 connection I can count on is a USB connector.  (Even with embedded,
 most systems have 2 or more USB connectors, and some people may need
 to hook up a printer there.)

I see that here in Point 1 you rule out a PCI card-based solution
while also admitting that the hardware has not yet been specified. It
seems feasible that if you found a really great and cheap PCI modem,
you could spec the hardware around that.

I mention this because it seems to me that an external USB modem is
not very black box. There would be your discrete little appliance
with a very conspicuous dongle coming off it. A PCI internal modem
that fits inside the appliance would be much more black-box-like.

The problem with PCI card modems is that they are not so likely to
support GNU/Linux. So they aren't a clear winner. But they would be
better for a black box.

 2) I can't count on having an RS232 interface, so that rules out a
 lot of good modems.

Another problem with these hardware modems is that they are large
and require their own power supply, so they are not at all
resembling a black box.

 3) Yes, I know about US Robotics, I have known about them since my
 Apple ][e days.  (Yes, I'm that ancient!)  However, their modem is
 almost twice as much as this one and if things go well, I could need
 20 or more of these systems, and 20 * $20 = $400.  That pays for 40
 group Argentine tango lessons or almost pays for a 10 pack of
 private ballroom lessons.  I'd rather be dancing with women than
 spending extra on modems when I don't have to.  I know that's just
 crazy and silly, but that's the way I am.

Don't pay more than you have to, as long as everything works
to your standard.

 4) I spent the better part of an afternoon and evening on trying to
 get the Encore modem to work and couldn't, so I ordered the Rosewill
 one.  Yes, I'd love to have pursued it, but considering that, at
 this point, I'm only working with one modem and not mass-ordering
 them, it makes no sense to spend hours on making a modem work when
 $30 will get me one that should work.  Again, I know it's silly, but
 I'd rather be dancing with women than working at my computer.  At
 some point, if an idea hits me, I may go back to working on the
 Encore modem, but for now I don't see the point of investing more
 time in it.

I agree that for your purposes it does not make sense to try to make
the Encore modem work, since you are trying to set up something worth
replicating. Why spend many hours battling a modem if you don't have
to?
 
 Thanks to all that helped me with this.  I would love it if I didn't
 need to add another package, especially one not in repositories, but
 this works and it doesn't take much to work, and including this
 package as part of my setup won't be too hard at all.  I don't know
 what kind of reputation Rosewill has, but I've had good luck with
 them, so I'll be sticking with their modem for now and when I get to
 doing the mass-ordering as well.
 
 If people still have more suggestions, I'm still open, but I'm not
 going to spend hours Googling or researching or compiling to get the
 Encore working.
 
 Again, thanks for the help!
 
 Hal
 

Thank you for posting the update on this issue. It is interesting to
know the outcome of all the work you are doing.

I think you Rosewill solution is fine, though I would want to make
sure it performs well over time before deploying two dozen of them.

I only responded because I have this nagging feeling that, as
long as you're going to all this trouble, a PCI card-based solution
would be a lot more black-box-like.

On the other hand, I get the feeling that you do not want the RD
phase to go on for a long time, because it is cutting in to your other
interests.  In which case you might not want to investigate every
possible approach.

Phil


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20101018043839.ga29...@kasploosh.net



Re: [SOLVED!] Communicating with USB Modem

2010-10-13 Thread Hal Vaughan
Comments and some info at the bottom, so it makes sense when you read it.  
(Hey, there's NO way I'm going to top post on this list!)

On Oct 9, 2010, at 3:21 AM, Hal Vaughan wrote:

 I have a Debian Lenny system and I've plugged in a USB 56K modem.  (I know 
 that's as outdated as a Model T, but I need it for business.)  When I type 
 cat /proc/bus/usb/devices I get this:
 
 T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8
 B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
 D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
 P:  Vendor=1d6b ProdID=0002 Rev= 2.06
 S:  Manufacturer=Linux 2.6.26-2-686 ehci_hcd
 S:  Product=EHCI Host Controller
 S:  SerialNumber=:00:1d.7
 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
 I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
 E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms
 
 T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
 B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
 D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
 P:  Vendor=1d6b ProdID=0001 Rev= 2.06
 S:  Manufacturer=Linux 2.6.26-2-686 uhci_hcd
 S:  Product=UHCI Host Controller
 S:  SerialNumber=:00:1d.0
 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
 I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
 E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
 
 T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
 D:  Ver= 2.00 Cls=ff(vend.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
 P:  Vendor=047e ProdID=2892 Rev= 2.00
 S:  Manufacturer=Agere Systems
 S:  Product=Agere USB2.0 V.92 SoftModem
 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
 I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
 E:  Ad=82(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
 E:  Ad=02(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
 I:  If#= 0 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
 E:  Ad=82(I) Atr=01(Isoc) MxPS=  32 Ivl=1ms
 E:  Ad=02(O) Atr=01(Isoc) MxPS=  32 Ivl=1ms
 I:  If#= 0 Alt= 2 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
 E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
 E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
 E:  Ad=82(I) Atr=03(Int.) MxPS=  16 Ivl=16ms
 
 From what I can find, that means the actual device file for this modem 
 should be at /dev/bus/usb/001/002, but I know I could be wrong on that.
 
 I'm trying to communicate with this modem.  I've used Minicom, with the 
 device I mentioned above.  There are no /dev/ttyACM0 devices, as sometimes 
 happens with a modem.  I've tried all /dev/ttySx, where x is from 0 to 4, 
 with no results.  The problem with Minicom is that it can take time and a lot 
 of frustrating keypresses to try one device after another.  Also, I'm not 
 sure the serial port speed settings are at all appropriate in Minicom for USB 
 modems.
 
 I was also trying a Perl program that would simply fork, have the parent open 
 the device for reading and listen, then the child would open the same device 
 for writing and send ATZ through to the device, then I could watch for a 
 response -- but then when I tried it on a system with a serial port where I 
 knew the device was /dev/ttyS0, it didn't work, so maybe there's a problem 
 with the program.  (I don't want to post a full Perl program here, since this 
 isn't a Perl board that focuses on debugging Perl.)
 
 This is a test situation, so I can't be sure the modem works with Linux, but 
 I would think if it's external and USB, it would have to accept serial 
 commands sent over the USB port.  I could be wrong on this, of course.
 
 So here's the questions:
 
 1) What device should I be able to write to and read from to connect to this 
 modem?
 
 2) Any suggestions on how to write to and read from the device?  (Write to it 
 in Perl or use echo in bash -- but then how do I read to see results?)
 
 3) Any other ideas or suggestions on how to control and use this modem in 
 Linux (without going into C or C++)?

Even after playing around for a while, and with help from others (see other 
emails in this thread), I could not get the other modem to work properly.  I 
did try the sl-modem drivers from the non-free repositories.  They would create 
/dev/modem and link it to /dev/ttySL0, but even with that, it wouldn't work.

When I tested any modem, I did two things: 1) I used Minicom, which is a great 
term program, and 2) I used my own Perl program that would open a device as a 
file to read and write to, then send the ATZ command (with a newline character 
after it) and I'd see if anything came back.  I missed a few details on this 
program, but once I got it to work (tested it on an RS232 modem on another 
box), I would see the ATZ printed on the console (as well as knowing it was 
supposedly sent to the device) and I'd see a blank line, then OK.  No matter 
what I did with Minicom or my Perl script, I could not communicate with the 
Encore modem.

Today I received another USB modem, a Rosewill RNX-56USB from NewEgg.  The link 
to that item is: