請問各位大哥關於usb的問題

Moderator: Forums Team

kiko555
Posts: 152
Joined: Mon May 26, 2003 4:33 pm
Contact:

請問各位大哥關於usb的問題

Post by kiko555 »

我在kernel中不管是編進去~或是用module的方式都沒法讓它正常的運作~
在modules的狀態下,我下lsmod時只能看到usbcore....
我必須自己手動下modprobe uhci....才能抓到uhci.......
然後我裝上我的usb-hdd.... :( ...失敗~完全沒反應~~~

然後在scsi的方面~該加的~我都已經加完了...><!
可是就是不會動~
請問是否有哪些地方要注意的呢?

ps.我用安裝gentoo的那張光碟開機後~
我可以很確定當我usb-hdd插上時......真的抓到了~
而且我還能將usb-hdd中的分割區mount起來呢.....
pahud
24hr 義工
Posts: 1251
Joined: Tue Nov 26, 2002 10:22 pm
Contact:

Post by pahud »

你用那個版本的kernel? vanilla kernel還是gentoo-sources?

有可能你使用的kernel版本或是gentoo ship的kernel sources剛好有問題,
這我在驅動usb flash disk時有碰過,那次換成vanilla-kernel 2.4.21就好了。
paar
Posts: 1154
Joined: Thu Jan 30, 2003 10:53 am
Location: 打狗市
Contact:

Re: 請問各位大哥關於usb的問題

Post by paar »

kiko555 wrote:我在kernel中不管是編進去~或是用module的方式都沒法讓它正常的運作~
在modules的狀態下,我下lsmod時只能看到usbcore....
我必須自己手動下modprobe uhci....才能抓到uhci.......
然後我裝上我的usb-hdd.... :( ...失敗~完全沒反應~~~

然後在scsi的方面~該加的~我都已經加完了...><!
可是就是不會動~
請問是否有哪些地方要注意的呢?

ps.我用安裝gentoo的那張光碟開機後~
我可以很確定當我usb-hdd插上時......真的抓到了~
而且我還能將usb-hdd中的分割區mount起來呢.....
小弟沒用過 usb 硬碟.. 不過猜測它不是應該像讀卡機一樣大部分驅動後都在 /dev/sda 的裝置上嗎?
如果是的話需要的 modules, 印象中有
  • sg, sr 其中一個還是兩個都要
  • uhci 或 ohci
  • usb-storage
  • usbcore
叫我老帕好了!
Image
User avatar
【Palatis】
Posts: 956
Joined: Wed Apr 02, 2003 4:21 pm
Location: 偶爾插花...</br>亞利安星球
Contact:

Post by 【Palatis】 »

我也是 = =

wolk4.0s 總是推不動我的 usb...
wolk4.3s 又推不動我的 promise 20276...
vanilla 沒有 preempt/ll...
gaming 沒有 grsecurity...

問題真多......
「從麻雀之城回來的時候,被問到『你要大的藤箱還是小的藤箱?』為此煩惱不已。大家都有過這種煩惱吧?」
「是啊是啊!大的藤箱可以放很多東西覺得很划算,小的藤箱小小的裡面也許放著很不錯的東西,真的很難取捨阿!」
「靠這個就能告別這種煩惱『中型的藤箱』!」
「好厲害!」
「不要再煩惱大小的問題了,現在還贈送可以煮出鐵質,增進健康的鐵銼刀。」
「這是一定要買的!」
「我要一個!」
kiko555
Posts: 152
Joined: Mon May 26, 2003 4:33 pm
Contact:

Re: 請問各位大哥關於usb的問題

Post by kiko555 »

paar wrote: 小弟沒用過 usb 硬碟.. 不過猜測它不是應該像讀卡機一樣大部分驅動後都在 /dev/sda 的裝置上嗎?
如果是的話需要的 modules, 印象中有
  • sg, sr 其中一個還是兩個都要
  • uhci 或 ohci
  • usb-storage
  • usbcore
小弟參考的是在gentoo上討論區的如下:

Code: Select all

Hello

Let me help you a bit here. If you only have one ext usb device, then it is safe to ignore the previous posts. You DO NOT need to edit devfsd conf files.

In your kernel ---> usb support

if usb 1 --> seletc (m) for UHCI or OHCI (m)
if usb 2 ----> EHCI (m)

Also select (m) for usb mass storage



IN scsi options ---> scsi support (m) AND scsi disk support (m)

Recompile your kernel. There is no need to reboot as you have used modules in all cases as mentioned above. We are using linux and we do like to keep our uptimes high.


modprobe ehci-hcd
For me i use ehci (usb2) , but i have used the same technique for usb1.
dmesg usb addition

hcd.c: ehci-hcd @ 00:02.2, PCI device 10de:0068 (nVidia Corporation)
hcd.c: irq 3, pci mem f1c46000
usb.c: new USB bus registered, assigned bus number 1
ehci-hcd.c: USB 2.0 support enabled, EHCI rev 1. 0
## PLug in usb(2) device
hub.c: new USB device 00:02.2-1, assigned address 4
usb.c: USB device 4 (vend/prod 0xd49/0x5020) is not claimed by any active driver.
## this is where you load the storage mod
modprobe usb-storage

Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
Vendor: Maxtor Model: 5000DV v01.00.00 Rev: 0100
Type: Direct-Access ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 4
USB Mass Storage support registered.

# Now you still cant mount it anywhere, and this is where you load the sd_mod

Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
SCSI device sda: 240119808 512-byte hdwr sectors (122941 MB)
/dev/scsi/host1/bus0/target0/lun0: p1

## Now as long as you have the module loaded for the appropriate file ##system, you do NOT need to specify this in your mount command
## My ext hard drives are always fat32 (vfat)
root@axses drivers # modprobe vfat
root@axses drivers # mount /dev/sda1 /mnt/scsi

root@axses drivers # df -h /mnt/scsi
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 112G 91G 22G 82% /mnt/scsi

If you would like direct help, feel free to contact me and i will be glad to help you. I have been using gentoo since last year December only, but one of my first ambitions on any linux distro is to get external storage working. Since i do not trust ide drives and ALWAYS mirror my work.

Here my email

axses@axses.ch

Born free , Linux forever

Last edited by axses on Thu Jun 05, 2003 11:28 pm; edited 1 time in total

sorry~突然找不到原本的link.......
給各位大哥參考一下~
kiko555
Posts: 152
Joined: Mon May 26, 2003 4:33 pm
Contact:

Post by kiko555 »

pahud wrote:你用那個版本的kernel? vanilla kernel還是gentoo-sources?

有可能你使用的kernel版本或是gentoo ship的kernel sources剛好有問題,
這我在驅動usb flash disk時有碰過,那次換成vanilla-kernel 2.4.21就好了。
那是否我需要先將kernel換成您說的這一版呢?

ps.我現在用的是gentoo-source 2.4.20-r5 這一個版本~
pahud
24hr 義工
Posts: 1251
Joined: Tue Nov 26, 2002 10:22 pm
Contact:

Post by pahud »

kiko555 wrote:
pahud wrote:你用那個版本的kernel? vanilla kernel還是gentoo-sources?

有可能你使用的kernel版本或是gentoo ship的kernel sources剛好有問題,
這我在驅動usb flash disk時有碰過,那次換成vanilla-kernel 2.4.21就好了。
那是否我需要先將kernel換成您說的這一版呢?

ps.我現在用的是gentoo-source 2.4.20-r5 這一個版本~
use vanilla-sources 2.4.21就可以解決了.
kiko555
Posts: 152
Joined: Mon May 26, 2003 4:33 pm
Contact:

Post by kiko555 »

pahud wrote:
kiko555 wrote:
pahud wrote:你用那個版本的kernel? vanilla kernel還是gentoo-sources?

有可能你使用的kernel版本或是gentoo ship的kernel sources剛好有問題,
這我在驅動usb flash disk時有碰過,那次換成vanilla-kernel 2.4.21就好了。
那是否我需要先將kernel換成您說的這一版呢?

ps.我現在用的是gentoo-source 2.4.20-r5 這一個版本~
use vanilla-sources 2.4.21就可以解決了.
昨晚試了一下......vanilla-sources 2.4.21.... :(
一樣抓不到....我是用twinhead(倫飛) PowerSlime 600 的筆記型裝的
cpu:pII 366
usb chip:INTEL
我如果只選UHCI只有包括VIA'SIS的那一個選項的DRIVER~
我下modprobe uhci會連UHCI抓不到~
但如果我選UHCI是JFS的....在modeprobe時會出現uhci 的選項
但....插上usbhd一樣抓不到~
不過我想應該說是usb沒正確起動~所以根本就沒法去掃瞄是否有usb的物品插上~
pahud
24hr 義工
Posts: 1251
Joined: Tue Nov 26, 2002 10:22 pm
Contact:

Post by pahud »

檢查BIOS是否USB支援被關掉了,
另外usb-ohci也試試看!
kiko555
Posts: 152
Joined: Mon May 26, 2003 4:33 pm
Contact:

Post by kiko555 »

pahud wrote:檢查BIOS是否USB支援被關掉了,
另外usb-ohci也試試看!
在漫長的測試之後......目前已經可以抓到了~
也mount成功了....

在核心選項中....
USB的UHCI 有兩種.....
選有標示intel反而都摃龜~插上去都抓不到...
只單選JF的就可以了.....

因此可以推論不能同時選太多種...
不然好像會扒帶扒帶的.... :)
kiko555
Posts: 152
Joined: Mon May 26, 2003 4:33 pm
Contact:

Post by kiko555 »

另外想請問一下~
為何我的usb modules只有usbcore會自動啟動呢?
我記得沒錯要先將modules用insmod先加入開機時啟動.......RIGHT?
因此我下了
insmod uhci
insmod usb-storage
><!但是一樣未能在開機時啟動~
所以...我猜~我可能下錯指令了..... :(
pahud
24hr 義工
Posts: 1251
Joined: Tue Nov 26, 2002 10:22 pm
Contact:

Post by pahud »

kiko555 wrote:另外想請問一下~
為何我的usb modules只有usbcore會自動啟動呢?
我記得沒錯要先將modules用insmod先加入開機時啟動.......RIGHT?
因此我下了
insmod uhci
insmod usb-storage
><!但是一樣未能在開機時啟動~
所以...我猜~我可能下錯指令了..... :(
開機時要掛哪些modules, 要定義在/etc/modules.autoload

我想你的問題是:
1. 先確定要掛哪些modules才能正確驅動usb裝置
2. 把該modules定義在/etc/modules.autoload裡面
kiko555
Posts: 152
Joined: Mon May 26, 2003 4:33 pm
Contact:

Post by kiko555 »

pahud wrote:
kiko555 wrote:另外想請問一下~
為何我的usb modules只有usbcore會自動啟動呢?
我記得沒錯要先將modules用insmod先加入開機時啟動.......RIGHT?
因此我下了
insmod uhci
insmod usb-storage
><!但是一樣未能在開機時啟動~
所以...我猜~我可能下錯指令了..... :(
開機時要掛哪些modules, 要定義在/etc/modules.autoload

我想你的問題是:
1. 先確定要掛哪些modules才能正確驅動usb裝置
2. 把該modules定義在/etc/modules.autoload裡面
試了一下.....
把uhci
usbstorage
visor
加進去後....
果然ok!了^^
YA!我可愛的CLIE也可以在LINUX上跑了..^^
kiko555
Posts: 152
Joined: Mon May 26, 2003 4:33 pm
Contact:

Post by kiko555 »

無意中逛到的請參考

Code: Select all

I just bought this nice(and cheap) Olympus Camedia C-120 camera with USB out and SmartMedia Cards. How do I make it work in Gentoo Linux?
okay, in your kernel, make sure you build:
scsi: disk support, generic support. (as modules, in my case)
usb: UHCI or EHCI or OHCI (depends on your mainboard)
usb mass storage support, (check everything)
File system support: FAT and VFAT

now to set up some module loading. in /etc/modules.d/usb, edit
alias /dev/sda1 sd_mod
pre-install sd_mod modprobe usb-storage
pre-install usb-storage modprobe usb-uhci

and run modules-update
then edit /etc/fstab
/dev/sda1 /mnt/usb vfat noauto,defaults,users 0 0

Now, any user can just slot in the USB device, mount /mnt/usb and move the pics to their home


Some debugging information:
if your USB thingie (dongle, camera, whatnot) doesn't seem to work properly, cat /proc/partitions and see if there are more partitions on the device.

questions and comments go to the usual place. spider@gentoo.org
原始網址:http://dev.gentoo.org/~spider/
kiko555
Posts: 152
Joined: Mon May 26, 2003 4:33 pm
Contact:

Post by kiko555 »

另外小弟有sony clie t600c的palm pda....
在研究後發現一些可能其他人也會發生的問題~
1.確定usb的驅動是ok的後,請將modules中的usbserial和visor也都掛上

2.安裝jpilot---ps.這套真的不錯用喔~中文也ok!該有的功能都有~所以粉推荐啊~

3.接上同步座,接上clie,按hotsync鈕,這時在/dev/usb/tts會出現/1這個目錄,此時下ln指令產生一個pilot的目錄在/dev下

4.在jpilot這程式中的喜愛設定-設定-序列設定成/dev/pilot
(ps.當然囉~如果您沒做第三個動作,那在第四個動作就設/dev/usb/tts/1)

5.最最最重要的,請在按下hotsync鈕之後再點jpilot的同步,很重要喔,因為usb的介面通常是即插即用的,因此當您按下CLIE的HOTSYNC鈕時,它才會在/DEV/USB/TTS下加上那郭1,加上那郭jpilot的同步不是挺聰明的,要是您先按了JPILOT的同步,那就鐵定看不到PDA了,我就是被這步騙了好久

好的~就這樣~請參考吧~
Post Reply