maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Thread for problems getting USB hostmode working. (https://talk.maemo.org/showthread.php?t=65570)

optimaxxx 2012-04-19 15:59

Re: Thread for problems getting USB hostmode working.
 
Does anybody have any advice on how to prevent phone from crashing/rebooting after dismounting a usb device?

jbscurtis 2012-04-19 21:10

Re: Thread for problems getting USB hostmode working.
 
First things first. Thank you! Thank you! Thank you! to everyone who has made this possible (and you know who you are)! I guess I'm one of the lucky ones as it has always worked well for me. I did, however, read everything I could. I even created some QB widgets for mounting, but now, sometimes, my devices mount by themselves! My favorite thing is my external SSD as the N900 is able to power it without an external source. If ever something doesn't mount it is because I'm running through the steps too quickly. For me these steps always work:

H-E-N
Choose speed correctly.
Plug in device. (It doesn't seem to really matter when I plug in the device. I usually have it plugged in before I start H-E-N.)
Boost on. WAIT!
Enumerate WAIT again!
If it doesn't automatically mount then I use my QBW (I have 6 for multiple devices.)

Estel 2012-04-20 16:29

Re: Thread for problems getting USB hostmode working.
 
Quote:

Originally Posted by optimaxxx (Post 1194447)
Does anybody have any advice on how to prevent phone from crashing/rebooting after dismounting a usb device?

Don't use bq27x00_battery module - if it's enabled, restarting BME reboots device. During HEN worktime, BME is disabled. When You close HEN, it enables BME again, which triggers safety reboot, due to bq27x00_battery already occupying i2c.

/Estel

optimaxxx 2012-04-21 13:55

Re: Thread for problems getting USB hostmode working.
 
So i rmmod bq27x00_battery, and now it only crashes *sometimes*

Would you be able to tell me what setup you're using, and i could go try and emulate it?

thanks

Estel 2012-04-21 17:31

Re: Thread for problems getting USB hostmode working.
 
I would rather see if You haven't bq27x00_battery listed in /etc/modules, and if You *do* (You should) have it listed in /etc/modprobe.d/blacklist

/Estel

optimaxxx 2012-04-22 17:45

Re: Thread for problems getting USB hostmode working.
 
it isn't listed under etc/modules (vi only shows the intro 4 lines explaining what file does, doesn't appear that any modules are activated)
and under the blacklist , it's a single-line file containing only "bq27x00_battery"

Estel 2012-04-23 22:41

Re: Thread for problems getting USB hostmode working.
 
So how the f*** it was loaded (You said that You was able to rmod it)?

optimaxxx 2012-04-26 15:43

Re: Thread for problems getting USB hostmode working.
 
yeah, deleted all of those files, and it seems to be working (went from rebooting 100% of time to only if i'm unlucky, 5-10%)

so i'm fine with that for now, but i have a seperate question, and i apoligise if it's really rather daft of me.

I'm plugging in an Arduino Uno via usb.

it uses the ftdi drivers, which i've got installed, and i have managed to get everything working 100% every now and again, but the problem i'm having is consistency. sometimes i'll plug in my arduino, and it show that a usb something is connected, it just doesn't seem to configure it for use.

What is / is there a code that i can enter instead of using the hen gui, to get it all going, and load only the correct drivers, so that it will mount properly everytime?

this guide helped me. The only difference is that the new arduino boards mount under "ttyACM.." not ttyUSB..

optimaxxx 2012-05-03 02:58

Re: Thread for problems getting USB hostmode working.
 
Still unsure how to load up only the correct driver as specified by me.

But also, I realised my phone was more likely to reboot if I was using the STARVING power profile. Switching back to default power gave me much better stability.

jackjohn 2012-05-31 10:00

Re: Thread for problems getting USB hostmode working.
 
Dear Guys,

need your assistance, already managed to detect the sub serial adapter. Anyway how check whether its already been mount.

Really need your assistance,. Thanks in advanced.



[61370.412750] hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
[61370.412780] usb 1-1: USB disconnect, address 48
[61370.412811] usb 1-1: unregistering device
[61370.412811] usb 1-1: usb_disable_device nuking all URBs
[61370.412841] usb 1-1: unregistering interface 1-1:1.0
[61370.413635] usb 1-1:1.0: uevent
[61370.414154] usb 1-1: uevent
[61370.564392] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
[61370.689392] usb 1-1: new full speed USB device using musb_hdrc and address 49
[61370.838256] usb 1-1: default language 0x0409
[61370.838958] usb 1-1: uevent
[61370.839080] usb 1-1: usb_probe_device
[61370.839080] usb 1-1: configuration #1 chosen from 1 choice
[61370.840393] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[61370.840576] usb 1-1:1.0: uevent
[61370.841400] /home/builder2/maemo-fremantle-armel-extras-devel/work/kernel-power-2.6.28/drivers/usb/core/inode.c: creating file '049'
[61370.841705] usb 1-1: New USB device found, idVendor=067b, idProduct=2303
[61370.841735] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[61370.841766] usb 1-1: Product: USB-Serial Controller
[61370.841766] usb 1-1: Manufacturer: Prolific Technology Inc.
[61370.841796] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[61370.841827] hub 1-0:1.0: port 1 enable change, status 00000103

Estel 2012-05-31 23:55

Re: Thread for problems getting USB hostmode working.
 
what do You mean by :"mounted"? You mount filesystems, and serial adapter doesn't have anything to do with that.

What exactly are You trying to achieve?

/Estel

jackjohn 2012-06-01 07:23

Re: Thread for problems getting USB hostmode working.
 
1 Attachment(s)
Quote:

Originally Posted by Estel (Post 1215734)
what do You mean by :"mounted"? You mount filesystems, and serial adapter doesn't have anything to do with that.

What exactly are You trying to achieve?

/Estel

Dear Estel,

I try to utilized the USB Serial adapter in order to connect to switch,router and server. I also refer to below treats but still not working. Really need assistance on this

http://forums.internettablettalk.com...t=26335&page=2

http://talk.maemo.org/showthread.php?t=13059

Thanks in advanced.

Hoga 2012-06-01 08:02

Re: Thread for problems getting USB hostmode working.
 
Hi Jackjohn,

i am not sure but i dont think kernel-power-50 will work for you
i had the same problems with my usb logitech rumblepad2^^

first step works your kernel finds a new usb device
now it should load the usbserial driver for it
and "mount" your new device to /dev/usb or /dev/ttyUSBx

at this point my linux skills are to low
and i took the long dirty way
compiling the whole kernel-power-50
with hid support for my device

pablocrossa told me that it would be
possible to compile it as a modul
but i just got a segment fault and
it worked with the new kernel
so i got around that ^^

greetings from germany
Hoga

jackjohn 2012-06-01 08:28

Re: Thread for problems getting USB hostmode working.
 
Dear Hoga,

Appreciate you input, there should be away around to get this thing work because even though n800 can establish the serial connection.

Hoga 2012-06-01 09:48

Re: Thread for problems getting USB hostmode working.
 
Hi Jackjohn,

i also think that the n900
should work with a serial usb adapter
but i am not sure if the power-kernel
have the right driver for your device

if possible you could check the hardware id
from the terminal "lsusb" should give you a hint
which serial adapter you have
and which driver is needed to get the adapter running^^

greetings from germany
Hoga

PS: after looking for idProduct=2303
i got http://www.linuxforen.de/forums/showthread.php?t=272802
this is a german link^^

someone worked around
with a simple "modprobe pl2303"
in the terminal on a beagleboard^^

so give it a try and if it works you could add pl2303 to /etc/modules

Estel 2012-06-01 23:43

Re: Thread for problems getting USB hostmode working.
 
Quote:

Originally Posted by jackjohn (Post 1215829)
Dear Estel,

I try to utilized the USB Serial adapter in order to connect to switch,router and server. I also refer to below treats but still not working. Really need assistance on this

http://forums.internettablettalk.com...t=26335&page=2

http://talk.maemo.org/showthread.php?t=13059

Thanks in advanced.

We need to absolutely sure, if kernel have necessary modules compiled in. If it's *not* the case, I'm sure Pali will like to add them to kernel-power. If modules are present, problem lies somewhere else.

I haven't tried such adapters (yet), but what "happen" when You try it with any desktop linux PC? What is the expected outcome, in easy words? Isn't it that You also need drivers/modules for things connected via serial?

I hope someone more knowledgeable on that topic will help here, as I'm [n]*perfectly sure*[/b] it's achievable, without much effort.

/Estel

jackjohn 2012-06-03 14:48

Re: Thread for problems getting USB hostmode working.
 
Dear hoga and estel,

Can you provide the file pl2303.ko.
At this moment I'm not managed to run insmode or modprobe getting error "error inserting invalid module format"& fatal module pl2303 not found

Hoga 2012-06-03 15:11

Re: Thread for problems getting USB hostmode working.
 
Hi Jackjohn,

i think kernel-power-50 provides pl2303.ko
you can try to find the file under "/lib/modules/2.6.28.10-power50/"

with x-terminal:
"cd /lib/modules/2.6.28.10-power50/"
"ls"
should give u a list of all files

on my device "modprobe pl2303" as root works fine^^

greetings from germany
Hoga

jackjohn 2012-06-03 15:45

Re: Thread for problems getting USB hostmode working.
 
dear hoga,

l,m using kernel power 46. Is it possible?

Hoga 2012-06-03 16:19

Re: Thread for problems getting USB hostmode working.
 
Hi Jackjohn,

sure it is possible but the question is how much work it is ^^

you can also look at "/lib/modules/current/"
if you can find the pl2303.ko and the usbserial.ko
if not u need to compile it for kernel-power-46
or better make a backup with backupmenu
and try to upgrade to kernel-power-50
that would be the easy way to get thinks rolling :)

greeting from germany
Hoga

pablocrossa 2012-06-03 16:24

Re: Thread for problems getting USB hostmode working.
 
1 Attachment(s)
Quote:

Originally Posted by Hoga (Post 1216858)
Hi Jackjohn,

sure it is possible but the question is how much work it is ^^

you can also look at "/lib/modules/current/"
if you can find the pl2303.ko and the usbserial.ko
if not u need to compile it for kernel-power-46
or better make a backup with backupmenu
and try to upgrade to kernel-power-50
that would be the easy way to get thinks rolling :)

