# Palm & USB  & devfs & kernel 2.6.4

## e-nigma

Hi.

I've got a real big problem. I'm now trying for one week to get my Sony Clie peg-sj22 working

(using kernel- 2.6.4, with devfs and usb_serial & visor suppot  compiled in) 

First of all, I'm using jpilot, but I don't know which /dev/ file my palm is on. I've read that with devfs it schould be /dev/usb/0 which I don't have. I've also made the nodes /dev/ttyUSBO but it still didn't work to connect my palm to my computer...

I'd be really happy if someone could help me....

----------

## NeddySeagoon

e-nigma,

I Have an iPaq running ethernet over USB on a 2.4 kernel.

You need the right USB ethernet driver available to your kernel, then at the PC end you run 

```
ifconfig .... usb0
```

 to set it up.

I can post a script that sets up the PC end for PPP, routing and packet forwarding so that you can do handheld to PC via USB then onto the internet through your usual PC link.

If I dig about a bit I can find the module I use but yours may be different

----------

## DarwinianCoeus

ive got the same problem, 2.6.4-love1, but running udev

i __believe__ /dev/usb/ttd/0 moved to /dev/tts/0, so i tried using that, but nothing

----------

## Yagasaki

Same problem overhere.

```

bash-2.05b# tail -f /var/log/messages /*gives me:

Apr 21 16:07:30 morpheus usb 2-2: Handspring Visor / Palm OS converter now attached to ttyUSB0 (or usb/tts/0 for devfs)

Apr 21 16:07:30 morpheus usb 2-2: Handspring Visor / Palm OS converter now attached to ttyUSB1 (or usb/tts/1 for devfs)

```

I have a gentoo system with a 2.6.6-rc1 kernel; devfs and usb_serial and visor support are compiled in, too. My palm is a palm m130. I try to get it working by entering the proper path in my kpilot configuration, but none of these work:

/dev/usb/tts/0 /* folders exist, but not the node

/dev/usb/tts/1 /* dito

/dev/tts/0 /* node exist and kpilot says it's ready, but doesn't sync with it

/dev/tts/1  /* dito

/dev/ttyUSB0 /* node doesn't exist

/dev/ttyUSB1 /* node doesn't exist

Do I need to manually create a node? How's that be done? Thanks.   :Smile: 

----------

## Yagasaki

Okay, my confusion is getting bigger: since my last boot my tts in usb doesn't exist anymore:

```

bash-2.05b$ ls -l /dev/usb

total 0

drwxr-xr-x    1 root     root            0 Jan  1  1970 hid

bash-2.05b$

```

The only changes I did on the system is enabled OSS support in my kernel (Id like to hear sounds in Mutantstormdemo, Spacetripperdemo and Frozen-Bubble) which should hardly affect this issue.

Researching the forums I also found the mknod command which would let me create a node, but to do so I need to pass a major and a minor attribute. Does anybody know what these would be for a palm m130?

Oh, maybe this information helps, too: on my previously installed SuSE 9.0 system my palm nicely worked using /dev/ttyUSB0, but this node doesn't exist either in my gentoo installation, as posted above.

----------

## rapsure

So I didn't know how to at first, but I read around, and decided what to do.  In the kernel build menu under device drivers/usb support/usb serial converter support/*  You will see that there is a serial converter for Palm, visor, and similar devices.  Select it to compile as part of the kernel.  Install the new kernel, and then restart the computer.  To a dry test run with your palm device, and look at the kernel log.  At the bottom of it it should say where it connected the device to.  Use that device to in the jpilot configuration.  I did that, and then It still wouldn't connect.  I use the /dev/ttyUSB1, but it didn't work until I changed the time out timing from 2 to 5.  It worked like a charm.  Enjoy!!  I am using the 2.6.5 kernel.

----------

## lucida

I have some bad experience with devfs+kernel 2.6, so I'm currently running the 2.6 without devfs/udev. 

About palm ppp setting, you may wanna check this post:

https://forums.gentoo.org/viewtopic.php?t=111881

----------

## Yagasaki

@rapsure

Thank you for your help, but I already did as you suggested (as you can see in my posts above, Palm support is compiled into my kernel). What about the time out settings, are they specific to jpilot (I use kpilot) or can they be globally set somewhere in the system?

@lucida

Thanks for the link, this website looks really promising. However, I'd like to use the USB connection, do you know where their USB Howto has gone?

----------

## rapsure

I don't have devfs compiled.  I am using udev, and the device nodes should be created automatically.  When you try to hotsync it go to the bottom of the system log to see where it was connected to, or to type in dmesg, and see what device the palm was connected to.  I don't think this will change anything, but you can try it.  It will make the usb devices.  Type in MAKEDEV usb.  All of the usb devices will be made.  This is what I get for kernel messages.

usb 1-1: new full speed USB device using address 7

usb 1-1: Handspring Visor / Palm OS: Number of ports: 2

usb 1-1: Handspring Visor / Palm OS: port 1, is for Generic use

usb 1-1: Handspring Visor / Palm OS: port 2, is for HotSync use

visor 1-1:1.0: Handspring Visor / Palm OS converter detected

usb 1-1: Handspring Visor / Palm OS converter now attached to ttyUSB0 (or usb/tts/0 for devfs)

usb 1-1: Handspring Visor / Palm OS converter now attached to ttyUSB1 (or usb/tts/1 for devfs)

usb 1-1: USB disconnect, address 7

visor ttyUSB0: Handspring Visor / Palm OS converter now disconnected from ttyUSB0

visor ttyUSB1: Handspring Visor / Palm OS converter now disconnected from ttyUSB1

visor 1-1:1.0: device disconnected

So then I know where it is connected.  This is just continued from my last post.

----------

## WackyDoo

I also have a pure udev system with development-sources 2.6.5.  I

recently tried changing the RC_DEVICE_TARBALL setting to "no" so that

the /dev/ttyUSB1 file is no longer statically created at boot.

Instead when I hit the sync button I can see (using "ls -l /dev/tts"

and dmesg) the /dev/tts/USB1 device file being dynamically created and

removed on the fly.  As these files are created with group "usb"

read/write permissions, make sure you add yourself to the usb group in

/etc/group.  

Also, whereas before with the static /dev/ttyUSB1 I could sometimes

initiate the sync on the PC before hitting hotsync on the palm, now I

always hit sync on the palm, wait for about 4 seconds for the dev

files to be created and stabilize, then initiate the sync/transfer on

the PC. Seems more reliable now with pure udev & no tarball, but it does

effect other programs which expect other static dev links like

/dev/cdrom - I just point these to /dev/cdroms/cdrom0. 

[env. tungsten E/2.6.5 dev/jpilot/pilot-link]

----------

## tyll

 *Quote:*   

> 
> 
> I have a gentoo system with a 2.6.6-rc1 kernel; devfs and usb_serial and visor support are compiled in, too. My palm is a palm m130. I try to get it working by entering the proper path in my kpilot configuration, but none of these work: 
> 
>  /dev/usb/tts/0 /* folders exist, but not the node 
> ...

 

So I guess your m130 is connected via USB?

I've a M505 and the nodes are created if i press the hotsync button but are deleted after the sync. And it uses "tts/1".

 *Quote:*   

> 
> 
>  /dev/tts/0 /* node exist and kpilot says it's ready, but doesn't sync with it 
> 
>  /dev/tts/1 /* dito 
> ...

 

This should only work if you connected the m130 via serial.

 *Quote:*   

> 
> 
>  /dev/ttyUSB0 /* node doesn't exist 
> 
>  /dev/ttyUSB1 /* node doesn't exist
> ...

 

I guess you don't need them.

I made a symlink /dev/pilot because this seems to be default on most palm applications

```

ln -s /dev/usb/tts/1 /dev/pilot

```

----------

## Yagasaki

Thanks everyone, you helped me do further progress on the issue.   :Very Happy:  Yes, my m130 is connected with a USB cradle, sorry if I wasn't clear about that. I thought it was clear because the  topic of this thread.   :Very Happy: 

These are the checks and changes I made:

1) I checked if the nodes are made when I do a hotsync (thanks tyll!!!) and saw that

```
/dev/usb/tts/0

/dev/usb/tts/1
```

are properly being created and removed, but still no connection with kpilot

2) I added my userprofile (parcival) to the usb group in /etc/groups, but still no connection with kpilot

3) I made 

```
ln -s /dev/usb/tts/1 /dev/pilot
```

but still no connection with kpilot

4) Having a closer look at the properties of the nodes, I noticed that root is the only one who's allowed to read and write on these nodes, the group and others have no rights. I booted into KDE as root and managed to establish a connection in kpilot with /dev/usb/tts/1 and kpilot automatically started backing up the data from my palm.

However, two questions remain:

1. What do I need to do so that I can perform hotsyncs as a non-root user? Would it be acceptable to simply use the chmod command on the nodes?

2. My data never got fully backed up; after a while my palm cancels the backup and kpilot exits the process, too, saying that it got canceled. On one occasion my system even crashed forcing me to do a hard reset. How can I find more information on why that happens?

Thanks again for all your support and patience!

----------

## mattrogers

add this to the bottom of /etc/devfsd.conf:

```

#Manage Palm pilot devices

LOOKUP ^pilot$ CFUNCTION GLOBAL mksymlink usb/tts/1 pilot

REGISTER ^usb/tts/1$ CFUNCTION GLOBAL mksymlink $devname pilot PERMISSIONS root.users

REGISTER ^usb/tts/1$ PERMISSIONS root.users 666

UNREGISTER ^usb/tts/1$ CFUNTION GLOBAL unlink pilot

```

That should set up the user permissions correctly.  

Also, I got this from another post, so I'm not completely sure that it works yet.

Matt

----------

