Re: Bridge, dpcpd, sshd

2011-03-24 Thread timp
My similar config
.
cloned_interfaces=bridge0
ifconfig_bridge0=addm wlan0 addm sk0 up
ifconfig_bridge0_alias0=ether f6:3f:1f:48:4d:97
ifconfig_bridge0_alias1=inet 172.16.254.1 netmask 255.255.255.0
ifconfig_sk0=up
ifconfig_wlan0=up
.

Use alias# for setting inet on bridge0

--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/Bridge-dpcpd-sshd-tp4259717p4261792.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bridge, dpcpd, sshd

2011-03-24 Thread Chris
--- On Thu, 3/24/11, Nerius Landys nlan...@gmail.com wrote:

 From: Nerius Landys nlan...@gmail.com
 Subject: Re: Bridge, dpcpd, sshd
 To: Chris devnullacco...@yahoo.se
 Cc: freebsd-questions@freebsd.org
 Date: Thursday, March 24, 2011, 1:56 AM
 
  I have a server machine that I use as DHCP server,
 sshd login etc, and since I have multiple Ethernet
 interfaces on it, I would like to use two of those for the
 internal network to avoid adding one more ethernet switch
 for just one extra machine. DHCP should configure hosts on
 both those interfaces and all the hosts should be on the
 same subnet.
 
  So, I set up a bridge interface as per the FreeBSD
 handbook (ch. 31.5), but now dhcpd is refusing to start
 during boot as it claim that the bridge0 interface doesn't
 exist. If I manually start dhcpd with the same parameters
 after the machine has come up, it will start and it will
 also work as expected and assign addresses to users
 connecting from teh bridge interface.
 
  sshd seems to do something similar, it refuses to
 start, but can manually be re-started later on.
 
  Is this some kinf of expected behavior, or does it
 sound like I'm doing something badly wrong? Can I force
 bride0 to be configured earlier in the boot so it is always
 there when the daemons start waking up?
 
  Configuration info below.
 
  TIA,
   Chris
 
  = rc.conf extract 
  dhcpd_enable=YES
  dhcpd_ifaces=bridge0
  cloned_interfaces=bridge0
  ifconfig_bridge0=addm dc0 addm dc1 up
  ifconfig_bridge0=inet 172.16.0.100/24
  ifconfig_dc0=up
  ifconfig_dc1=up
 
  = sshd.conf extract =
  ListenAddress 172.16.0.100
 
  === the dhcpd.conf is quite standard and does not say
 anything about the interfaces, that info is in rc.conf above
 
 
  === /var/log/messages extract 
   dhcpd: bridge0: not found
 
 I am running a very similar setup.  I learned from my
 own experience
 that sometimes little things like the order of statements
 or what's
 exactly inside the statement affects the outcome.  In
 any case after
 much tweaking I got my router to work, and here is my
 complete
 rc.conf.  People on this mailing list have helped me
 come up with my
 rc.conf (thank you all):
 
 gateway_enable=YES
 hostname=speedy.i
 ifconfig_fxp2=DHCP
 cloned_interfaces=bridge0
 ifconfig_bridge0=addm fxp0 addm fxp1 addm re0 addm ath0
 up
 ifconfig_fxp0=up
 ifconfig_fxp1=up
 ifconfig_re0=up
 ifconfig_ath0=ssid speedy.i mode 11g mediaopt hostap
 channel 2 -bgscan up
 ipv4_addrs_bridge0=192.168.0.254/24
 ipnat_enable=YES
 hostapd_enable=YES
 sshd_enable=YES
 named_enable=YES
 ntpdate_enable=YES
 ntpd_enable=YES
 linux_enable=YES
 dhcpd_enable=YES
 dhcpd_ifaces=bridge0
 apache22_enable=YES
 
 The ath0 stuff is for a wireless access point and is not
 needed in
 your case.  The rest you can probably understand.
 
 fxp2 is the external facing interface, it's what is
 connecting to ATT
 UVerse via DHCP.
 
 The line ipv4_addrs_bridge0 is important and from what I
 recall it
 needs to come after the interfaces are brought up, just
 like in the
 above rc.conf.
 
 Of course there is also some dhcpd config that is not
 present here.
 
 If you still can't get it to work, try disabling dhcpd to
 have a
 static IP network, try getting that to work first. 
 Then add dhcpd
 once the static network is working.
 

Hi Nerius and thanks for your reply.

I tried changing rc.conf as per your suggestion and added the ipv4_addrs_ 
command, but it did not manage to set any address on the bridge anyway, and I'm 
still getting errors starting the daemons because the bridge isn't created yet.
And then I realized how long it has been since I upgraded that machine, it's 
actually running FreeBSD-6.0 (I'm a bit ashamed here...), so I would guess that 
it is so far outdated that these things aren't supposed to work. I guess I'll 
have to bite the bullet and reinstall the machine this weekend and try again 
with the same config and see if that makes it any better. I'll come back to the 
list if that doesn't solve it.

Thanks for the help
/Chris




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to enable NCQ on Intel ESB2 AHCI SATA?controller/ST31000340NS

2011-03-24 Thread Anton Yuzhaninov
On Wed, 23 Mar 2011 16:37:11 -0500, Dan Nelson wrote:
DN If you do a verbose boot, you should get a couple more lines printed:
DN 
DN ahci0: Caps: 64bit NCQ SNTF AL CLO 3Gbps PM PMD SSC PSC 32cmd CCC EM 6ports
DN ahci0: Caps2:
DN ahci0: EM Caps: ALHD XMT SMB LED
DN 
DN If you see NCQ in your Caps line, then queueing should be supported by the
DN controller.  Looking at the ahci.c source, there is a quirk AHCI_Q_NONCQ
DN that disables NCQ, but it it only used for VIA VT8251 chips.

It seems to be NCQ not supported by this controller:
ahci0: AHCI v1.10 with 6 3Gbps ports, Port Multiplier supported
ahci0: Caps: 64bit ALP AL 3Gbps PM SSC PSC 32cmd 6ports
ahci0: Caps2:

-- 
WBR,
 Anton Yuzhaninov

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Kodak C195 digital camera appears to affect WD on usb

2011-03-24 Thread Warren Block

On Wed, 23 Mar 2011, Steven Friedrich wrote:


I know I wasn't clear in my original mail, but after this AutoSense failed, I
get LOTS of g_vfs_done errors.  I don't get them if I don't plu in the camera


Mar 22 01:12:21 laptop2 kernel: (da0:umass-sim0:0:0:0): AutoSense failed
Mar 22 01:12:21 laptop2 kernel: g_vfs_done():da0s1f[WRITE(offset=5780930560,
length=16384)]error = 5

^^
Lot's and lot's of these.


   Da Rock said:

It appears to be a routine attempt to determine a usb device by devd.
Assuming you are trying to access the camera, are you able to mount it?

I just got the camera a week ago.  When I first connected it, it would
automatically create da1-da3.  Now it doesn't.

It used to get detected with gphoto2 --auto-detect as  a Generic PTP camera.

I don't know if I changed a camera setting to cause any new behaviour, but I
looked at them.  No setting for mode like PTP.


Setup/Computer Connection menu in the camera.  According to the 
really vague online manual, anyway.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Kodak C195 digital camera appears to affect WD on usb

2011-03-24 Thread Michael J. Kearney
Lol .gov i would guess the kernel will hang if a questionable usb device 
controler is present. .. i have a similar problem with a dell poweredge 
server... so if like so many uptime concious users logon on to this machine, 
they would have the same problem. Bummer. Have you tried crtl-alt-backspace? I 
would advise logging onto xwindows from another machine first thereby isolating 
the problem. Lol .mil

Warren Block wbl...@wonkity.com wrote:


On Wed, 23 Mar 2011, Steven Friedrich wrote:

 I know I wasn't clear in my original mail, but after this AutoSense failed, I
 get LOTS of g_vfs_done errors.  I don't get them if I don't plu in the camera

 Mar 22 01:12:21 laptop2 kernel: (da0:umass-sim0:0:0:0): AutoSense failed
 Mar 22 01:12:21 laptop2 kernel: g_vfs_done():da0s1f[WRITE(offset=5780930560,
 length=16384)]error = 5
 ^^
 Lot's and lot's of these.

Da Rock said:
 It appears to be a routine attempt to determine a usb device by devd.
 Assuming you are trying to access the camera, are you able to mount it?

 I just got the camera a week ago.  When I first connected it, it would
 automatically create da1-da3.  Now it doesn't.

 It used to get detected with gphoto2 --auto-detect as  a Generic PTP camera.

 I don't know if I changed a camera setting to cause any new behaviour, but I
 looked at them.  No setting for mode like PTP.

Setup/Computer Connection menu in the camera.  According to the
really vague online manual, anyway.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bandwith Management

2011-03-24 Thread Edwin L. Culp W.
2011/3/23 Daniel Staal dst...@usa.net:
 --As of March 23, 2011 3:49:37 PM +0200, Eric Beukes is alleged to have
 said:

 As well as how do I now what is actually used for the management of the
 bandwith like ipfw, ect?

 --As for the rest, it is mine.

 As far as I know, the two most likely bandwidth management systems on a
 FreeBSD box are the two possible firewalls, ipfw or pf.  Check to see which,
 if either, is set up, and then start reading man pages and config files.  ;)

 Daniel T. Staal

 ---
 This email copyright the author.  Unless otherwise noted, you
 are expressly allowed to retransmit, quote, or otherwise use
 the contents for non-commercial purposes.  This copyright will
 expire 5 years after the author's death, or in 30 years,
 whichever is longer, unless such a period is in excess of
 local copyright law.
 ---
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

