Re: working SIP phone for FreeBSD?

2012-12-25 Thread Hans Petter Selasky
Hi,

Linphone has fixed support for video under FreeBSD in SVN/GIT at least. Just 
google for that. There are patches you can try.

--HPS
___
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: working SIP phone for FreeBSD?

2012-12-25 Thread Hans Petter Selasky
On Tuesday 25 December 2012 10:05:00 Hans Petter Selasky wrote:
 Hi,
 
 Linphone has fixed support for video under FreeBSD in SVN/GIT at least.
 Just google for that. There are patches you can try.
 
 --HPS

Reference:

http://lists.debian.org/debian-bsd/2012/09/msg00060.html

--HPS
___
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: working SIP phone for FreeBSD?

2012-12-25 Thread Hans Petter Selasky
On Tuesday 25 December 2012 10:13:35 Hans Petter Selasky wrote:
 On Tuesday 25 December 2012 10:05:00 Hans Petter Selasky wrote:
  Hi,
  
  Linphone has fixed support for video under FreeBSD in SVN/GIT at least.
  Just google for that. There are patches you can try.
  
  --HPS
 
 Reference:
 
 http://lists.debian.org/debian-bsd/2012/09/msg00060.html
 
 --HPS

You can try this meanwhile the maintainers fix the port:

http://hselasky.homeunix.org:8192/linphone-base.tar.bz

MD5 (linphone-base.tar.bz) = c721d016c57ad4d90da228dd4a2b9508

cd /usr/ports/net

tar -jxvf linphone-base.tar.bz

cd linphone

make all deinstall install clean

--HPS
___
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: USB system: FreeBSD 9-STABLE and 10-CURRENT do not recognize 64GB USB drive while Linux and Windows do

2012-06-23 Thread Hans Petter Selasky
On Saturday 23 June 2012 11:52:53 Adrian Chadd wrote:
 On 21 June 2012 23:22, Hans Petter Selasky hsela...@c2i.net wrote:
  usbconfig -d 7.6 add_quirk UQ_MSC_NO_INQUIRY
  
  Then re-plug it.
  
  I'm sorry to say a lot of USB flash sticks out there are broken and only
  tested with the timing of MS Windows. Part of the problem is that it is
  difficult to autodetect these issues, because once you trigger the non-
  supported SCSI command, then the flash key stops working like you
  experience.
  
  I would be more than glad to open up an office to certify USB devices for
  use with FreeBSD :-)
 
 Question - if that's the case, then why are we even doing that by default?
 

Hi,

Do you want a blacklist or do you want a whitelist? Please explain the pros 
and cons.

I believe that those that program wrong shall be held responsible for that and 
given a chance to clean up, and not the opposite way around. As a senior 
programmer I can only testify that many people care equally little about what 
their computer is made of and what they eat. We probably need a control body 
to certify USB devices that is cheaper than USB.org, simply put.

I think it is a bad idea to cripple all USB SCSI devices because what looks 
like the majority do not obey the rules of the specifications they are 
supposed to support. Else we need to make a new USB SCSI class for devices 
that are certified and one for devices that are not certified. Non-certified 
devices can have a limited SCSI command set, which should be implemented in 
the CAM layer like some kind of flag.

If we could join heads on the Linux guys on this, we might be able to do 
something! Like having a pop-up every time a USB device fails certain tests.

From the history we can predict what people will do when they do not know what 
they are doing. They will nail the guy doing it right and let the guy doing it 
wrong go free. And it seems like this happened before too ;-)

I have a personal FreeBSD-native USB test utilty that runs mass storage 
devices through a series of tests. Most USB mass storage devices I've tested 
so far have obvious bugs, which either means their firmware can be hacked or 
made to crash.

Also worth noting, that many USB device are not certified at all. It might be 
clever to look for the USB logo from USB.org next time you want to transfer X 
GB of personal data from location X to Y.

--HPS
___
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: USB system: FreeBSD 9-STABLE and 10-CURRENT do not recognize 64GB USB drive while Linux and Windows do