greeting from germany
Hoga

Could you not simply insmod the modules into the older kernel power, they both are 2.6.28 :) I think simply copying them and insmoding should work, recompiling does not seem necessary :)

EDIT: I attach module, try insmoding on kernel 46 :)

Hoga 2012-06-03 16:41

Re: Thread for problems getting USB hostmode working.
 
Hi Pablocrossa,

sure give it a try but pl2303.ko depends on usbserial.ko
and im not really sure if both of them are the same for 50 and 46 ^^


both files are included in http://maemo.org/packages/view/kernel-power-modules/

greetings from germany
Hoga

pablocrossa 2012-06-03 16:56

Re: Thread for problems getting USB hostmode working.
 
Quote:

Originally Posted by Hoga (Post 1216866)
Hi Pablocrossa,

sure give it a try but pl2303.ko depends on usbserial.ko
and im not really sure if both of them are the same for 50 and 46 ^^


both files are included in http://maemo.org/packages/view/kernel-power-modules/

greetings from germany
Hoga

Ah, I thought as both were the same kernel they should insmod easily, testing is never bad :) then usbserial must also be insmod :)

jackjohn 2012-06-04 00:53

Re: Thread for problems getting USB hostmode working.
 
Dear Guys,

Still the same.


/lib/modules/2.6.28.10power46 # insmod pl2303.ko
insmod: error inserting 'pl2303.ko': -1 Unknown symbol in module
/lib/modules/2.6.28.10power46 # modprobe pl2303.ko
FATAL: Module pl2303.ko not found.
/lib/modules/2.6.28.10power46 # modprobe pl2303
FATAL: Module pl2303 not found.
/lib/modules/2.6.28.10power46 # lsusb
Bus 001 Device 113: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 001: ID 1d6b:0002
/lib/modules/2.6.28.10power46 # cd dev
/bin/sh: cd: can't cd to dev
/lib/modules/2.6.28.10power46 # cd /dev
/dev # ls
DspBridge ram1 tty4
bus ram10 tty40
cmt_speech ram11 tty41
console ram12 tty42
core ram13 tty43
cpu_dma_latency ram14 tty44
fb0 ram15 tty45
fb1 ram2 tty46
fb2 ram3 tty47
fd ram4 tty48
full ram5 tty49
hwrng ram6 tty5
i2c-1 ram7 tty50
i2c-2 ram8 tty51
i2c-3 ram9 tty52
input random tty53
iphb rtc tty54
kmem rtc0 tty55
kmsg shm tty56
lirc0 snd tty57
lircd stderr tty58
loop0 stdin tty59
loop1 stdout tty6
loop2 sticon0 tty60
loop3 tty tty61
loop4 tty0 tty62
loop5 tty1 tty63
loop6 tty10 tty7
loop7 tty11 tty8
mem tty12 tty9
mmcblk0 tty13 ttyS0
mmcblk0p1 tty14 ttyS1
mmcblk0p2 tty15 ttyS2
mmcblk0p3 tty16 ttyS3
mmcblk1 tty17 twl4030-adc
mmcblk1p1 tty18 twl4030_wdt
mtd0 tty19 ubi0
mtd0ro tty2 ubi0_0
mtd1 tty20 ubi_ctrl
mtd1ro tty21 urandom
mtd2 tty22 usbdev1.113_ep00
mtd2ro tty23 usbdev1.113_ep02
mtd3 tty24 usbdev1.113_ep81
mtd3ro tty25 usbdev1.113_ep83
mtd4 tty26 usbdev1.1_ep00
mtd4ro tty27 usbdev1.1_ep81
mtd5 tty28 usbmon0
mtd5ro tty29 usbmon1
net tty3 vcs
network_latency tty30 vcs1
network_throughput tty31 vcs2
null tty32 vcsa
omap-previewer tty33 vcsa1
ppp tty34 vcsa2
ptmx tty35 video0
pts tty36 video1
pvrsrvkm tty37 watchdog
radio0 tty38 zero
ram0 tty39
/dev #