IIRC you can also use dummynet with PF for a third option.

ed
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-24 Thread four . harrisons
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 3/23/11 2:49 PM, Ryan Coleman wrote:
 I have a folder full of ISOs that we're sharing on the network instead of 
 having the discs available (seems like a good idea, right?)
 
 But I want to automate the process on boot instead of having to write a 
 static script  to do the work.
 
 Disc images are located in /mount/disc_images/ (all are ISOs)
 They need to mount into /mount/office_files/images/FILENAME [without the .iso 
 extension]
 
 How can I do this? I've always been given these types of scripts in the past 
 at an old job but I don't have access to those examples anymore.

Hi Ryan,

You can put something like this in /etc/rc.conf to get the device files
created automatically:

mdconfig_md0=-t vnode -f /mount/disc_images/Image1.iso
mdconfig_md1=-t vnode -f /mount/disc_images/Image2.iso
mdconfig_md2=-t vnode -f /mount/disc_images/Image3.iso

Because these devices (/dev/md0, /dev/md1, /dev/md2) will be created
before /etc/fstab is processed, you can then add the following entries
in that file:

/dev/md0/mount/office_files/images/Image1cd9660ro00
/dev/md1/mount/office_files/images/Image2cd9660ro00
/dev/md2/mount/office_files/images/Image3cd9660ro00