2012-06-22 Thread Hans Petter Selasky
On Friday 22 June 2012 08:01:38 O. Hartmann wrote:
 I have a USB drive/stick, Lexar USB Flash drive as reported by FreeBSD
 shown below.
 When first used, I was able to put approx. 30 GB of data on it - it was
 visible to FreeBSD 9 and 10 as expected.
 A Linux system at the lab was also capable of recognizing it. After
 that, I tried to operate on the stick on a Notebook, FreeBSD 9, and
 another station, FreeBSD 10. But FreeBSD didn't recognize the USB drive
 anymore - sometimes, but this seems to be a gambling issue :-(
 
 Trying Linux on different hardware platforms and even those machines
 prior not recognizing the USB drive do recognize the drive as Lexar USB
 Flash drive with 64GB. That is Suse Linux (some 12.XX), that is Ubuntu
 12.04, that is Windows 7 Pro/x64. I can format the drive, I can push and
 pull data from it.
 
 So, since the USB drive won't work with three different FreeBSD boxes
 (one running 9-STABLE, two 10-CURRENT, all systems most recent sources
 and buildworld from a day ago).
 I suspect either a weird configuration issue I use on all platforms in
 questions in common triggering the weird beviour - or FreeBSD is simply
 incapable of handling the 64GB drive. I do not have issues with USB
 drives with capacities of 32, 8 or 4 GB of different brands.
 
 As shown in the portion of the dmesg below, the USB drive is recognized
 physically. It doesn't matter whether USB port I use (I tried all
 available on all boxes and in most cases I use a Dell UltraSharp powered
 in-screen HUB). Since other OSes handle the drive as expected, I exclude
 hardware issues.
 
 All FreeBSD in common is the fact I use the new device ahaci/device ata
 CAM/ATA scheme with devcie scbus in the kernel (I use custom kernels!).
 
 Apart from trying a GENERIC kernel (which is next I will do this
 weekend), does anyone have similar experiences and probably solutions?
 
 Regards,
 oh
 
 ugen7.6: Lexar at usbus7
 umass1: Lexar USB Flash Drive, class 0/0, rev 2.00/11.00, addr 6 on
 usbus7 (probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 0 0 0 24 0
 (probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
 (probe0:umass-sim1:1:0:0): Retrying command
 (probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 0 0 0 24 0
 (probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
 (probe0:umass-sim1:1:0:0): Retrying command
 (probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 0 0 0 24 0
 (probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
 (probe0:umass-sim1:1:0:0): Retrying command
 (probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 0 0 0 24 0
 (probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
 (probe0:umass-sim1:1:0:0): Retrying command
 (probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 0 0 0 24 0
 (probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
 (probe0:umass-sim1:1:0:0): Error 5, Retries exhausted

Hi,

After plugging the device, try:

usbconfig -d 7.6 add_quirk UQ_MSC_NO_INQUIRY

Then re-plug it.

I'm sorry to say a lot of USB flash sticks out there are broken and only 
tested with the timing of MS Windows. Part of the problem is that it is 
difficult to autodetect these issues, because once you trigger the non-
supported SCSI command, then the flash key stops working like you experience.

I would be more than glad to open up an office to certify USB devices for use 
with FreeBSD :-)

--HPS
___
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: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash

2012-03-29 Thread Hans Petter Selasky
On Thursday 29 March 2012 15:42:42 Joe Greco wrote:
  Hi,

Do both 32- and 64-bit versions of FreeBSD crash?

--HPS
___
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: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash

2012-03-29 Thread Hans Petter Selasky
On Thursday 29 March 2012 17:49:30 Joe Greco wrote:
  On Thursday 29 March 2012 15:42:42 Joe Greco wrote:
Hi,
  
  Do both 32- and 64-bit versions of FreeBSD crash?
 
 We've only seen it happen on one virtual machine.  That was a 32-bit
 version.  And it's not so much a crash as it is a disk I/O hang.

It almost sounds like the lost interrupt issue I've seen with USB EHCI 
devices, though disk I/O should have a retry timeout?

What does wmstat -i output?

--HPS
___
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: webcamd and device numbering

2012-02-20 Thread Hans Petter Selasky
Hi,

Use the -v option to enforce a custom Video device number.

Match the USB adapters by VID+PID and serial number in 
/usr/local/etc/rc.d/webcamd

--HPS
___
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: webcamd startup problems

2012-01-25 Thread Hans Petter Selasky
Hi,

 

Webcamd is started by devd. In rc.conf, try:

 

devd_enable=YES

 

--HPS

___
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: restore(8) to UFS on USB key: terrible slow

2011-12-08 Thread Hans Petter Selasky
On Thursday 08 December 2011 07:37:12 Matthias Apitz wrote:
 Hello,
 
 I encounter the following problem with UFS file systems on USB keys,
 i.e. the problem is not only with one key, but with all I have; the key
 in question here is:
 
 Dec  7 22:17:47 tinyCurrent kernel: umass0: Generic Mass Storage, class
 0/0, rev 2.00/1.02, addr 3 on usbus4 Dec  7 22:17:47 tinyCurrent kernel:
 umass0:  SCSI over Bulk-Only; quirks = 0x4101 Dec  7 22:17:47 tinyCurrent
 root: Unknown USB device: vendor 0x058f product 0x6387 bus uhub4 Dec  7
 22:17:48 tinyCurrent kernel: umass0:0:0:-1: Attached to scbus0 Dec  7
 22:17:48 tinyCurrent kernel: da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
 Dec  7 22:17:48 tinyCurrent kernel: da0: Generic Flash Disk 8.07
 Removable Direct Access SCSI-2 device Dec  7 22:17:48 tinyCurrent kernel:
 da0: 40.000MB/s transfers
 Dec  7 22:17:48 tinyCurrent kernel: da0: 7650MB (15667200 512 byte sectors:
 255H 63S/T 975C)
 
 and the system is:
 
 $ uname -a
 FreeBSD tinyCurrent 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r21: Thu Oct 28
 10:56:32 CEST 2010
 
 The key was formatted the usual way for receiving a complete FreeBSD
 system for installation purpose:
 
 # fdisk -I da0
 # fdisk -B da0
 # bsdlabel -w da0s1 auto
 # bsdlabel -B da0s1
 # bsdlabel -e da0s1
 # newfs /dev/da0s1a
 # mount /dev/da0s1a /mnt
 
 When I now bulk write a big file to the file system, the write
 performance is reasonable fast, even with blocks of 512 bytes,
 it gives 2 MByte / sec:
 
 # dd if=usb.dmp of=/mnt/byte
 10926520+0 records in
 10926520+0 records out
 5594378240 bytes transferred in 2538.942585 secs (2203428 bytes/sec)
 

Hello!

The default block size of dd is 512 bytes. Try setting bs=65536 :-)

--HPS
___
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: restore(8) to UFS on USB key: terrible slow

2011-12-08 Thread Hans Petter Selasky
On Thursday 08 December 2011 10:19:43 Matthias Apitz wrote:
 El día Thursday, December 08, 2011 a las 10:10:36AM +0100, Hans Petter 
Selasky escribió:
   # fdisk -I da0
   # fdisk -B da0
   # bsdlabel -w da0s1 auto
   # bsdlabel -B da0s1
   # bsdlabel -e da0s1
   # newfs /dev/da0s1a
   # mount /dev/da0s1a /mnt
   
   When I now bulk write a big file to the file system, the write
   performance is reasonable fast, even with blocks of 512 bytes,
   it gives 2 MByte / sec:
   
   # dd if=usb.dmp of=/mnt/byte
   10926520+0 records in
   10926520+0 records out
   5594378240 bytes transferred in 2538.942585 secs (2203428 bytes/sec)
  
  Hello!
  
  The default block size of dd is 512 bytes. Try setting bs=65536 :-)
 
 Hello Hans,
 
 I know (as I said) that dd(1) per default writes in blocks of 512 bytes;
 but this is not the problem; the problem is the poor performance of
 restore(8); the dd(1) was just to see if the USB key performs fast
 enough in general; please read my post again :-)

Hi,

The restore utility also has a -b option for blocksize. Did you try that?

--HPS
___
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: restore(8) to UFS on USB key: terrible slow

2011-12-08 Thread Hans Petter Selasky
On Thursday 08 December 2011 12:24:18 Matthias Apitz wrote:
 El día Thursday, December 08, 2011 a las 11:47:46AM +0100, Hans Petter 
Selasky escribió:
   I know (as I said) that dd(1) per default writes in blocks of 512
   bytes; but this is not the problem; the problem is the poor
   performance of restore(8); the dd(1) was just to see if the USB key
   performs fast enough in general; please read my post again :-)
  
  Hi,
  
  The restore utility also has a -b option for blocksize. Did you try
  that?
 
 Hi,
 
 I know, but I think this does not make any diff, because at the moment
 restore(8) is only creating (empty) dirs and not storing files to the
 disk; if one watches the restore(8) with truss(1) it looks like this:
 
 # truss -p 2123
 write(1,Make node ./home/guru/myThings/F...,80) = 80 (0x50)
 lseek(4,0x0,SEEK_CUR)= 4517312 (0x44edc0)
 lseek(4,0x44ec98,SEEK_SET)   = 4517016 (0x44ec98)
 read(4,7t\^W\0\f\0\^D\^A.\0\0\0(t\^W\0...,1024) = 1024 (0x400)
 lseek(4,0x0,SEEK_CUR)= 4518040 (0x44f098)
 mkdir(./home/guru/myThings/FreeBSD/9-CURRENT/src/secure/libexec/sftp-serve
 r/.svn,0777) = 0 (0x0)
 write(1,Make node ./home/guru/myThings/F...,85) = 85 (0x55)
 lseek(4,0x0,SEEK_CUR)= 4518040 (0x44f098)
 lseek(4,0x44ece0,SEEK_SET)   = 4517088 (0x44ece0)
 read(4,8t\^W\0\f\0\^D\^A.\0\0\0007t\^W...,1024) = 1024 (0x400)
 lseek(4,0x0,SEEK_CUR)= 4518112 (0x44f0e0)
 
 i.e. it goes through the DUMP and makes the directories; and any
 mkdir(2) takes seconds!!!
 
 one can even see this with:
 

Hi,

If it is a umass problem you will see USB timeouts. Else it is not a USB 
problem.

Try setting hw.usb.ehci.lostintrbug=1 in /boot/loader.conf.

--HPS
___
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: restore(8) to UFS on USB key: terrible slow

2011-12-08 Thread Hans Petter Selasky
BTW:

Check USB traffic with usbdump utility.

--HPS
___
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: restore(8) to UFS on USB key: terrible slow

2011-12-08 Thread Hans Petter Selasky
On Thursday 08 December 2011 15:52:04 Matthias Apitz wrote:
 El día Thursday, December 08, 2011 a las 03:40:06PM +0100, Hans Petter 
Selasky escribió:
  BTW:
  
  Check USB traffic with usbdump utility.
 
 I don't see this 'usbdump', neither in the system nor in ports;
 
 BTW: I've checked the dump, it contains 50.000 dirs and 200.000 files
 (because of complete /usr/src and /usr/obl files incl. .svn dirs);
 Is this (50.000 x mkdir(2)) to much for USB?

Hi,

USB can at maximum do 8000/3 512byte R/W READ_10 or WRITE_10.

Usbdump is available in 8-stable and 9-stable.

--HPS
___
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: restore(8) to UFS on USB key: terrible slow

2011-12-08 Thread Hans Petter Selasky
On Thursday 08 December 2011 15:58:42 Hans Petter Selasky wrote:
 On Thursday 08 December 2011 15:52:04 Matthias Apitz wrote:
  El día Thursday, December 08, 2011 a las 03:40:06PM +0100, Hans Petter
 
 Selasky escribió:
   BTW:
   
   Check USB traffic with usbdump utility.
  
  I don't see this 'usbdump', neither in the system nor in ports;
  
  BTW: I've checked the dump, it contains 50.000 dirs and 200.000 files
  (because of complete /usr/src and /usr/obl files incl. .svn dirs);
  Is this (50.000 x mkdir(2)) to much for USB?
 
 Hi,
 
 USB can at maximum do 8000/3 512byte R/W READ_10 or WRITE_10.

Per second.

 
 Usbdump is available in 8-stable and 9-stable.
 

--HPS
___
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: ugen4.2: Unknown at usbus4 (disconnected)

2011-10-02 Thread Hans Petter Selasky
On Sunday 02 October 2011 10:47:33 Ivan Klymenko wrote:
 Hi all!
 
 I have an Acer Aspire 5720. And built in a WebCam Crystal Eye.
 
 uname -a
 FreeBSD nonamehost1 9.0-BETA2 FreeBSD 9.0-BETA2 #0 r225700: Tue Sep 27
 12:30:24 EEST 2011 user@nonamehost1:/usr/obj/usr/src/sys/mk9  amd64
 
 When a booting OS visible line: ugen4.2: Unknown at usbus4 (disconnected)
 ...
 ichsmb0: Intel 82801H (ICH8) SMBus controller port 0x6000-0x601f mem
 0x9b305000-0x9b3050ff irq 19 at device 31.3 on pci0 smbus0: System
 Management Bus on ichsmb0
 ugen4.2: Unknown at usbus4 (disconnected)

Your webcam should appear like an USB device typically. Could you look for 
more occurrences of ugen4.2 in dmesg?

Webcamd will start automatically when it sees your webcam.

--HPS
___
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: vlc, webcam streaming

2011-03-22 Thread Hans Petter Selasky
On Tuesday 22 March 2011 15:16:56 Jimmie James wrote:
 Camera works fine with skype, emesene work wonderfully, mplayer gives me
 an image, but it flashes between green screen and the actual images.
 
 Full vlc -vv output is here,  http://pastebin.com/MaEP6f6R (highlights
 below) Anyone have a suggestion/hint/tip?
 
 VLC is unable to open the MRL 'v4l://'. Check the log for details.

Hi,

I think VLC removed support for Webcams. Only video streaming devices and DVB-
X devices are supported.

Flickering pictures might be due to lack of buffering in webcamd.

Could you dump the config descriptor with usbconfig for your device?

Which version of webcamd are you using?

--HPS
___
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: Keyboard repeat issues with Dell Optiplex 980s

2011-01-19 Thread Hans Petter Selasky
On Wednesday 19 January 2011 15:51:41 Steve Polyack wrote:
 On 01/19/11 08:48, Steve Polyack wrote:
  On 1/18/2011 5:56 PM, Jeremy Chadwick wrote:
  On Tue, Jan 18, 2011 at 04:40:13PM -0500, Steve Polyack wrote:
  We've recently upgraded a few desktop workstations from Dell
  Optiplex 960s to Optiplex 980s.  We were running FreeBSD
  8.1-RELEASE.  The migration was performed by simply swapping the
  drives into the new systems.  Immediately after switching people
  over, they all began to report bizarre keyboard issues - things like
  infinite key repeats (letters, numbers, enter) for keys they did
  not hold down.  The key repeats continue indefinitely until another
  key is pressed.  Occasionally, even mouse input will trigger similar
  infinite keyboard input repetition.  In addition to the repeat
  issue, sometimes physical key-presses are not registered by FreeBSD,
  leading to typos and angry developers.
  
  We've tried doing fresh installs of FreeBSD 8.2-RC2 on two of these
  systems, and the issue persists.  Because of the observed behavior,
  I'm thinking that this is due to new hardware in the 980s which
  isn't timing or handling interrupts correctly under the FreeBSD
  kernel.
  
  Looking at a 'pciconf -lvb' from each system, I noticed that the 980
  has two USB controllers which probe under ehci(4), while the 960
  (which does not exhibit this problem), enumerates six uhci(4)
  controllers and two ehci(4) controllers.  To cut to the chase here,
  the 960 users' keyboards probe under a USB1.0 uhci(4), while the
  980s only have ehci(4) devices to attach to.
  
  So, I guess what I'm asking is - has anyone else seen any keyboard
  repeat or other USB craziness with ehci(4) ports or otherwise Intel
  PCH controllers?Any fellow Optiplex 980 users?  I'd be more than
  happy to provide pciconf or other output if requested.
  
  Try adding the following to /boot/loader.conf then reboot and see if
  the excessive repeat behaviour changes:
  
  hint.kbdmux.0.disabled=1
  
  It would also help if you would state exactly what brand/model of
  keyboard is used.  Yes, believe it or not, it matters.  dmesg output
  would be helpful in this case.
  
  The keyboard is also a Dell model - model KB1421, or listed as Dell
  QuiteKey Keyboard under dmesg.  The same keyboard does not exhibit
  the strange behavior when used with the older model of tower (Optiplex
  960).
  
   I'll reboot today with the loader.conf hint you provided.  I'll let
  
  you guys know if it helps.  Thanks!
 
 The problem still exists with the kbdmux.0.disabled hint.  It definitely
 took effect, as there is no longer a /dev/kbdmux0, and dmesg lists the
 refusal to register the kbdmux module.  Any other ideas?  We've tried
 playing with the hw.usb.ehci.lostinrbug and hw.usb.ehci.no_hs sysctls,
 but they don't make a difference either.
 
 Looking at the ehci(4) man page, this sticks out at me:
 BUGS
   The driver is not finished and is quite buggy.
 
   There is currently no support for isochronous transfers.

For FreeBSD 8+ this is not true. Probably the manpage has not been updated. 
Hence you are seeing a different number of UHCI controllers, this looks like 
an ACPI problem. USB keyboards usually require a UHCI to enumerate. The EHCI 
can only enumerate High Speed devices.

--HPS
___
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: lock contention problem?

2011-01-13 Thread Hans Petter Selasky
On Thursday 13 January 2011 21:28:15 dieter...@engineer.com wrote:
 I suspect that I have a problem with lock/mutex contention.
 Reading from a USB disk appears to lock out the firewire driver
 for too long, causing data transfer (writing to firewire bus) to fail
 with EAGAIN.  Once it fails it does not recover.
 
 kernel: fwohci1: IT DMA underrun (0x40308011)  (stat 
 OHCI_CNTL_CYCMATCH_S)
 last message repeated 63 times
 This is from the end of the fwohci_itxbuf_enable() function in
 dev/firewire/fwohci.c
 
 I added LOCK_PROFILING to the kernel and gathered some data.
 The data is quite verbose, so I sorted by max and am including
 the first 40 lines.  This is a true real-time task, so I am concerned
 with the worst case rather than the average.
 

Hi,

It might be a hardware resource starvation problem. It is possible to nice 
umass by simply adding a line like:

.interval = 2,/* 2 milliseconds */

Inside the following structure in /sys/dev/usb/storage/umass.c :
umass_bbb_config[]

In states:
UMASS_T_BBB_DATA_WRITE
UMASS_T_BBB_DATA_READ

Another idea:
http://svn.freebsd.org/changeset/base/217350

--HPS
___
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: USB disk on CS5536 unstable

2010-10-13 Thread Hans Petter Selasky
On Saturday 09 October 2010 11:06:19 Anselm Strauss wrote:
 On 10/07/10 22:59, Lowell Gilbert wrote:
  Anselm Strauss amsiba...@gmail.com writes:
  On 10/02/10 16:39, Hans Petter Selasky wrote:
  On Saturday 02 October 2010 14:44:07 Anselm Strauss wrote:
  On 09/30/10 21:38, Hans Petter Selasky wrote:
  On Thursday 30 September 2010 21:10:59 Anselm Strauss wrote:
  Maybe sending it to just the USB list was too specific ...
  
  On 09/30/10 00:08, Anselm Strauss wrote:
  Hi
  
  I have an ALIX board that has an AMD Geode and the CS5536 companion
  chip with integrated USB on it. When I connect a USB disk I have
  observed various problems. For example when I run fsck_ufs on a 250
  GB partition the process gets stuck in biord state and fsck
  reports unreadable sectors. When I do a dd over the whole disk and
  direct it to /dev/null it suddenly returns with no error, but
  having read only a small fraction of the disk. I tried it with two
  different disks and two different ALIX boards. I'm pretty sure the
  disks are okay since I tried them on other hardware.
  
  As far as I know there was some trouble with the chip regarding
  timeouts. Under load after some time the USB just stops responding.
  I have tried 8.0 and 8.1. Is there any known problem? How can I
  track this down?
  
  Anselm
  
  If you compile the kernel with USB_DEBUG, then there are some sysctls
  under hw.usb.ehci which you can tweak. Needs to be set before boot.
  
  --HPS
  
  Did not know that there were configurable bug workarounds in sysctl.
  When I set hw.usb.ehci.lostintrbug=1 in /boot/loader.conf the problems
  seem gone.
  
  Without this setting I got the following kernel message when dd did
  abort:
  
  ehci_timeout: xfer=0xc29cd3c8
  
  
  Thanks,
  Anselm
  
  Maybe you can report the PCI vendor ID and product so that we can add
  this quirk.
  
  --HPS
  
  Not sure what a PCI vendor ID is and how to determine it. It's a ALIX
  2d2 from http://pcengines.ch/alix.
  
  pciconf(8) will tell you.  Try sending pciconf -l output.
 
 - pciconf -lv
 hos...@pci0:0:1:0:class=0x06 card=0x20801022 chip=0x20801022
 rev=0x33 hdr=0x00
 vendor = 'Advanced Micro Devices (AMD)'
 device = 'Conrad Kostecki'
 class  = bridge
 subclass   = HOST-PCI
 no...@pci0:0:1:2: class=0x101000 card=0x20821022 chip=0x20821022
 rev=0x00 hdr=0x00
 vendor = 'Advanced Micro Devices (AMD)'
 device = 'Geode GX3 AES Crypto Driver (GX3)'
 class  = encrypt/decrypt
 v...@pci0:0:9:0:  class=0x02 card=0x01061106 chip=0x30531106 rev=0x96
 hdr=0x00
 vendor = 'VIA Technologies, Inc.'
 device = 'Rhine III Management Adapter (VT6105M)'
 class  = network
 subclass   = ethernet
 v...@pci0:0:11:0: class=0x02 card=0x01061106 chip=0x30531106 rev=0x96
 hdr=0x00
 vendor = 'VIA Technologies, Inc.'
 device = 'Rhine III Management Adapter (VT6105M)'
 class  = network
 subclass   = ethernet
 a...@pci0:0:12:0: class=0x02 card=0x1600185f chip=0x001b168c
 rev=0x01 hdr=0x00
 vendor = 'Atheros Communications Inc.'
 device = 'AR5006 family 802.11abg Wireless NIC'
 class  = network
 subclass   = ethernet
 is...@pci0:0:15:0:class=0x060100 card=0x20901022 chip=0x20901022
 rev=0x03 hdr=0x00
 vendor = 'Advanced Micro Devices (AMD)'
 device = 'CS5536 [Geode companion] ISA'
 class  = bridge
 subclass   = PCI-ISA
 atap...@pci0:0:15:2:  class=0x010180 card=0x209a1022 chip=0x209a1022
 rev=0x01 hdr=0x00
 vendor = 'Advanced Micro Devices (AMD)'
 device = 'CS5536 IDE Controller (CS5536)'
 class  = mass storage
 subclass   = ATA
 oh...@pci0:0:15:4:class=0x0c0310 card=0x20941022 chip=0x20941022
 rev=0x02 hdr=0x00
 vendor = 'Advanced Micro Devices (AMD)'
 device = 'CS5536 OHCI USB Host Controller (CS5536)'
 class  = serial bus
 subclass   = USB
 eh...@pci0:0:15:5:class=0x0c0320 card=0x20951022 chip=0x20951022
 rev=0x02 hdr=0x00
 vendor = 'Advanced Micro Devices (AMD)'
 device = 'CS5536 EHCI USB Host Controller (CS5536)'
 class  = serial bus
 subclass   = USB

Hi,

Can you add this device to the quirk entries in:

sys/dev/usb/controller/ehci.c

verify the patched driver and attach it to a FreeBSD PR?

--HPS
___
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: USB disk on CS5536 unstable

2010-10-13 Thread Hans Petter Selasky
On Wednesday 13 October 2010 23:22:59 Hans Petter Selasky wrote:
 Can you add this device to the quirk entries in:
 
 sys/dev/usb/controller/ehci.c

ehci_pci.c actually.

--HPS
___
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: USB disk on CS5536 unstable

2010-10-02 Thread Hans Petter Selasky
On Saturday 02 October 2010 14:44:07 Anselm Strauss wrote:
 On 09/30/10 21:38, Hans Petter Selasky wrote:
  On Thursday 30 September 2010 21:10:59 Anselm Strauss wrote:
  Maybe sending it to just the USB list was too specific ...
  
  On 09/30/10 00:08, Anselm Strauss wrote:
  Hi
  
  I have an ALIX board that has an AMD Geode and the CS5536 companion
  chip with integrated USB on it. When I connect a USB disk I have
  observed various problems. For example when I run fsck_ufs on a 250 GB
  partition the process gets stuck in biord state and fsck reports
  unreadable sectors. When I do a dd over the whole disk and direct it
  to /dev/null it suddenly returns with no error, but having read only a
  small fraction of the disk. I tried it with two different disks and
  two different ALIX boards. I'm pretty sure the disks are okay since I
  tried them on other hardware.
  
  As far as I know there was some trouble with the chip regarding
  timeouts. Under load after some time the USB just stops responding. I
  have tried 8.0 and 8.1. Is there any known problem? How can I track
  this down?
  
  Anselm
  
  If you compile the kernel with USB_DEBUG, then there are some sysctls
  under hw.usb.ehci which you can tweak. Needs to be set before boot.
  
  --HPS
 
 Did not know that there were configurable bug workarounds in sysctl.
 When I set hw.usb.ehci.lostintrbug=1 in /boot/loader.conf the problems
 seem gone.
 
 Without this setting I got the following kernel message when dd did abort:
 
 ehci_timeout: xfer=0xc29cd3c8
 
 
 Thanks,
 Anselm

Maybe you can report the PCI vendor ID and product so that we can add this 
quirk.

--HPS
___
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: USB disk on CS5536 unstable

2010-09-30 Thread Hans Petter Selasky
On Thursday 30 September 2010 21:10:59 Anselm Strauss wrote:
 Maybe sending it to just the USB list was too specific ...
 
 On 09/30/10 00:08, Anselm Strauss wrote:
  Hi
  
  I have an ALIX board that has an AMD Geode and the CS5536 companion chip
  with integrated USB on it. When I connect a USB disk I have observed
  various problems. For example when I run fsck_ufs on a 250 GB partition
  the process gets stuck in biord state and fsck reports unreadable
  sectors. When I do a dd over the whole disk and direct it to /dev/null
  it suddenly returns with no error, but having read only a small fraction
  of the disk. I tried it with two different disks and two different ALIX
  boards. I'm pretty sure the disks are okay since I tried them on other
  hardware.
  
  As far as I know there was some trouble with the chip regarding
  timeouts. Under load after some time the USB just stops responding. I
  have tried 8.0 and 8.1. Is there any known problem? How can I track this
  down?
  
  Anselm

If you compile the kernel with USB_DEBUG, then there are some sysctls under 
hw.usb.ehci which you can tweak. Needs to be set before boot.

--HPS
___
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: Interactive Port

2010-09-02 Thread Hans Petter Selasky
On Wednesday 01 September 2010 09:57:15 per...@pluto.rain.com wrote:
 Rem P Roberti remeg...@comcast.net wrote:
  Brother!  Muttprint is now working fine.  The problem: the printer
  was offline!  Now, before you go accusing me of being a complete
  dufus, let me say that I had no way of knowing that that condition
  existed.  The printer itself indicated that it was online---no
  problem.  What happened is that somehow, and I'm not sure what
  caused this, the printer became disengaged from its usb port.
 
 I'd call it a bug in the printer that it continues to indicate
 online when it has lost its connection to its host (unless it
 also has a network connection, and in that case I imagine you'd
 be using the network instead of USB).
 
  ...  The only way that I could get it talking again to usb was by
  doing a reboot.
 
 Now _that_ sounds like a possible bug in the USB subsystem, since
 USB is supposed to be completely hot-pluggable and should not need
 a reboot to get itself straightened out after a mishap.  Cc-ing usb@
 list.
 
 One question which will surely arise is, which FreeBSD version are
 you using?  The USB stack was completely rewritten in 8.0.

If the USB application does not close the /dev/XXX handles, it will block the 
enumeration of new USB devices on that bus.

Also see usbconfig -d X.Y reset

--HPS
___
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: 8.0-RC USB problem -- how to recover a damaged USB stick

2009-11-22 Thread Hans Petter Selasky
On Sunday 22 November 2009 04:40:27 Guojun Jin wrote:
 Does anyone know if it is possible to revocer such damaged USB stick?

Hi,

There are several recovery tools in /usr/ports for this kind of task.

For example photorec .

--HPS

___
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: ukbd_set_leds_callback:700: error=USB_ERR_STALLED

2009-11-21 Thread Hans Petter Selasky
On Saturday 21 November 2009 10:10:27 O. Hartmann wrote:
 My personal workstation runs FreeBSD 8.0-PRE/amd64 on an oldish hardware
 (AMD socket 939 platform). Since I replaced my good old but broken IBM
 Model-M keyboard with a high-quality keyboard 'DASkeyboard', I receive
 this error message on the console:


 ukbd_set_leds_callback:700: error=USB_ERR_STALLED

 What does it means?
Hi,

It means that there was an error updating the LED information on your 
keyboard. Does the NUM-lock LED work for example?

There is a sysctl to disable this feature:

sysctl hw.usb.ukbd.no_leds=1

--HPS
___
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: 8.0-RC3 USB lock up on mounting two partitions from one USB drive

2009-11-18 Thread Hans Petter Selasky
Hi,

I'm not sure if this is an USB issue or not. If you get READ/WRITE errors and 
the drive simply dies then it might be the case. Else it is a system issue.

There are quirks for mass storage which you can add to 
sys/dev/usb/storage/umass.c .

--HPS

On Wednesday 18 November 2009 08:33:07 Guojun Jin wrote:
 Did newfs on those partition and made things worsen -- restore completely
 fails: (I had experienced another similar problem on an IDE, which works
 well for 6.4 and 7.2, but 8.0.) This dirve works fine under FreeBSD 6.4.

 Is something new in 8.0 making disk partition schema changed?

 g_vfs_done():da0s3d[READ(offset=98304, length=16384)]error = 6
 g_vfs_done():da0s3d[WRITE(offset=192806912, length=16384)]error = 6
 fopen: Device not configured
 cannot create save file ./restoresymtable for symbol table
 abort? [yn] (da0:umass-sim0:0:0:0): Synchronize cache failed, status ==
 0xa, scs i status == 0x0
 (da0:umass-sim0:0:0:0): removing device entry
 ugen1.2: DMI at usbus1
 umass0: DMI Ultra HDD, class 0/0, rev 2.00/1.19, addr 2 on usbus1
 umass0:  SCSI over Bulk-Only; quirks = 0x
 umass0:0:0:-1: Attached to scbus0
 da0 at umass-sim0 bus 0 target 0 lun 0
 da0: DMI Ultra HDD 1.19 Fixed Direct Access SCSI-0 device
 da0: 40.000MB/s transfers
 da0: 114473MB (234441648 512 byte sectors: 255H 63S/T 14593C)
 Device da0s3d went missing before all of the data could be written to it;
 expect data loss.

 99  23:19   sysinstall
100  23:20   newfs /dev/da0s3d
101  23:20   newfs /dev/da0s3e
102  23:21   mount /dev/da0s3d /mnt
103  23:21   cd /mnt
104  23:21   dump -0f - /home | restore -rf -
105  23:27   history 15



 -Original Message-
 From: Guojun Jin
 Sent: Tue 11/17/2009 11:05 PM
 To: freebsd-sta...@freebsd.org
 Cc: questi...@freebsd.org; freebsd-...@freebsd.org
 Subject: 8.0-RC3 USB lock up on mounting two partitions from one USB drive

 When mounting two partitions from a USB dirve, it can cause the drive
 access lock up for a long time. Details:

 Terminal 1 --
 term1# mount /dev/da0s3d  /mnt
 term1# cd /mnt ; rm -fr *

 when rm starts, go to terminal 2 and do:

 term2# mount /dev/da0s3e /dist ### this will hanging for a long time and
 USB hard drive activity light is off. After more than 1-2 minutes, mount
 returns, and the drive activity light is blinking, thus removing is going
 on.

 term2# ls /dist   ### this will cause dUSB dirve hanging again -- no
 avtivity. Similarly, ls will finish in a couple of miniutes or longer, the
 rm command continues; but for a while, the drive activity will stop again.

 Reboot machine, repeat the above steps, and result will be the same. Reboot
 machine again, and just mount one partition, then doing rm -rf * without
 involve the second partition, rm will finish quickly.

 Has anyone obseved this behave on 8.0-RC?

 -Jin

___
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: Gnokii with USB2

2009-11-01 Thread Hans Petter Selasky
On Saturday 31 October 2009 20:48:57 Jille Timmermans wrote:
 I'm trying to read the SMS of my telephone using comms/gnokii. But I
 can't figure out which 'port' (thing in /dev) I must pass to gnokii.
 /dev/usb/0.2.{0,1,2}, /dev/ugen0.2, /dev/da0, /dev/pass0 all didn't work
 (Yes, I know trying da0 was not a really smart/safe idea). But those are
 the only new devices which showed up after connecting the USB-cable.


I think that connection = serial is wrong. You should not have to specify 
port for USB. Also check that your device shows up when you type usbconfig 
as the user you are running gnokiirc. Also make sure gnokiirc is compiled with 
USB support.

--HPS


 My ~/.gnokiirc:
 [global]
 port = /dev/usb/0.2.1
 model = AT
 connection = serial

 [logging]
 debug = on

 OS:
 FreeBSD 8.0-CURRENT r193930 of June 10

 Telephone:
 LG K800


 -- Jille

___
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: device nodes in usb2 stack

2009-10-21 Thread Hans Petter Selasky
On Tuesday 20 October 2009 23:13:27 Alexander Best wrote:
 Hans Petter Selasky schrieb am 2009-10-19:
  On Sunday 18 October 2009 23:08:14 Alexander Best wrote:
   posted this to freebsd-questions@ a while ago and got no answer.
  
   alex
 
  Hi,
 
  For every USB device there is /dev/usb/XXX . Currently the USB
  Bluetooth
  driver does not have any file nodes. Entries appearing in devd.conf
  might not
  always be matched due to /dev/XXX creation. In that regard the USB
  stack fakes
  ugenX.Y device messages for devd.conf.
 
  --HPS

 i see. will this stay the way it is or are there any plans to also add file
 nodes for usb dongle devices?

There are currently only symbolic links /dev/ugenX.Y

--HPS

___
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: device nodes in usb2 stack (fwd)

2009-10-18 Thread Hans Petter Selasky
On Sunday 18 October 2009 23:08:14 Alexander Best wrote:
 posted this to freebsd-questions@ a while ago and got no answer.

 alex

Hi,

For every USB device there is /dev/usb/XXX . Currently the USB Bluetooth 
driver does not have any file nodes. Entries appearing in devd.conf might not 
always be matched due to /dev/XXX creation. In that regard the USB stack fakes 
ugenX.Y device messages for devd.conf.

--HPS

___
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: Unable to read from CCID USB reader

2009-05-20 Thread Hans Petter Selasky
On Tuesday 19 May 2009, Mario Pavlov wrote:
 Hi,
 I tired CURRENT and it's working for me :)
 I only have one small issue...
 when I unplug the reader pcscd goes to some sort of infinite loop
 it would print this forever:

 48111939 ccid_usb.c:491:WriteUSB() usb_bulk_write(/dev/usb//dev/ugen4.2):
 Device busy 0020 ifdwrapper.c:469:IFDStatusICC() Card not transacted:
 612
 0010 eventhandler.c:333:EHStatusHandlerThread() Error communicating to:
 ACS ACR 38U-CCID 00 00 00402930 ccid_usb.c:491:WriteUSB()
 usb_bulk_write(/dev/usb//dev/ugen4.2): Device not configured 0021
 ifdwrapper.c:469:IFDStatusICC() Card not transacted: 612
 0010 eventhandler.c:333:EHStatusHandlerThread() Error communicating to:
 ACS ACR 38U-CCID 00 00 00402953 ccid_usb.c:491:WriteUSB()
 usb_bulk_write(/dev/usb//dev/ugen4.2): Device not configured 0016
 ifdwrapper.c:469:IFDStatusICC() Card not transacted: 612
 0010 eventhandler.c:333:EHStatusHandlerThread() Error communicating to:
 ACS ACR 38U-CCID 00 00 ...

Maybe a bug in the pcsc driver.

 ...
 ...

 firefox does almost the same thing:

 [opensc-pkcs11] reader-pcsc.c:1015:pcsc_detect_readers: returning with: No
 readers found [opensc-pkcs11] reader-pcsc.c:906:pcsc_detect_readers:
 SCardEstablishContext failed: 0x8010001d [opensc-pkcs11]
 reader-pcsc.c:1015:pcsc_detect_readers: returning with: No readers found
 [opensc-pkcs11] reader-pcsc.c:906:pcsc_detect_readers:
 SCardEstablishContext failed: 0x8010001d [opensc-pkcs11]
 reader-pcsc.c:1015:pcsc_detect_readers: returning with: No readers found
 ...
 ...
 ...

 I guess this is not FreeBSD's fault, is it ?

If the usb device /dev/usb/xxx for your device is not accessible to firefox 
then firefox can't open it.

--HPS
___
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: Unable to read from CCID USB reader

2009-05-18 Thread Hans Petter Selasky
On Sunday 17 May 2009, Mario Pavlov wrote:
 Hi,
 I just got a CCID USB reader with my digital signature...unfortunately I
 can't make it work I installed pcsc-lite and libccid from ports...
 when I plug-in the reader I can see this:

 ugen0: vendor 0x072f CCID USB Reader, class 0/0, rev 1.10/1.00, addr 2 on
 uhub4

 then I do this:


Is the problem the same on -current?

--HPS
___
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: Unable to read from CCID USB reader

2009-05-18 Thread Hans Petter Selasky
On Monday 18 May 2009, Mario Pavlov wrote:
 Hi,
 no I haven't tried it on CURRENT
 should I do that ?
 is there something new in the USB stuff there ?

There is a new USB stack in 8-current and a new libusb which is installed as a 
part of the base system.

--HPS
___
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: USB-to-serial adapter configuration

2009-05-18 Thread Hans Petter Selasky
On Monday 18 May 2009, Saifi Khan wrote:
 On Mon, 18 May 2009, Ruben de Groot wrote:
  On Mon, May 18, 2009 at 04:07:09PM +, Saifi Khan typed:
   Hi all:
  
   How does one configure settings for  USB-to-serial adapter in FreeBSD ?
  
   The one i have purchased is
   http://www.usbgear.com/computer_cable_details.cfm?sku=CHEAP-SERIALcats
  =199catid=482%2C1303%2C199%2C461%2C106%2C1009%2C601
  
   On the Gentoo box, 'lsusb' displays it as:
Bus 002 Device 003: ID 067b:2303
Prolific Technology, Inc. PL2303 Serial Port
 
  Your adapter should be recognised by the uplcom driver. put
  uplcom_load=YES in loader.conf or load manually. Check dmesg for the
  device name.
  Also, I think cu is good enough ;)
 
  Ruben

 This is the error shown in 'dmesg' log

 ugen0.2: Prolific Technology at usbus0
 uplcom0: Prolific Technology PL2303 Serial (ATEN/IOGEAR UC232A), class
 0/0, rev 1.10/3.00, addr 2 on usbus0 uplcom0: init failed!
 device_attach: uplcom0 attach returned 6
 uplcom0: Prolific Technology PL2303 Serial (ATEN/IOGEAR UC232A), class
 0/0, rev 1.10/3.00, addr 2 on usbus0 uplcom0: init failed!
 device_attach: uplcom0 attach returned 6

 Scenarios:

  1. kldstat -v | grep  uplcom shows
   303 uhub/uplcom

  2. uplcom_load=YES in /boot/loader.conf
   with a reboot

 In both the scenarios, 'dmesg' shows the same error.

 On re-attaching the device, the following error is shown.

Hi,


 usb2_alloc_device:1574: set address 2 failed (USB_ERR_STALLED, ignored)
 usb2_alloc_device:1612: getting device descriptor at addr 2 failed,
 USB_ERR_STALLED! ugen0.2:  at usbus0 (disconnected)
 uhub_reattach_port:417: could not allocate new device!

Looks like the firmware crashed if it does not re-enumrate.


 Any suggestions on how i can get uplcom drive to work ?


Try looking up the USB-ID line for your device and modify the uplcom flags 
(TYPE_XXX) for your device so that it does not require init for example.

/* TrendNet TU-S9 */
{USB_UPL(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2303, 0x0400, 
0x, TYPE_PL2303X)},
/* ST Lab USB-SERIAL-4 */
{USB_UPL(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2303, 0x0300, 
0x03FF, TYPE_PL2303X)},
/* IOGEAR/ATEN UC-232A (also ST Lab USB-SERIAL-1) */
{USB_UPL(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2303, 0, 0x02FF, 
TYPE_PL2303)},

Use:

usbconfig dump_device_desc

To get the version number for your chip (See 0, 0x02FF above) Make sure that 
the TYPE flag is correct.

Also see: /sys/dev/usb/serial/uplcom.c

Then:

make -C /sys/modules/usb/uplcom clean all install

kldunload uplcom
kldload uplcom

--HPS
___
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: [solved] Re: usb-stick accessible, but doesn't boot

2008-12-22 Thread Hans Petter Selasky
Hi,

Try the attached patch to sys/kern/vfs_mount.c 

Thanks for reporting. I have been aware about this issue for some time now, 
but the patch has not been committed to current yet.

I have FreeSBIE reliably up and running with USB2.

--HPS

On Monday 22 December 2008, clemens fischer wrote:
 On Sun, 21 Dec 2008 14:47:54 +0100 clemens fischer wrote:

 [ re. a bootable CURRENT backup system on a USB stick]

  I am very sorry for this inaccurate information.  As it turns out,
  only the GENERIC kernel is bootable, my custom configuration doesn't.
  On the bright side, this indicates some feature missing from my
  normally very lean kernels, nothing is kaputt beyond repair.  I'll
  just have to find out which module just has to be in the kernel to
  make it boot from an USB stick.

 The custom configuration uses the new USB2 stack, whereas GENERIC
 still includes the older one.  When replacing USB2 with the old stack,
 I can reliably boot the system from the stick.

 I have another backup on a MMC card in a $5 card reader, but that one
 boots with USB2.

 The USB stick which only runs on the old stack identifies as:

   ugen1.2: SanDisk at usbus1
   umass0: SanDisk product 0x5151, class 0/0, rev 2.00/2.00, addr 2 on
 usbus1 pass0: SanDisk Cruzer Micro 8.02 Removable Direct Access SCSI-0
 device da0: SanDisk Cruzer Micro 8.02 Removable Direct Access SCSI-0
 device umass0:  SCSI over Bulk-Only; quirks = 0x

 I don't know if any quirks would make this product work.  To me it seems
 as if it has to do with bulk handling?

 -c

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


--- vfs_mount.c.orig	Mon Dec 22 14:43:36 2008
+++ vfs_mount.c	Mon Dec 22 15:09:14 2008
@@ -58,6 +58,7 @@
 #include sys/sysent.h
 #include sys/systm.h
 #include sys/vnode.h
+#include sys/cons.h
 #include vm/uma.h
 
 #include geom/geom.h
@@ -1606,7 +1607,11 @@
 vfs_mountroot(void)
 {
 	char *cp;
-	int error, i, asked = 0;
+	const char *rootdevname_orig;
+	int error;
+	unsigned int i;
+	unsigned char asked = 0; /* set if asked for mount point */
+	unsigned char timeout = 16; /* seconds */
 
 	root_mount_prepare();
 
@@ -1624,6 +1629,10 @@
 		asked = 1;
 	}
 
+	/* store a copy of the initial root device name */
+	rootdevname_orig = ctrootdevname;
+ retry:
+
 	/*
 	 * The root filesystem information is compiled in, and we are
 	 * booted with instructions to use it.
@@ -1674,12 +1683,27 @@
 		if (!vfs_mountroot_try(ctrootdevname))
 			goto mounted;
 	/*
-	 * Everything so far has failed, prompt on the console if we haven't
-	 * already tried that.
+	 * Check if we should try more times.
+	 */
+	if (timeout != 0) {
+		timeout--;
+		pause(WROOT, hz);
+		if (cncheckc() == -1) {
+			/* no key press - try again */
+			ctrootdevname = rootdevname_orig;
+			goto retry;
+		}
+	}
+
+	/*
+	 * Everything so far has failed, prompt on the console if we
+	 * haven't already tried that.
 	 */
-	if (!asked)
+	if (!asked) {
+		printf(\n);
 		if (!vfs_mountroot_ask())
 			goto mounted;
+	}
 
 	panic(Root mount failed, startup aborted.);
 
___
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: garmin forerunner 305

2008-11-04 Thread Hans Petter Selasky
On Tuesday 04 November 2008, Bruce Cran wrote:
 On Tue, 04 Nov 2008 14:57:14 +0300

 Boris Samorodov [EMAIL PROTECTED] wrote:
  Bruce Cran [EMAIL PROTECTED] writes:
   I don't know if it'll work with the usb stack that's in shipping
   version of FreeBSD though, and even with the new stack I had to
   make a change to libgpsusb.c in gpsbabel to get it working.
 
  Can you submit a patch? Thanks!

 Having just read about endpoint addresses I'm not sure who's wrong.
 gpsbabel truncates the address to the first 4 bytes using
 USB_ENDPOINT_ADDRESS_MASK from libusb20 while
 the stack clearly wants the rest, including the top 'direction' bit.  In
 fact in /sys/dev/usb2/core/usb2_device.c line 114 it masks out the
 reserved bits but still keeps the direction bit. usb2_get_pipe_by_addr
 was failing when passed address 1 because the full endpoint address is
 0x81 (endpoint 1, direction IN).  It looks as though by changing EA_MASK
 to be just the endpoint number would fix the problem, but I'm not
 sure if that's correct.

Hi,

I'm going to fix this in libusb20. In the callbacks in libusb20 we know the 
direction and I will simply just fix it there. The applications I tested so 
far passed the correct endpoint value.

--HPS

int
usb_bulk_write(usb_dev_handle * dev, int ep, char *bytes,
int size, int timeout)
{
return (usb_std_io(dev, ep, bytes, size, timeout, 0));
}

int
usb_bulk_read(usb_dev_handle * dev, int ep, char *bytes,
int size, int timeout)
{
return (usb_std_io(dev, ep, bytes, size, timeout, 0));
}

int
usb_interrupt_write(usb_dev_handle * dev, int ep, char *bytes,
int size, int timeout)
{
return (usb_std_io(dev, ep, bytes, size, timeout, 1));
}

int
usb_interrupt_read(usb_dev_handle * dev, int ep, char *bytes,
int size, int timeout)
{
return (usb_std_io(dev, ep, bytes, size, timeout, 1));
}
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: huawei e220 hsdpa on freebsd 6.3-BETA2

2007-12-07 Thread Hans Petter Selasky
On Friday 07 December 2007, [EMAIL PROTECTED]@mgedv.net wrote:
  Your HSDPA modem presented itself like a mass storage device, probably
  with
  some autorun and virus like drivers intended for the Windows operating
  system :-)

 unfortunately, this is the intended behaviour. this device has the
 ability to present itself as mass storage which will show up as a
 cd-rom device where the windows drivers are stored on.

 this is the way it works under windows:
 - plug it in first time
 - (auto)run the setup on the device for the win-driver
 - as soon as the driver is loaded, the cd device disappears and a modem is
 detected

 but when loading the ucom/ubsa stuff before umass, the device will
 not be recognised as /dev/cdX and show up as a communication device
 (ucom).

 of course there must be a way for getting the serial device working,
 because this is one of the most sold umts/hsdpa modems across eu and
 many people run it under linux as well (there are no drivers from
 the vendor provided except windows and mac).
 i'm pretty sure there is some message or anything else which will
 render this device switching to serial mode.
 there is some code, which i found (doesn't compile/run under freebsd)
 which puts this device in pure serial mode. maybe someone out there
 is able to tell me, how/if this can be done on freebsd as well?
 (btw, i'm not a c-guru)

 do you (or anybody else reading this) have an idea, how to get this
 device working and put it in serial mode completely ?


Hi,

You can try the following test program and see what happens. You need to run 
it like super-user:

#include stdio.h
#include fcntl.h
#include sys/ioctl.h
#include stdlib.h
#include unistd.h
#include sys/types.h
#include dev/usb/usb.h

int main(int argc, char **argv)
{
  struct usb_ctl_request ucr = { /* zero */ };
  int f;

  if (argc  3) {
  printf(Usage: %s /dev/usb1 addr\n, argv[0]);
  return 1;
  }

  f = open(argv[1], O_RDWR);
  if (f  0) {
  return 1;
  }

  ucr.ucr_addr = atoi(argv[2]);
  ucr.ucr_request.bmRequestType = 0;
  ucr.ucr_request.bRequest = 3; /* SET_FEATURE */
  ucr.ucr_request.wValue[0] = 1;

  if (ioctl(f, USB_REQUEST, ucr)) {
  printf(Error!\n);
  }

  close (f);

  return 0;
}

Use usbdevs -v to get the parameters. Don't forget to load umodem.

If my program doesn't work, I suggest that you contact the manufacturer of 
your modem, and tell them the truth, that the device is a mass-storage device 
and that you want the money back! You paid for a modem, but got a 
mass-storage device. You can tell them that FreeBSD USB experts have looked 
at your device. There is no doubt about it that you've been fooled :-)

--HPS

HINT: HINT: Buy a HDSPA modem that comes with a CD-ROM. Then there is a 
greater chance that they did not put the drivers on the device itself.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: huawei e220 hsdpa on freebsd 6.3-BETA2

2007-12-06 Thread Hans Petter Selasky
Hi,

Can you make your modem show up like ugen by loading ugen before plugging 
your device.

Then install /usr/ports/sysutils/udesc_dump and dump all the descriptors of 
your device.

--HPS
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: huawei e220 hsdpa on freebsd 6.3-BETA2

2007-12-06 Thread Hans Petter Selasky
On Thursday 06 December 2007, [EMAIL PROTECTED]@mgedv.net wrote:
  Can you make your modem show up like ugen by loading ugen before
  plugging
  your device.

 here it is ;)

Hi,

Your HSDPA modem presented itself like a mass storage device, probably with 
some autorun and virus like drivers intended for the Windows operating 
system :-) 

If that is true you bought a memory stick and not a HDSPA modem.

bInterfaceClass08
bInterfaceSubClass 06
bInterfaceProtocol 50

Try loading umass and see for yourself.

Maybe your device cannot be used on non-Windows operating systems.

--HPS
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to setup internet access via GPRS/EDGE network using Nokia 6230 mobile phone

2007-10-10 Thread Hans Petter Selasky
Hi,

On Wednesday 10 October 2007, williamkow wrote:
 Could anybody advise me on how to enable internet access (GPRS/EDGE) in
 GSM network, using Nokia mobile phone (USB cable connect to computer).
 Please provide me the exact PORT name to install to FreeBSD 6.2 system,
 also please assist me on how to use the ports, example, (1) execute it
 (2) establish the connection, (3) disconnect ...etc.


Looks like an USB issue: If you execute the following commands like the Super 
User:

kldload umodem
kldload cdce

Does your phone show up if you run the command dmesg | less ?

--HPS
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Kernel panic; fatal trap 12; on task 22, USB0: was Re: Moused issues?

2007-10-07 Thread Hans Petter Selasky
On Saturday 06 October 2007, Joe Altman wrote:
 chthonic.com/crash-crash-crash

Hi,

Do you have options KDB in your kernel config file ?

http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-options.html

You should get a prompt when it panics. Then you type in bt for backtrace. 
Maybe you could take a picture of that. Probably someone is accessing a NULL 
pointer.

--HPS

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


Re: IBM x3655: FBSD 7.0-SNAP 200704 USB keyboard problems

2007-04-27 Thread Hans Petter Selasky
On Friday 27 April 2007 18:49, O. Hartmann wrote:
 Hello,

 seems I do have a typical problem and don't know how to solv it.
 I try to install FreeBSD 7.0-CURRENT SNAP 200704 for AMD64 on IBM x3655
 with two Opteron 22XX CPUs. The ISO CD1 boots well and keyboard reacts
 with the beastie-menu, but after booting into installation menu (showing
 up keyboard layout) keyboard (USB) is not usuable anymore.
 Please, can anyone tell me hw to solve this problem?


A few people have reported to me that they need the new USB stack to get USB 
working on AMD64.

http://www.turbocat.net/~hselasky/usb4bsd

SVN version.

By the way, it does not compile with FreeBSD 7.0-CURRENT yet. You need FreeBSD 
6.X. I'm working on this.

--HPS
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]