pablocrossa 2012-06-04 01:57

Re: Thread for problems getting USB hostmode working.
 
1 Attachment(s)
Quote:

Originally Posted by jackjohn (Post 1217023)
Dear Guys,

Still the same.


/lib/modules/2.6.28.10power46 # insmod pl2303.ko
insmod: error inserting 'pl2303.ko': -1 Unknown symbol in module
blablabla

Insmod usbserial.ko first, download it from the link posted above :) that I believe should work fine :)

EDIT: Attach file
and for future reference try attaching logs as txt files to not flood pages of people who quote you :)

jackjohn 2012-06-04 03:43

Re: Thread for problems getting USB hostmode working.
 
already managed to see the ttyUSB0 under /dev but using Syncterm app its not working. Try utilized minicom, but still figure out how to change the serial port from ttyS1 to ttyUSB0

jackjohn 2012-06-04 05:24

Re: Thread for problems getting USB hostmode working.
 
1 Attachment(s)
Quote:

Originally Posted by jackjohn (Post 1217069)
already managed to see the ttyUSB0 under /dev but using Syncterm app its not working. Try utilized minicom, but still figure out how to change the serial port from ttyS1 to ttyUSB0


Dear Guys,

I already managed to connect to usb serial. Thanks a lot to Hugo,pablocrossa,Estel and others. Realy appreciated thats.

