From owner-freebsd-questions@FreeBSD.ORG Thu Nov 5 18:15:54 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF5E71065759 for ; Thu, 5 Nov 2009 18:15:54 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 3477D8FC13 for ; Thu, 5 Nov 2009 18:15:54 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.50) id 1N66sC-0002LX-GY for freebsd-questions@freebsd.org; Thu, 05 Nov 2009 19:15:52 +0100 Received: from frigga.summersault.com ([12.161.105.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Nov 2009 19:15:52 +0100 Received: from mark by frigga.summersault.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Nov 2009 19:15:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Mark Stosberg Date: Thu, 5 Nov 2009 13:15:24 -0500 Lines: 88 Message-ID: <20091105131524.3967515f@summersault.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: frigga.summersault.com X-Newsreader: Claws Mail 3.7.3 (GTK+ 2.12.9; i486-pc-linux-gnu) Sender: news Subject: solution: getting a Motorola Razr V3 to work as a GSM modem on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2009 18:15:54 -0000 Here's an answer without a direct question: I've been working on a project send out pages from Nagios directly unto cell network as SMS messages. The "modem" used for now is a Motorola Razr V3 phone, which is a GSM phone. We have a "Qwert Corp" texting plan, which provides unlimited text messages for about $20/month, without paying for a voice plan we don't need. It is serviced by T-Mobile's network. The phone connects to the server via USB cable which (I presume) also charges the phone at the same time. No special settings needed on the phone to make it work as a modem=20 On the FreeBSD side (with the old FreeBSD 6.1 release), I initially got a failure when I plugged it in: Nov 5 09:45:57 azz kernel: uhub0: device problem (SET_ADDR_FAILED),=20 disabling port 1 Nov 5 09:46:06 azz kernel: uhub0: port 1, set config at addr 2 failed Nov 5 09:46:06 azz kernel: uhub0: device problem (IOERROR), disabling=20 port 1 Nov 5 09:46:10 azz kernel: ugen0: Motorola Inc. Motorola Phone (V3),=20 rev 1.10/0.01, addr 2 ### This initial problem was solved by loading the "ucom" and "umodem" modules: kldload ucom kldload umodem To make sure these will be loaded on boot, I added some lines to=20 /boot/loader.conf (still need to be tested): ucom_load=3D"YES" umodem_load=3D"YES" Then when I plugin the phone to FreeBSD, I get a more successful message: ### Nov 5 11:10:25 azz kernel: ucom0: Motorola Inc. Motorola Phone (V3),=20 rev 1.10/0.01, addr 2, iclass 2/2 Nov 5 11:10:25 azz kernel: ucom0: data interface 1, has CM over data,=20 has no break Nov 5 11:10:25 azz kernel: ucom0: status change notification available ### The related device file for us is: /dev/cuaU0 For software to send the pages, I use the "gammu" port. I ran "gammu-config" for the initial setup, and then moved the resulting file from /root/.gammurc to the more standard location: /etc/gammurc During the setup, I used the device file mentioned above. I found that the device file could be reality-checked like this: stty -f /dev/cuaU0 -a That prints out some details including this hint that it's a modem: "speed 9600 baud" Finally, I could send a successful test with Gammu: echo "sms test" | gammu --sendsms TEXT +1XXXYYYZZZZ =46rom here, there are already references on integrating Gammu with Nagios, as well as the possibility of using "gammu-smsd" for higher-volume paging loads.=20 I thought I would share this in case anyone else ran into the same problem I did trying to get a USB modem to work when they plugged into FreeBSD! Mark --=20 . . . . . . . . . . . . . . . . . . . . . . . . . . .=20 Mark Stosberg Principal Developer =20 mark@summersault.com Summersault, LLC =20 765-939-9301 ext 202 database driven websites . . . . . http://www.summersault.com/ . . . . . . . .