Check out the rc(8) man page (http://bit.ly/fuwn5n) for more information
about how the startup scripts work, as well as the one that processes
the device creation directives above - /etc/rc.d/mdconfig

Finally, you can always add your own custom startup scripts to
/usr/local/etc/rc.d if you need to do something that the standard
startup scripts can't handle.

Hope that helps,
Greg
- -- 
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2KTn4ACgkQ0sRouByUApCAiwCfZzO8jnaKIFxuOoZotU8Ac49I
MMIAni1KMFDqLe1YeMaS/LZUsgrV1PfY
=JUk3
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-24 Thread four . harrisons
On Wed, 23 Mar 2011 13:49:46 -0500, Ryan Coleman edi...@d3photography.com 
wrote:
 I have a folder full of ISOs that we're sharing on the
 network instead of having the discs available (seems 
 like a good idea, right?)

Please use the correct terminology: FreeBSD (as any UNIX
operating systems) calls them DIRECTORIES. Folders is
something else, it's not equivalent to a directory, so
folders is wrong.



 But I want to automate the process on boot instead of
 having to write a static script  to do the work.
 
 Disc images are located in /mount/disc_images/ (all are ISOs)
 They need to mount into /mount/office_files/images/FILENAME
 [without the .iso extension]
 
 How can I do this? I've always been given these types of
 scripts in the past at an old job but I don't have access
 to those examples anymore.

Something like this (not even tested, but quite verbose and
unelegant) should work:

#!/bin/sh
NODE=0
for IMAGE in /mount/disc_images/*.iso; do
mdconfig -a -t vnode -u $NODE -f $IMAGE
mount -t cd9660 -o ro /dev/md$NODE /mount/office_files/images/`basename 
$IMAGE .iso`
NODE=`expr $NODE + 1`
done

This of course assumes that you have PROPER file names. In
case the ISO file names contain special characters, attention
has to be paid for quoting and escaping. Worth reading:

http://www.dwheeler.com/essays/filenames-in-shell.html

http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html

After reading it, you'll easily recognize that I did it wrong
in the suggestive script. :-)



I'm not sure if you can mount from ISO files directly, but
maybe you can try that too.

Remember unmounting the files when not in use (scripted: umount
and mdconfig -d).




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Recommendations for 3D modelling code for 3D printing?

2011-03-24 Thread Arthur Chance
I need to make some parts using 3D printing, and was wondering what 
software I should use to do the modelling. Does anyone have any 
experience and/or recommendations about this? If it matters, I'll 
probably be using shapeways.com to do the actual printing.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Recommendations for 3D modelling code for 3D printing?

2011-03-24 Thread Jerry
On Thu, 24 Mar 2011 17:27:43 +
Arthur Chance free...@qeng-ho.org articulated:

 I need to make some parts using 3D printing, and was wondering what 
 software I should use to do the modelling. Does anyone have any 
 experience and/or recommendations about this? If it matters, I'll 
 probably be using shapeways.com to do the actual printing.

Perhaps this URL might prove useful:

http://en.wikipedia.org/wiki/3D_computer_graphics_software

For a comparison:

http://en.wikipedia.org/wiki/Comparison_of_3D_computer_graphics_software

-- 
Jerry ✌
freebsd.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: why does this simple counter fail?

2011-03-24 Thread Gary Kline
On Wed, Mar 23, 2011 at 11:47:16AM -0500, Ryan Coleman wrote:
 Do you have an error for it?
 
 If not... add after the first ?
 error_reporting(9);
 
 And see what it reports.


There were no errors that should up when i launched this script
on www.thought.org; it simply failed; no output.  ...Another php
script that output a random string on the same page did have
errors.  I thought i would try this simpler script first.  will
add the err line and retry, tx,

gary


 
 --
 Ryan
 PHP dev.
 
 
 On Mar 23, 2011, at 11:45 AM, Gary Kline wrote:
 
  
  Guys,
  
  Can any of you php hackers tell me why this simple self-hacked
  counter bomb?
  
  appended.
  
  tia.
  
  -- 
  Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
Journey Toward the Dawn, E-Book: http://www.thought.org
   The 7.98a release of Jottings: http://jottings.thought.org
  
  !--
  //
  //  $Id: count.php,v 1.2 2004/01/22 21:58:48 kline Exp kline $
  //
  --!
  
  ?php
  
  $directory=./countdir/;
  
  if (! (file_exists( ($directory.$file)) ))
  {
  if (! ($fp = fopen( ($directory.$file), w)) )
  {
  echo Can't create file '$directory.$file';
  exit(1);
  }
  else
  {
  fseek($fp,0);
  fputs($fp, $count);
  fputs($fp, \n);
  fputs($fp, $file);
  fclose($fp);
  }
  }
  
  if (file_exists( ($directory.$file)))
  {
 $fp = fopen($directory.$file, r+);
 flock($fp, 1);
 $count = fgets($fp, 4096);
 $count += 1;
 fseek($fp,0);
  fputs($fp, $count);
  fputs($fp, \n);
 fputs($fp, $file);
  
 flock($fp, 3);
 fclose($fp);
  ?
  
  CENTER
  FONT COLOR=#66  !---  rich dark bluegrey ---
  FONT SIZE=2
  
  ?
 print  there have been ;
  ?
  
  FONT SIZE=+1
  FONT COLOR=#FF
  
  ?
  print $count;
  ?
  
  /FONT
  /FONT
  ?
  print hits\n;
  ?
  
  /CENTER
  
  ?
  
  } 
  else
  {
 print Can't find file, check '$directory.$file'\n;
  }
  
  ?
  
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
 

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 7.98a release of Jottings: http://jottings.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Recommendations for 3D modelling code for 3D printing?

2011-03-24 Thread Robert Huff

Arthur Chance writes:

  I need to make some parts using 3D printing, and was wondering
  what software I should use to do the modelling. Does anyone have
  any experience and/or recommendations about this? If it matters,
  I'll probably be using shapeways.com to do the actual printing.

I was under the impression the 3D printers used proprietary
software/formats.
Am I mistaken?


Robert Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: why does this simple counter fail?

2011-03-24 Thread Ryan Coleman
Check your apache error_log, too.

On Mar 24, 2011, at 12:56 PM, Gary Kline wrote:

 On Wed, Mar 23, 2011 at 11:47:16AM -0500, Ryan Coleman wrote:
 Do you have an error for it?
 
 If not... add after the first ?
 error_reporting(9);
 
 And see what it reports.
 
 
   There were no errors that should up when i launched this script
   on www.thought.org; it simply failed; no output.  ...Another php
   script that output a random string on the same page did have
   errors.  I thought i would try this simpler script first.  will
   add the err line and retry, tx,
 
   gary
 
 
 
 --
 Ryan
 PHP dev.
 
 
 On Mar 23, 2011, at 11:45 AM, Gary Kline wrote:
 
 
 Guys,
 
 Can any of you php hackers tell me why this simple self-hacked
 counter bomb?
 
 appended.
 
 tia.
 
 -- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Journey Toward the Dawn, E-Book: http://www.thought.org
 The 7.98a release of Jottings: http://jottings.thought.org
 
 !--
 //
 //  $Id: count.php,v 1.2 2004/01/22 21:58:48 kline Exp kline $
 //
 --!
 
 ?php
 
 $directory=./countdir/;
 
 if (! (file_exists( ($directory.$file)) ))
 {
 if (! ($fp = fopen( ($directory.$file), w)) )
 {
 echo Can't create file '$directory.$file';
 exit(1);
 }
 else
 {
 fseek($fp,0);
 fputs($fp, $count);
 fputs($fp, \n);
 fputs($fp, $file);
 fclose($fp);
 }
 }
 
 if (file_exists( ($directory.$file)))
 {
   $fp = fopen($directory.$file, r+);
   flock($fp, 1);
   $count = fgets($fp, 4096);
   $count += 1;
   fseek($fp,0);
 fputs($fp, $count);
 fputs($fp, \n);
   fputs($fp, $file);
 
   flock($fp, 3);
   fclose($fp);
 ?
 
 CENTER
 FONT COLOR=#66  !---  rich dark bluegrey ---
 FONT SIZE=2
 
 ?
   print  there have been ;
 ?
 
 FONT SIZE=+1
 FONT COLOR=#FF
 
 ?
 print $count;
 ?
 
 /FONT
 /FONT
 ?
 print hits\n;
 ?
 
 /CENTER
 
 ?
 
 } 
 else
 {
   print Can't find file, check '$directory.$file'\n;
 }
 
 ?
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
 
 
 -- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 7.98a release of Jottings: http://jottings.thought.org
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Recommendations for 3D modelling code for 3D printing?

2011-03-24 Thread Arthur Chance

On 03/24/11 17:58, Robert Huff wrote:


Arthur Chance writes:


  I need to make some parts using 3D printing, and was wondering
  what software I should use to do the modelling. Does anyone have
  any experience and/or recommendations about this? If it matters,
  I'll probably be using shapeways.com to do the actual printing.


I was under the impression the 3D printers used proprietary
software/formats.
Am I mistaken?



As far as I can tell, STL is accepted by most (if by printers you mean 
3D printing companies - if you mean printing machines, I have no idea 
but using a company to do the actual printing means it's not my problem).


Shapeways accepts STL, Collada, VRML and X3D files.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Auto Reply: Re: Recommendations for 3D modelling code for 3D printing?

2011-03-24 Thread dave . segleau
I am out of the office on March 24th and 25th.  I will be back in the office on 
March 28th. I will only have intermittent access to email. I will read and 
reply to your message when I get back to the office. 

If you need assistance with a Berkeley DB or Product Management issue while I 
am away, please contact eric.h.jen...@oracle.com or ashok.jo...@oracle.com. 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: why does this simple counter fail?

2011-03-24 Thread Gary Kline
On Wed, Mar 23, 2011 at 11:47:16AM -0500, Ryan Coleman wrote:
 Do you have an error for it?
 
 If not... add after the first ?
 error_reporting(9);
 
 And see what it reports.
 
 --
 Ryan
 PHP dev.
 

save the bandwidth...


Ok, i added the error_reporting line to both scripts.  No change
from the count.php, and the same output as prev from my script that
tries to pick a random entry from some 70 quotes.  here is what the
randomquote.php scipt output onto the home page:




Last updated:
17 February, 2011

echo err-9 line below:\n; $number-1){ // If ran out of quotes,
start again! $num=0; } if (file_exists($directory.$quotecountfile))
{ $nu = fopen ($directory.$quotecountfile, w); fputs($nu,$num); }
else { die(Cant Find $quotecountfile); } } ?


Note that i added the echo line just now.  

Having a quote isn't as meaningful as giving users the latest
pagecount.  That still fails without any errors.  

gary


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: devd started with single-user mode?

2011-03-24 Thread Pan Tsu
David Demelier demelier.da...@gmail.com writes:

 On 21/03/2011 10:51, Pan Tsu wrote:
 David Demelierdemelier.da...@gmail.com  writes:

 The problem when you're using directly kbdmux in the kernel config,
 the ATKBD_DFLT_KEYMAP and UKBD_DFLT_KEYMAP are ineffective, you can't
 set these both together ...

 For me I added these both to use uk.iso but in single user mode I
 still have the standard us layout.

 Can you try the patch in kern/153459 ? It adds KBDMUX_DFLT_KEYMAP which
 allows using non-default layout in single user mode or ddb.

 By the way why is kbdmux needed for an usb keyboard? Should not be
 managed by ukbd only?

ukbd should work without kbdmux if you compile out atkbd.
At least, it worked for me but not in ddb or newcons.


 I don't understand .. But thanks for the patch.

Note, patches in GNATS can be for years not even looked at.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: why does this simple counter fail?

2011-03-24 Thread Brad Mettee

Gary Kline wrote:

On Wed, Mar 23, 2011 at 11:47:16AM -0500, Ryan Coleman wrote:
  

Do you have an error for it?

If not... add after the first ?
error_reporting(9);

And see what it reports.

--
Ryan
PHP dev.




save the bandwidth...


Ok, i added the error_reporting line to both scripts.  No change
from the count.php, and the same output as prev from my script that
tries to pick a random entry from some 70 quotes.  here is what the
randomquote.php scipt output onto the home page:




Last updated:
17 February, 2011

echo err-9 line below:\n; $number-1){ // If ran out of quotes,
start again! $num=0; } if (file_exists($directory.$quotecountfile))
{ $nu = fopen ($directory.$quotecountfile, w); fputs($nu,$num); }
else { die(Cant Find $quotecountfile); } } ?


Note that i added the echo line just now.  


Having a quote isn't as meaningful as giving users the latest
pagecount.  That still fails without any errors.  


gary

It looks like it's not interpreting the php code start somehow.

Can you show the lines immediately above, going up to the Last 
Modified script?


I can also see a ? further down the webpage. It might be a simple 
case of mis-matched start/stop tags.


--
Brad Mettee
PC HotShots, Inc.
Baltimore, MD
(410) 426-7617
- Let us bring out the **Power** of your PCs. -
- Custom Business Software Solutions since 1991 -
Visit us http://www.pchotshots.com for information about our company.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Sound with FN Button

2011-03-24 Thread Alokat

Hi,

how can I use the FN Buttons to regular the sound?
I'm using fluxbox.

Regards,
alokat
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Sound with FN Button

2011-03-24 Thread Polytropon
On Thu, 24 Mar 2011 21:28:05 +0100, Alokat mail...@alokat.org wrote:
 Hi,
 
 how can I use the FN Buttons to regular the sound?
 I'm using fluxbox.

Use the xev program to check which keysymbols (or at
least codes) are output by those keys. For example, on
my Sun keyboard I have those for audio:

141
142
143

Then write a file ~/.xmodmaprc to assign names to those
keys, for example:

! Sound off
keycode 141 = F24
! Lower volume
keycode 142 = F25
! Raise volume
keycode 143 = F26

You can also use

SunAudioMute
SunAudioLowerVolume
SunAudioRaiseVolume

or

XF86AudioMute
XF86AudioLowerVolume
XF86AudioRaiseVolume

I decided to continue the enumeration as function keys for
all the extra keys on my keyboard. :-)

Incorporate the settings upon X startup, using ~/.xinitrc
or maybe ~/.xsession:

xmodmap ~/.xmodmaprc

Then use the keyboard action configuration of Fluxbox. As I
don't use it anymore, I can't tell you where it is, but there
should be a configuration file which selects which action to
be taken when a specific key is pressed.

I'm using WindowMaker's configuration utility for that. I did
add menu entries and set a custom key for them. For example,
I made the following settings:

F24 - mixer 0
F25 - mixer vol -5
F26 - mixer vol +5

You should be able to find a similar approach in FLuxbox.

I'm sure you got the idea: You identify what the keys DO and
then connect them to a keyname. This keyname is then connected
to a specific program call, mixer with the intended parameters
in case of volume control.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: why does this simple counter fail?

2011-03-24 Thread Ryan Coleman
Here's a quick and dirty option...
FIRST make sure your permissions on the folder you want to write the countfile 
to is either at RWX to all or is owned by the Apache run user (PHP by default 
runs under the Apache Service user).

I ran this in file test.php on my server. Give it a whirl.

?
$dir = /path/to/stored/counts/;
$dir = $_SERVER['DOCUMENT_ROOT'].test/; //This was to test in test 
directory in VHOST root folder.
$file = $_SERVER['PHP_SELF']..txt; //this keeps it from being loaded in 
browser as a php-executable
#$file = urlencode($_SERVER['REQUEST_URI'])..txt
//  This option if uncommented will make 
/file/path/filename.php?that=thisfive=5 
//  turn into 
%2Ffile%2Fpath%2Ffilename.php%3Fthat%3Dthis%26five%3D5. Not pretty but 
functional.

if(!is_file($dir.$file)) {
$dump = fopen($dir.$file, x+);
fclose($dump);
}
//Read current value
$fp_read = fopen($dir.$file, r);
$count = fread($fp_read, filesize($dir.$file)+1);
fclose($fp_read);

//Convert count to integer
$new_count = ((int)$count);
//Increase count by 1
$new_count++;


//Reopen to write new value
$fp = fopen($dir.$file, w+);
fwrite($fp, $new_count);
fclose($fp);

echo A count was added. It was #.$new_count;
?

On Mar 24, 2011, at 1:53 PM, Gary Kline wrote:

 On Wed, Mar 23, 2011 at 11:47:16AM -0500, Ryan Coleman wrote:
 Do you have an error for it?
 
 If not... add after the first ?
 error_reporting(9);
 
 And see what it reports.
 
 --
 Ryan
 PHP dev.
 
 
   save the bandwidth...
 
 
 Ok, i added the error_reporting line to both scripts.  No change
 from the count.php, and the same output as prev from my script that
 tries to pick a random entry from some 70 quotes.  here is what the
 randomquote.php scipt output onto the home page:
 
 
 
 
 Last updated:
 17 February, 2011
 
 echo err-9 line below:\n; $number-1){ // If ran out of quotes,
 start again! $num=0; } if (file_exists($directory.$quotecountfile))
 { $nu = fopen ($directory.$quotecountfile, w); fputs($nu,$num); }
 else { die(Cant Find $quotecountfile); } } ?
 
 
 Note that i added the echo line just now.  
 
 Having a quote isn't as meaningful as giving users the latest
 pagecount.  That still fails without any errors.  
 
 gary
 
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


emacs backspace question

2011-03-24 Thread Matthew Morgan
I've read a lot on the internet regarding the use of the backspace key 
in emacs, but the proposed solutions don't seem to be working for me.


I just installed FreeBSD 8.1 in Virtualbox and installed emacs 23.2.1 by 
means of the package installer.  Everything in emacs works great except 
the backspace key, which deletes forward instead of back like it 
should.  I've found a lot of different things on the internet about it:


* switched to bash instead of csh - didn't fix it, but I like bash better
* M-x normal-erase-is-backspace-mode -toggling it once makes my 
backspace bring up the help command; toggling it again changes it back

* different keymaps
- I started out using us.iso.kbd (which exhibits the backspace 
issue, but other keys are right)
- I tried us.emacs.kbd - backspace works right, but many other keys 
are mapped wrong (even letters and numbers)
- I tried us.unix.kbd - backspace doesn't work right and neither do 
my control keys


I also just noticed that when on the command line itself (outside of 
emacs) backspace deletes backward as it should, but so does delete!


Is this something weird with virtualbox, or am I doing something wrong?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Sound with FN Button

2011-03-24 Thread Alokat

On 03/24/11 21:52, Polytropon wrote:

On Thu, 24 Mar 2011 21:28:05 +0100, Alokatmail...@alokat.org  wrote:

Hi,

how can I use the FN Buttons to regular the sound?
I'm using fluxbox.

Use the xev program to check which keysymbols (or at
least codes) are output by those keys. For example, on
my Sun keyboard I have those for audio:

141
142
143

Then write a file ~/.xmodmaprc to assign names to those
keys, for example:

! Sound off
keycode 141 = F24
! Lower volume
keycode 142 = F25
! Raise volume
keycode 143 = F26

You can also use

SunAudioMute
SunAudioLowerVolume
SunAudioRaiseVolume

or

XF86AudioMute
XF86AudioLowerVolume
XF86AudioRaiseVolume

I decided to continue the enumeration as function keys for
all the extra keys on my keyboard. :-)

Incorporate the settings upon X startup, using ~/.xinitrc
or maybe ~/.xsession:

xmodmap ~/.xmodmaprc

Then use the keyboard action configuration of Fluxbox. As I
don't use it anymore, I can't tell you where it is, but there
should be a configuration file which selects which action to
be taken when a specific key is pressed.

I'm using WindowMaker's configuration utility for that. I did
add menu entries and set a custom key for them. For example,
I made the following settings:

F24 -  mixer 0
F25 -  mixer vol -5
F26 -  mixer vol +5

You should be able to find a similar approach in FLuxbox.

I'm sure you got the idea: You identify what the keys DO and
then connect them to a keyname. This keyname is then connected
to a specific program call, mixer with the intended parameters
in case of volume control.





I get an output like this:

FocusOut event, serial 31, synthetic NO, window 0x181,
mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 31, synthetic NO, window 0x181,
mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 31, synthetic NO, window 0x0,
keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   1   0   0   0   0   0   0   0   0   0

FocusOut event, serial 31, synthetic NO, window 0x181,
mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 31, synthetic NO, window 0x181,
mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 31, synthetic NO, window 0x0,
keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: emacs backspace question

2011-03-24 Thread Nerius Landys
 I've read a lot on the internet regarding the use of the backspace key in
 emacs, but the proposed solutions don't seem to be working for me.

 I just installed FreeBSD 8.1 in Virtualbox and installed emacs 23.2.1 by
 means of the package installer.  Everything in emacs works great except the
 backspace key, which deletes forward instead of back like it should.  I've
 found a lot of different things on the internet about it:

 * switched to bash instead of csh - didn't fix it, but I like bash better
 * M-x normal-erase-is-backspace-mode -toggling it once makes my backspace
 bring up the help command; toggling it again changes it back
 * different keymaps
    - I started out using us.iso.kbd (which exhibits the backspace issue, but
 other keys are right)
    - I tried us.emacs.kbd - backspace works right, but many other keys are
 mapped wrong (even letters and numbers)
    - I tried us.unix.kbd - backspace doesn't work right and neither do my
 control keys

 I also just noticed that when on the command line itself (outside of emacs)
 backspace deletes backward as it should, but so does delete!

 Is this something weird with virtualbox, or am I doing something wrong?

You have just discovered what is in my opinion a can of worms with no
clear solution.  I have struggled with issues such as these before,
and I've managed to solve them more or less.

Are you using emacs in a terminal window?  (As opposed to with an X
server.)  I'm assuming yes.
Are you accessing your computer directly through the console or
through an xterm and SSH, for example?  Questions such as those are
important to fully diagnose and fix the problem.  You want to do an
echo $TERM before you start diagnosing problems such as these.

If you are using bash, you can do a man bash and look at the part
that describes ~/.inputrc and/or READLINE.  You may want to create an
~/.inputrc file and add stuff to it to resolve the backspace/delete
issues that you are having.  For example, I have the following in my
~/.inputrc because I do use bash occasionally:

  $if term=cons25
\x7f: delete-char
  $else
$if term=xterm
  \x1b\x5b\x35\x43: forward-word
  \x1b\x5b\x31\x3b\x35\x43: forward-word
  \x1b\x5b\x35\x44: backward-word
  \x1b\x5b\x31\x3b\x35\x44: backward-word
$endif
  $endif

cons25 is the native FreeBSD console (like when you're physically at
the computer console) and xterm is of course xterm.  (Side note: Why
in the heck on my 9.0-CURRENT system the system console says the TERM
is xterm?)

As far as how I came up with the strings such as \x1b\x5b\x35\x43,
you can use a command such as xxd which comes with the vim
package/port to tell you what bytes are being sent when you press a
certain key.

If you want to fix your csh shell too, you may consider editing your
~/.cshrc file.  Here is my complete ~/.cshrc, and note the stuff at
the bottom with the key bindings:

  setenv  EDITOR  vi
  setenv  PAGER   less
  if ($?prompt) then
  # An interactive shell -- set some stuff up
  set prompt = `whoami`@`/bin/hostname -s` 
  set filec
  set history = 2000
  set savehist = 2000
  set mail = (/var/mail/$USER)
  if ( $?tcsh ) then
  bindkey ^W backward-delete-word
  bindkey -k up history-search-backward
  bindkey -k down history-search-forward
  if ($TERM == cons25) then
  bindkey ^? delete-char
  else if ($TERM == linux) then
  bindkey ^[[3~ delete-char
  else if ($TERM == xterm) then
  bindkey ^[[3~ delete-char
  bindkey ^[[5C forward-word
  bindkey ^[[1;5C forward-word
  bindkey ^[[5D backward-word
  bindkey ^[[1;5D backward-word
  bindkey \303\277 backward-delete-word
  endif
  endif
  endif


By the way I have a 9.0 CURRENT box here at my desk, and I've compiled
emacs-nox11 port, and I'm at the system console (meaning I'm
physically at the console).  I am using /bin/tcsh as my shell.  I have
no modifications to any of my dotfiles, they are all stock.  In emacs,
I'm able to use Backspace and Delete just as expected.

Maybe you should try setting your default shell to /bin/tcsh, if it
isn't already.  If you're on a mission critical system you want your
default shell to be part of the base system (as opposed to being a
port), and the only clear choice for that is /bin/tcsh.  Besides it's
the default root shell too.

Also, if you are looking for a superior shell from ports you might try
zsh.  It's the best in my opinion.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Sound with FN Button

2011-03-24 Thread Polytropon
On Thu, 24 Mar 2011 22:52:03 +0100, Alokat mail...@alokat.org wrote:
 On 03/24/11 21:52, Polytropon wrote:
  On Thu, 24 Mar 2011 21:28:05 +0100, Alokatmail...@alokat.org  wrote:
  Hi,
 
  how can I use the FN Buttons to regular the sound?
  I'm using fluxbox.
  Use the xev program to check which keysymbols (or at
  least codes) are output by those keys. For example, on
  my Sun keyboard I have those for audio:
 
  141
  142
  143
 
 I get an output like this:
 
 FocusOut event, serial 31, synthetic NO, window 0x181,
  mode NotifyGrab, detail NotifyAncestor
 
 FocusIn event, serial 31, synthetic NO, window 0x181,
  mode NotifyUngrab, detail NotifyAncestor
 
 KeymapNotify event, serial 31, synthetic NO, window 0x0,
  keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
 0   0   0   0   0   0   1   0   0   0   0   0   0   0   0   0
 
 FocusOut event, serial 31, synthetic NO, window 0x181,
  mode NotifyGrab, detail NotifyAncestor
 
 FocusIn event, serial 31, synthetic NO, window 0x181,
  mode NotifyUngrab, detail NotifyAncestor
 
 KeymapNotify event, serial 31, synthetic NO, window 0x0,
  keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

You need to look for those events:

KeyPress event, serial 27, synthetic NO, window 0x201,
root 0x73, subw 0x0, time 3923776537, (162,2), root:(271,490),
state 0x10, keycode 154 (keysym 0xffd4, F23), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x201,
root 0x73, subw 0x0, time 3923776635, (162,2), root:(271,490),
state 0x10, keycode 154 (keysym 0xffd4, F23), same_screen YES,
XLookupString gives 0 bytes: 
XFilterEvent returns: False

The 2nd line, the information in the middle is important:
keycode 154 (keysym 0xffd4, F23): It indicates that the
keycode generated has been identified with the code 154,
and this code is already mapped to the symbol F23. This
is (just for completeness) the Cut key of the 2x5 field
to the left.

Erm... just a side question... you're refering to pressing
the Fn key with a function key (e. g. Fn+F1) for volume
control, or are there other special keys for volume? I'm
asking this as in the past, volume control was managed by
the BIOS (I think), but NOT by the operating system or
application programs. This means it was possible to change
the volume INDEPENDENTLY from any driver. I'm not sure if
this is still the case. Maybe - just MAYBE - you need a
hardware and software (!) specific driver to do those
basic things... history teaches that all the simple things
that worked in the past are a high mountain to climb today...
thanks to YOU, hardware manufacturers! :-)

Please understand the paragraph as follows: MAYBE (!!!) it's
not even possible to do what you're intending.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Sound with FN Button

2011-03-24 Thread Alokat

On 03/24/11 23:04, Polytropon wrote:

On Thu, 24 Mar 2011 22:52:03 +0100, Alokatmail...@alokat.org  wrote:

On 03/24/11 21:52, Polytropon wrote:

On Thu, 24 Mar 2011 21:28:05 +0100, Alokatmail...@alokat.org   wrote:

Hi,

how can I use the FN Buttons to regular the sound?
I'm using fluxbox.

Use the xev program to check which keysymbols (or at
least codes) are output by those keys. For example, on
my Sun keyboard I have those for audio:

141
142
143


I get an output like this:

FocusOut event, serial 31, synthetic NO, window 0x181,
  mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 31, synthetic NO, window 0x181,
  mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 31, synthetic NO, window 0x0,
  keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
 0   0   0   0   0   0   1   0   0   0   0   0   0   0   0   0

FocusOut event, serial 31, synthetic NO, window 0x181,
  mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 31, synthetic NO, window 0x181,
  mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 31, synthetic NO, window 0x0,
  keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

You need to look for those events:

KeyPress event, serial 27, synthetic NO, window 0x201,
 root 0x73, subw 0x0, time 3923776537, (162,2), root:(271,490),
 state 0x10, keycode 154 (keysym 0xffd4, F23), same_screen YES,
 XLookupString gives 0 bytes:
 XmbLookupString gives 0 bytes:
 XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x201,
 root 0x73, subw 0x0, time 3923776635, (162,2), root:(271,490),
 state 0x10, keycode 154 (keysym 0xffd4, F23), same_screen YES,
 XLookupString gives 0 bytes:
 XFilterEvent returns: False

The 2nd line, the information in the middle is important:
keycode 154 (keysym 0xffd4, F23): It indicates that the
keycode generated has been identified with the code 154,
and this code is already mapped to the symbol F23. This
is (just for completeness) the Cut key of the 2x5 field
to the left.

Erm... just a side question... you're refering to pressing
the Fn key with a function key (e. g. Fn+F1) for volume
control, or are there other special keys for volume? I'm
asking this as in the past, volume control was managed by
the BIOS (I think), but NOT by the operating system or
application programs. This means it was possible to change
the volume INDEPENDENTLY from any driver. I'm not sure if
this is still the case. Maybe - just MAYBE - you need a
hardware and software (!) specific driver to do those
basic things... history teaches that all the simple things
that worked in the past are a high mountain to climb today...
thanks to YOU, hardware manufacturers! :-)

Please understand the paragraph as follows: MAYBE (!!!) it's
not even possible to do what you're intending.


No I don't .. I thought it, but the volume buttons are extra buttons - 
without FN.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


ppp.conf for Verizon Mifi 2200?

2011-03-24 Thread Lawton Campbell
Hey freebsd-questions!

I've been trying to get a Verizon MiFi 2200 to work on my 8.2-RELEASE
box for the past couple of days and can't seem to get the ppp.conf to
work properly. I found a couple of recent threads about similar
devices (apparently it's just novatel stuff that gets repackaged for
different 3G providers) --

http://www.mail-archive.com/freebsd-net@freebsd.org/msg36160.html

It doesn't look like they got the Virgin Mobile version of the device
working, unfortunately. I'm stuck in a slightly different place, so
making a new thread (dunno if freebsd-net or freebsd-questions is more
appropriate, so erring to -questions). Anyway, let's get started!
Going to walkthrough what I have so far, then finally get to where I'm
stuck and detail some questions.

# THUS FAR

One quirk of the device is that you have to detach /dev/cd0 when it
mounts to expose the modem interface for u3g to grab. Looking at
usbconfig, the relevant identifiers for the device are

  idVendor = 0x1410
  idProduct = 0x5041

AFAIK, u3gstub is supposed to take care of this automagically, but
perhaps either I've misread the man page or it's missing the
vendor/product IDs. In any case, it's probably easy enough to fix with
a devd rule, so I'm not too worried about it. In any case, when the
device is attached, `camcontrol eject cd0` (or whatever cd# is
generated) has to be run --

root@ff camcontrol eject cd0

Which gives us --

Mar 25 06:06:36 ff kernel: ugen1.2: Novatel Wireless Inc. at usbus1
Mar 25 06:06:36 ff kernel: u3g0: Data Interface on usbus1
Mar 25 06:06:36 ff kernel: u3g0: Found 5 ports.

root@ff ls /dev/cuaU0.*
/dev/cuaU0.0  /dev/cuaU0.1.init /dev/cuaU0.2.lock /dev/cuaU0.4
/dev/cuaU0.0.init /dev/cuaU0.1.lock /dev/cuaU0.3  /dev/cuaU0.4.init
/dev/cuaU0.0.lock /dev/cuaU0.2  /dev/cuaU0.3.init /dev/cuaU0.4.lock
/dev/cuaU0.1  /dev/cuaU0.2.init /dev/cuaU0.3.lock

I just grabbed the stock ppp.conf from the handbook
(http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/userppp.html)
with some bits removed (the login chat script, specifically -- we'll
know if that's broken when we get there).

root@ff cat /etc/ppp/ppp.conf
default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)
 set speed 115200
 set device /dev/cuaU0.0
 set dial ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\\ AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT

 set timeout 180
 enable dns

mifi:
 set phone #777
 set authname xxxmynum...@vzw3g.com
 set authkey vzw

 set ifaddr 10.23.0.1 10.23.0.2 255.255.255.255 0.0.0.0
 add default HISADDR

However, when I run `ppp -ddial mifi`, I get --

Mar 25 06:17:43 ff ppp[10491]: tun0: Chat: Send: AT^M
Mar 25 06:17:43 ff ppp[10491]: tun0: Chat: Expect(5): OK
Mar 25 06:17:49 ff ppp[10491]: tun0: Chat: Expect timeout
Mar 25 06:17:49 ff ppp[10491]: tun0: Warning: Chat script failed

Which means we're not even communicating with the modem. Kinda weird
-- I think it's a problem in the dial script. Let's just take out the
non-default dial script and see what happens:

root@ff cat /etc/ppp/ppp.conf
default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)
 set speed 115200
 set device /dev/cuaU0.1

 set timeout 180
 enable dns

mifi:
 set phone #777
 set authname xxxmynum...@vzw3g.com
 set authkey vzw

 set ifaddr 10.23.0.1 10.23.0.2 255.255.255.255 0.0.0.0
 add default HISADDR

Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: closed - opening
Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: Connected!
Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: opening - dial
Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: dial - carrier
Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: /dev/cuaU0.1
doesn't support CD
Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: carrier - login
Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: login - lcp
Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: FSM: Using deflink as
a transport
Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: deflink: State change
Initial -- Closed
Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: deflink: State change
Closed -- Stopped
Mar 25 06:20:17 ff ppp[10518]: tun0: LCP: deflink: LayerStart
Mar 25 06:20:17 ff ppp[10518]: tun0: LCP: deflink:
SendConfigReq(1) state = Stopped
Mar 25 06:20:17 ff ppp[10518]: tun0: LCP:  ACFCOMP[2]
Mar 25 06:20:17 ff ppp[10518]: tun0: LCP:  PROTOCOMP[2]
Mar 25 06:20:17 ff ppp[10518]: tun0: LCP:  ACCMAP[6] 0x
Mar 25 06:20:17 ff ppp[10518]: tun0: LCP:  MRU[4] 1500
Mar 25 06:20:17 ff ppp[10518]: tun0: LCP:  MAGICNUM[6] 0x72c1cbf0
Mar 25 06:20:17 ff ppp[10518]: tun0: LCP: deflink: State change
Stopped -- Req-Sent
Mar 25 06:20:21 ff ppp[10518]: tun0: LCP: deflink:
SendConfigReq(1) state = Req-Sent
Mar 25 06:20:21 ff ppp[10518]: tun0: LCP:  ACFCOMP[2]
Mar 25 06:20:21 ff ppp[10518]: tun0: LCP:  

Re: why does this simple counter fail?

2011-03-24 Thread Gary Kline
On Wed, Mar 23, 2011 at 07:11:15PM +0100, Fr?d?ric Perrin wrote:
 Gary Kline kl...@thought.org writes:
  Can any of you php hackers tell me why this simple self-hacked
  counter bomb?
 
 As others said, what does 'this simple counter bomb' means?
 
  $fp = fopen($directory.$file, r+);
  flock($fp, 1);
 
 You want an exclusive lock (LOCK_EX, which is 2 is you use some ancient
 PHP), not a shared lock.
 
 When updating the file:
fputs($fp, $count);
fputs($fp, \n);
  fputs($fp, $file);
 
 Why do you feel the need to store the filename inside the file itself?
 You don't seem to need it after.


$file is passed from the calling php file.  index.php is by-hand
set to

$file='index'; 

and so on.  

Because of my shoulder/typing woes, it was great that I got clued in
above by Brad's thought that perhaos there were mis-matched ? 
and ? tags.  A simply recursive grepping found out that it some 
places I had ? cr instead of ?php cr.   Adding the php 
fixed everything.  

Finally, you're right; this really, really is ancient php.
Somthing i found pre-2004 and hacked until it worked.  The
counter is missings lots of features, but I'll fix that pretty
soon.

thanks to everybody ,


 
 -- 
 Frédéric Perrin -- http://tar-jx.bz
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 7.98a release of Jottings: http://jottings.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ppp.conf for Verizon Mifi 2200?

2011-03-24 Thread Ryan Coleman
Sounds alot like my query for the Virgin Mobile one ... I got NOWHERE.
:\

On Mar 24, 2011, at 5:31 PM, Lawton Campbell wrote:

 Hey freebsd-questions!
 
 I've been trying to get a Verizon MiFi 2200 to work on my 8.2-RELEASE
 box for the past couple of days and can't seem to get the ppp.conf to
 work properly. I found a couple of recent threads about similar
 devices (apparently it's just novatel stuff that gets repackaged for
 different 3G providers) --
 
 http://www.mail-archive.com/freebsd-net@freebsd.org/msg36160.html
 
 It doesn't look like they got the Virgin Mobile version of the device
 working, unfortunately. I'm stuck in a slightly different place, so
 making a new thread (dunno if freebsd-net or freebsd-questions is more
 appropriate, so erring to -questions). Anyway, let's get started!
 Going to walkthrough what I have so far, then finally get to where I'm
 stuck and detail some questions.
 
 # THUS FAR
 
 One quirk of the device is that you have to detach /dev/cd0 when it
 mounts to expose the modem interface for u3g to grab. Looking at
 usbconfig, the relevant identifiers for the device are
 
  idVendor = 0x1410
  idProduct = 0x5041
 
 AFAIK, u3gstub is supposed to take care of this automagically, but
 perhaps either I've misread the man page or it's missing the
 vendor/product IDs. In any case, it's probably easy enough to fix with
 a devd rule, so I'm not too worried about it. In any case, when the
 device is attached, `camcontrol eject cd0` (or whatever cd# is
 generated) has to be run --
 
 root@ff camcontrol eject cd0
 
 Which gives us --
 
 Mar 25 06:06:36 ff kernel: ugen1.2: Novatel Wireless Inc. at usbus1
 Mar 25 06:06:36 ff kernel: u3g0: Data Interface on usbus1
 Mar 25 06:06:36 ff kernel: u3g0: Found 5 ports.
 
 root@ff ls /dev/cuaU0.*
 /dev/cuaU0.0  /dev/cuaU0.1.init /dev/cuaU0.2.lock /dev/cuaU0.4
 /dev/cuaU0.0.init /dev/cuaU0.1.lock /dev/cuaU0.3  /dev/cuaU0.4.init
 /dev/cuaU0.0.lock /dev/cuaU0.2  /dev/cuaU0.3.init /dev/cuaU0.4.lock
 /dev/cuaU0.1  /dev/cuaU0.2.init /dev/cuaU0.3.lock
 
 I just grabbed the stock ppp.conf from the handbook
 (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/userppp.html)
 with some bits removed (the login chat script, specifically -- we'll
 know if that's broken when we get there).
 
 root@ff cat /etc/ppp/ppp.conf
 default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)
 set speed 115200
 set device /dev/cuaU0.0
 set dial ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
   \\ AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT
 
 set timeout 180
 enable dns
 
 mifi:
 set phone #777
 set authname xxxmynum...@vzw3g.com
 set authkey vzw
 
 set ifaddr 10.23.0.1 10.23.0.2 255.255.255.255 0.0.0.0
 add default HISADDR
 
 However, when I run `ppp -ddial mifi`, I get --
 
 Mar 25 06:17:43 ff ppp[10491]: tun0: Chat: Send: AT^M
 Mar 25 06:17:43 ff ppp[10491]: tun0: Chat: Expect(5): OK
 Mar 25 06:17:49 ff ppp[10491]: tun0: Chat: Expect timeout
 Mar 25 06:17:49 ff ppp[10491]: tun0: Warning: Chat script failed
 
 Which means we're not even communicating with the modem. Kinda weird
 -- I think it's a problem in the dial script. Let's just take out the
 non-default dial script and see what happens:
 
 root@ff cat /etc/ppp/ppp.conf
 default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)
 set speed 115200
 set device /dev/cuaU0.1
 
 set timeout 180
 enable dns
 
 mifi:
 set phone #777
 set authname xxxmynum...@vzw3g.com
 set authkey vzw
 
 set ifaddr 10.23.0.1 10.23.0.2 255.255.255.255 0.0.0.0
 add default HISADDR
 
 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: closed - opening
 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: Connected!
 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: opening - dial
 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: dial - carrier
 Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: /dev/cuaU0.1
 doesn't support CD
 Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: carrier - login
 Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: login - lcp
 Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: FSM: Using deflink as
 a transport
 Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: deflink: State change
 Initial -- Closed
 Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: deflink: State change
 Closed -- Stopped
 Mar 25 06:20:17 ff ppp[10518]: tun0: LCP: deflink: LayerStart
 Mar 25 06:20:17 ff ppp[10518]: tun0: LCP: deflink:
 SendConfigReq(1) state = Stopped
 Mar 25 06:20:17 ff ppp[10518]: tun0: LCP:  ACFCOMP[2]
 Mar 25 06:20:17 ff ppp[10518]: tun0: LCP:  PROTOCOMP[2]
 Mar 25 06:20:17 ff ppp[10518]: tun0: LCP:  ACCMAP[6] 0x
 Mar 25 06:20:17 ff ppp[10518]: tun0: LCP:  MRU[4] 1500
 Mar 25 06:20:17 ff ppp[10518]: tun0: LCP:  MAGICNUM[6] 0x72c1cbf0
 Mar 25 06:20:17 ff ppp[10518]: tun0: LCP: deflink: State 

Re: why does this simple counter fail?

2011-03-24 Thread Ryan Coleman
 Gary, you missed the put... fput($fp, $file); means you're dropping the 
filename INTO the storage file.


On Mar 24, 2011, at 6:00 PM, Gary Kline wrote:

 On Wed, Mar 23, 2011 at 07:11:15PM +0100, Fr?d?ric Perrin wrote:
 Gary Kline kl...@thought.org writes:
 Can any of you php hackers tell me why this simple self-hacked
 counter bomb?
 
 As others said, what does 'this simple counter bomb' means?
 
 $fp = fopen($directory.$file, r+);
 flock($fp, 1);
 
 You want an exclusive lock (LOCK_EX, which is 2 is you use some ancient
 PHP), not a shared lock.
 
 When updating the file:
   fputs($fp, $count);
   fputs($fp, \n);
 fputs($fp, $file);
 
 Why do you feel the need to store the filename inside the file itself?
 You don't seem to need it after.
 
 
   $file is passed from the calling php file.  index.php is by-hand
   set to
 
   $file='index'; 
 
   and so on.  
 
   Because of my shoulder/typing woes, it was great that I got clued in
   above by Brad's thought that perhaos there were mis-matched ? 
   and ? tags.  A simply recursive grepping found out that it some 
   places I had ? cr instead of ?php cr.   Adding the php 
   fixed everything.  
 
   Finally, you're right; this really, really is ancient php.
   Somthing i found pre-2004 and hacked until it worked.  The
   counter is missings lots of features, but I'll fix that pretty
   soon.
 
   thanks to everybody ,
 
 
 
 -- 
 Frédéric Perrin -- http://tar-jx.bz
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
 
 -- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 7.98a release of Jottings: http://jottings.thought.org
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ppp.conf for Verizon Mifi 2200?

2011-03-24 Thread Lawton Campbell
On Thu, Mar 24, 2011 at 5:24 PM, Ryan Coleman edi...@d3photography.com wrote:
 Sounds alot like my query for the Virgin Mobile one ... I got NOWHERE.
 :\

Haha yeah, I was really excited when I originally found your thread.
What does yours do if you give it my ppp.conf (with your
phone/authname/authkey subbed in)? Does it also get stuck sending LCP
requests for configuration and never receiving an intelligible reply?

 On Mar 24, 2011, at 5:31 PM, Lawton Campbell wrote:

 Hey freebsd-questions!

 I've been trying to get a Verizon MiFi 2200 to work on my 8.2-RELEASE
 box for the past couple of days and can't seem to get the ppp.conf to
 work properly. I found a couple of recent threads about similar
 devices (apparently it's just novatel stuff that gets repackaged for
 different 3G providers) --

 http://www.mail-archive.com/freebsd-net@freebsd.org/msg36160.html

 It doesn't look like they got the Virgin Mobile version of the device
 working, unfortunately. I'm stuck in a slightly different place, so
 making a new thread (dunno if freebsd-net or freebsd-questions is more
 appropriate, so erring to -questions). Anyway, let's get started!
 Going to walkthrough what I have so far, then finally get to where I'm
 stuck and detail some questions.

 # THUS FAR

 One quirk of the device is that you have to detach /dev/cd0 when it
 mounts to expose the modem interface for u3g to grab. Looking at
 usbconfig, the relevant identifiers for the device are

  idVendor = 0x1410
  idProduct = 0x5041

 AFAIK, u3gstub is supposed to take care of this automagically, but
 perhaps either I've misread the man page or it's missing the
 vendor/product IDs. In any case, it's probably easy enough to fix with
 a devd rule, so I'm not too worried about it. In any case, when the
 device is attached, `camcontrol eject cd0` (or whatever cd# is
 generated) has to be run --

 root@ff camcontrol eject cd0

 Which gives us --

 Mar 25 06:06:36 ff kernel: ugen1.2: Novatel Wireless Inc. at usbus1
 Mar 25 06:06:36 ff kernel: u3g0: Data Interface on usbus1
 Mar 25 06:06:36 ff kernel: u3g0: Found 5 ports.

 root@ff ls /dev/cuaU0.*
 /dev/cuaU0.0      /dev/cuaU0.1.init /dev/cuaU0.2.lock /dev/cuaU0.4
 /dev/cuaU0.0.init /dev/cuaU0.1.lock /dev/cuaU0.3      /dev/cuaU0.4.init
 /dev/cuaU0.0.lock /dev/cuaU0.2      /dev/cuaU0.3.init /dev/cuaU0.4.lock
 /dev/cuaU0.1      /dev/cuaU0.2.init /dev/cuaU0.3.lock

 I just grabbed the stock ppp.conf from the handbook
 (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/userppp.html)
 with some bits removed (the login chat script, specifically -- we'll
 know if that's broken when we get there).

 root@ff cat /etc/ppp/ppp.conf
 default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)
 set speed 115200
 set device /dev/cuaU0.0
 set dial ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
       \\ AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT

 set timeout 180
 enable dns

 mifi:
 set phone #777
 set authname xxxmynum...@vzw3g.com
 set authkey vzw

 set ifaddr 10.23.0.1 10.23.0.2 255.255.255.255 0.0.0.0
 add default HISADDR

 However, when I run `ppp -ddial mifi`, I get --

 Mar 25 06:17:43 ff ppp[10491]: tun0: Chat: Send: AT^M
 Mar 25 06:17:43 ff ppp[10491]: tun0: Chat: Expect(5): OK
 Mar 25 06:17:49 ff ppp[10491]: tun0: Chat: Expect timeout
 Mar 25 06:17:49 ff ppp[10491]: tun0: Warning: Chat script failed

 Which means we're not even communicating with the modem. Kinda weird
 -- I think it's a problem in the dial script. Let's just take out the
 non-default dial script and see what happens:

 root@ff cat /etc/ppp/ppp.conf
 default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)
 set speed 115200
 set device /dev/cuaU0.1

 set timeout 180
 enable dns

 mifi:
 set phone #777
 set authname xxxmynum...@vzw3g.com
 set authkey vzw

 set ifaddr 10.23.0.1 10.23.0.2 255.255.255.255 0.0.0.0
 add default HISADDR

 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: closed - opening
 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: Connected!
 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: opening - dial
 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: dial - carrier
 Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: /dev/cuaU0.1
 doesn't support CD
 Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: carrier - login
 Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: login - lcp
 Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: FSM: Using deflink as
 a transport
 Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: deflink: State change
 Initial -- Closed
 Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: deflink: State change
 Closed -- Stopped
 Mar 25 06:20:17 ff ppp[10518]: tun0: LCP: deflink: LayerStart
 Mar 25 06:20:17 ff ppp[10518]: tun0: LCP: deflink:
 SendConfigReq(1) state = Stopped
 Mar 25 06:20:17 ff ppp[10518]: tun0: LCP:  ACFCOMP[2]

Re: ppp.conf for Verizon Mifi 2200?

2011-03-24 Thread Ryan Coleman
No clue, I haven't touched it in two weeks. I'll try again next week - after I 
wrap another shoot where I wish I had it.
--
Ryan

On Mar 24, 2011, at 9:03 PM, Lawton Campbell wrote:

 On Thu, Mar 24, 2011 at 5:24 PM, Ryan Coleman edi...@d3photography.com 
 wrote:
 Sounds alot like my query for the Virgin Mobile one ... I got NOWHERE.
 :\
 
 Haha yeah, I was really excited when I originally found your thread.
 What does yours do if you give it my ppp.conf (with your
 phone/authname/authkey subbed in)? Does it also get stuck sending LCP
 requests for configuration and never receiving an intelligible reply?
 
 On Mar 24, 2011, at 5:31 PM, Lawton Campbell wrote:
 
 Hey freebsd-questions!
 
 I've been trying to get a Verizon MiFi 2200 to work on my 8.2-RELEASE
 box for the past couple of days and can't seem to get the ppp.conf to
 work properly. I found a couple of recent threads about similar
 devices (apparently it's just novatel stuff that gets repackaged for
 different 3G providers) --
 
 http://www.mail-archive.com/freebsd-net@freebsd.org/msg36160.html
 
 It doesn't look like they got the Virgin Mobile version of the device
 working, unfortunately. I'm stuck in a slightly different place, so
 making a new thread (dunno if freebsd-net or freebsd-questions is more
 appropriate, so erring to -questions). Anyway, let's get started!
 Going to walkthrough what I have so far, then finally get to where I'm
 stuck and detail some questions.
 
 # THUS FAR
 
 One quirk of the device is that you have to detach /dev/cd0 when it
 mounts to expose the modem interface for u3g to grab. Looking at
 usbconfig, the relevant identifiers for the device are
 
  idVendor = 0x1410
  idProduct = 0x5041
 
 AFAIK, u3gstub is supposed to take care of this automagically, but
 perhaps either I've misread the man page or it's missing the
 vendor/product IDs. In any case, it's probably easy enough to fix with
 a devd rule, so I'm not too worried about it. In any case, when the
 device is attached, `camcontrol eject cd0` (or whatever cd# is
 generated) has to be run --
 
 root@ff camcontrol eject cd0
 
 Which gives us --
 
 Mar 25 06:06:36 ff kernel: ugen1.2: Novatel Wireless Inc. at usbus1
 Mar 25 06:06:36 ff kernel: u3g0: Data Interface on usbus1
 Mar 25 06:06:36 ff kernel: u3g0: Found 5 ports.
 
 root@ff ls /dev/cuaU0.*
 /dev/cuaU0.0  /dev/cuaU0.1.init /dev/cuaU0.2.lock /dev/cuaU0.4
 /dev/cuaU0.0.init /dev/cuaU0.1.lock /dev/cuaU0.3  /dev/cuaU0.4.init
 /dev/cuaU0.0.lock /dev/cuaU0.2  /dev/cuaU0.3.init /dev/cuaU0.4.lock
 /dev/cuaU0.1  /dev/cuaU0.2.init /dev/cuaU0.3.lock
 
 I just grabbed the stock ppp.conf from the handbook
 (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/userppp.html)
 with some bits removed (the login chat script, specifically -- we'll
 know if that's broken when we get there).
 
 root@ff cat /etc/ppp/ppp.conf
 default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)
 set speed 115200
 set device /dev/cuaU0.0
 set dial ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
   \\ AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT
 
 set timeout 180
 enable dns
 
 mifi:
 set phone #777
 set authname xxxmynum...@vzw3g.com
 set authkey vzw
 
 set ifaddr 10.23.0.1 10.23.0.2 255.255.255.255 0.0.0.0
 add default HISADDR
 
 However, when I run `ppp -ddial mifi`, I get --
 
 Mar 25 06:17:43 ff ppp[10491]: tun0: Chat: Send: AT^M
 Mar 25 06:17:43 ff ppp[10491]: tun0: Chat: Expect(5): OK
 Mar 25 06:17:49 ff ppp[10491]: tun0: Chat: Expect timeout
 Mar 25 06:17:49 ff ppp[10491]: tun0: Warning: Chat script failed
 
 Which means we're not even communicating with the modem. Kinda weird
 -- I think it's a problem in the dial script. Let's just take out the
 non-default dial script and see what happens:
 
 root@ff cat /etc/ppp/ppp.conf
 default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)
 set speed 115200
 set device /dev/cuaU0.1
 
 set timeout 180
 enable dns
 
 mifi:
 set phone #777
 set authname xxxmynum...@vzw3g.com
 set authkey vzw
 
 set ifaddr 10.23.0.1 10.23.0.2 255.255.255.255 0.0.0.0
 add default HISADDR
 
 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: closed - opening
 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: Connected!
 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: opening - dial
 Mar 25 06:20:15 ff ppp[10518]: tun0: Phase: deflink: dial - carrier
 Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: /dev/cuaU0.1
 doesn't support CD
 Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: carrier - login
 Mar 25 06:20:16 ff ppp[10518]: tun0: Phase: deflink: login - lcp
 Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: FSM: Using deflink as
 a transport
 Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: deflink: State change
 Initial -- Closed
 Mar 25 06:20:16 ff ppp[10518]: tun0: LCP: deflink: State change
 Closed -- 

Re: why does this simple counter fail?

2011-03-24 Thread Gary Kline
On Thu, Mar 24, 2011 at 06:25:39PM -0500, Ryan Coleman wrote:
  Gary, you missed the put... fput($fp, $file); means you're dropping the 
 filename INTO the storage file.


okay.  [maybe].  i think what the script does is create
./countdir/$file ; in this case, ./countdir/index where i create
the file named index\n and below it the integer count.  e.g.:

in directory countdir, in file index is:

index
60311

to track the hits for my homepage.   in defense of this crude
hack with no error-checking is that i have used the same script
in at least three other virtual thought.org websites.   

i was wrong is saying that the script bombed; it just failed;
the reason was that the initial tag had been ? rather than
?php

gary


 
 
 On Mar 24, 2011, at 6:00 PM, Gary Kline wrote:
 
  On Wed, Mar 23, 2011 at 07:11:15PM +0100, Fr?d?ric Perrin wrote:
  Gary Kline kl...@thought.org writes:
Can any of you php hackers tell me why this simple self-hacked
counter bomb?
  
  As others said, what does 'this simple counter bomb' means?
  
  $fp = fopen($directory.$file, r+);
  flock($fp, 1);
  
  You want an exclusive lock (LOCK_EX, which is 2 is you use some ancient
  PHP), not a shared lock.
  
  When updating the file:
  fputs($fp, $count);
  fputs($fp, \n);
  fputs($fp, $file);
  
  Why do you feel the need to store the filename inside the file itself?
  You don't seem to need it after.
  
  
  $file is passed from the calling php file.  index.php is by-hand
  set to
  
  $file='index'; 
  
  and so on.  
  
  Because of my shoulder/typing woes, it was great that I got clued in
  above by Brad's thought that perhaos there were mis-matched ? 
  and ? tags.  A simply recursive grepping found out that it some 
  places I had ? cr instead of ?php cr.   Adding the php 
  fixed everything.  
  
  Finally, you're right; this really, really is ancient php.
  Somthing i found pre-2004 and hacked until it worked.  The
  counter is missings lots of features, but I'll fix that pretty
  soon.
  
  thanks to everybody ,
  
  
  
  -- 
  Frédéric Perrin -- http://tar-jx.bz
  
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to 
  freebsd-questions-unsubscr...@freebsd.org
  
  -- 
  Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
Journey Toward the Dawn, E-Book: http://www.thought.org
   The 7.98a release of Jottings: http://jottings.thought.org
  
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
 
 

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 7.98a release of Jottings: http://jottings.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org