Anyway at this moment iam not managed to press enter after key in the username:root for the console server. Once i press the enter button it will show rootOM. Still figure out on that. If you guys have input, kindly please share.

Thanks again

jackjohn 2012-06-05 01:17

Re: Thread for problems getting USB hostmode working.
 
Managed to figure out that.
Need to press ctrl+m for enter command. :)

obhishap 2012-06-05 15:32

Re: Thread for problems getting USB hostmode working.
 
Every time I connect my usb pen drive, I get a message "Unable to connect, file system unavailable" after pressed the enumerate button. After pressed the mount button I get successfully mounted message and file manager lead me to that drive. But I cannot copy anything to the drive as it says "read only". Another problem is, after disconnect the drive, I can never connect again without restart my n900. I reinstalled H-E-N and I am using KP-50. Any hints guys ? Thanks.

Estel 2012-06-07 18:01

Re: Thread for problems getting USB hostmode working.
 
If You're using latest CSSU, clicking "mount" is not necessary - ke-recv should mount Your USB drive automagically.

/Estel

obhishap 2012-06-10 17:08

Re: Thread for problems getting USB hostmode working.
 
Thanks Estel for reply. I am not using CSSU and never did. And what about the not getting connected again if I dont restart device. thanks

Estel 2012-06-10 17:15

Re: Thread for problems getting USB hostmode working.
 
No idea, sorry. I've never been *not* using CSSU in correlation with hostmode, and don't plan to. Please ensure that You're using latest kp (50, you said You have it installed anyway), and latest CSSU - it makes it easier for others to help. Then, check dmesg output, after connecting Your pendrive.

/Estel

obhishap 2012-06-10 19:17

Re: Thread for problems getting USB hostmode working.
 
Well I am also thinking of giving CSSU a shot but I want a fully fresh flashed device for that and it will obviously take some times to reorganize. I will go for it soon. Thanks again for reply Estel.

Mr Wolf 2012-07-01 11:09

Re: Thread for problems getting USB hostmode working.
 
Hi to all! When I try to mount my pendrive, I get the error "no filesystem available".
However, the pendrive is mounted. :)
Here's a screenshot if I start H-E-N from terminal
http://i1209.photobucket.com/albums/...701-130438.png
Anybody knows what the error can dipend on?
I have CSSU, Kernel Power 50 installed.
Thanks for your help!

Estel 2012-07-01 14:54

Re: Thread for problems getting USB hostmode working.
 
It's not real error. It's just that now mounting is handled automagically, via ke-recv (in CSSU, at least), so H-E-N tries to mount it again, after it's mounted already.

If You ask me, it's asking for minor GUI update - one that consider augmented booston by joerg_rw, charging during hostmode, and current state of ke-recv - but, it would require convincing MAG to do it, as he wrote this GUI and it's project maintainer. Good luck with that.

/Estel

Mr Wolf 2012-07-01 15:02

Re: Thread for problems getting USB hostmode working.
 
Ok... thanks for your answer!
"Automagically"? :confused: :rolleyes: :D

Estel 2012-07-02 03:11

Re: Thread for problems getting USB hostmode working.
 
Sure:
http://www.urbandictionary.com/defin...=automagically

/Estel

Mr Wolf 2012-07-02 09:01

Re: Thread for problems getting USB hostmode working.
 
Yep, I just searched there. :p

DemonBreaker 2012-07-04 04:13

Re: Thread for problems getting USB hostmode working.
 
Hai All
Im new here...
please help me. i want to use h-e-n hostmode
but when im open h-e-n, i cant mount.
write on it :
your kernel has no proper matching version of hostmode API!
version 20101110 required.
kernel-power v46 is suggersted.
bottom of screen write :
ERROR! Current kernel version : 2.6.28-omap1

Im new using n900, please help anyone.

blitzlee06 2012-07-04 06:06

Re: Thread for problems getting USB hostmode working.
 
Quote:

Originally Posted by DemonBreaker (Post 1231493)
Hai All
Im new here...
please help me. i want to use h-e-n hostmode
but when im open h-e-n, i cant mount.
write on it :
your kernel has no proper matching version of hostmode API!
version 20101110 required.
kernel-power v46 is suggersted.
bottom of screen write :
ERROR! Current kernel version : 2.6.28-omap1

Im new using n900, please help anyone.

you need KP50 for that. your using the default kernel thats why it wont work.


All times are GMT. The time now is 16:06.

vBulletin® Version 3.8.8