Skip to content

Commit 1df4bd5

Browse files
committed
Merge pull request #4 from wolf3d/staging
Staging
2 parents 689f789 + 48453b9 commit 1df4bd5

File tree

1 file changed

+327
-0
lines changed

1 file changed

+327
-0
lines changed
Lines changed: 327 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,327 @@
1+
---
2+
layout: post
3+
title: "HotSync pda device through IrDA on linux"
4+
date: 2016-02-11 22:09:56
5+
categories: hotsync irda pda handspring
6+
---
7+
8+
It's a year 2016 and I am attempting to synchronize PDA from early two thousands with my pc. This is more or less a memo for myself. I am sitting on Debian flavor of linux and so far I have read a bunch of articles on topic that I found googling the internet. It is fortunate or not so fortunate for me nowadays it is easier to setup IrDA connectivity and most of the things just work right off the bat without much struggle.
9+
I did all this experimenting on freshly installed system and just before started to setup basic configuration I checked few things. In short one needs to install irda-utils,pilot-link packages as root, add your ordinary user to dialout group and then reboot. After reboot plugin IrDA to USB dongle and check dmesg for any issues that could appear and in case of no problems find out with what device name dongle was registered. Again as root load such kernel modules exactly in this order irda, ircomm, ircomm-tty and execute irattach <device name> -s. In this case device name was irda0.
10+
{% highlight bash %}
11+
wolf@chimp:~$
12+
wolf@chimp:~$ uname -a
13+
Linux chimp 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux
14+
wolf@chimp:~$
15+
{% endhighlight %}
16+
I was curious what could be seen in the kernel ring buffer before I plugged in IrDA to USB dongle.
17+
{% highlight bash %}
18+
wolf@chimp:~$
19+
wolf@chimp:~$ dmesg | less
20+
wolf@chimp:~$ dmesg | tail
21+
[ 13.795282] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
22+
[ 13.795285] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
23+
[ 13.795287] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
24+
[ 13.795290] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
25+
[ 13.795293] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
26+
[ 13.795295] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
27+
[ 13.795298] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
28+
[ 13.795300] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
29+
[ 14.122903] atl1c 0000:05:00.0: irq 54 for MSI/MSI-X
30+
[ 14.123421] atl1c 0000:05:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
31+
wolf@chimp:~$
32+
{% endhighlight %}
33+
and after plugging it in
34+
{% highlight bash %}
35+
wolf@chimp:~$ dmesg | tail
36+
[ 14.122903] atl1c 0000:05:00.0: irq 54 for MSI/MSI-X
37+
[ 14.123421] atl1c 0000:05:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
38+
[ 117.236369] usb 4-1.6: USB disconnect, device number 4
39+
[ 120.765623] usb 4-1.6: new full-speed USB device number 5 using ehci-pci
40+
[ 120.858870] usb 4-1.6: New USB device found, idVendor=066f, idProduct=4200
41+
[ 120.858874] usb 4-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
42+
[ 120.858877] usb 4-1.6: Product: IrDA/USB Bridge
43+
[ 120.858879] usb 4-1.6: Manufacturer: Sigmatel Inc
44+
[ 120.859679] SigmaTel STIr4200 IRDA/USB found at address 5, Vendor: 66f, Product: 4200
45+
[ 120.859932] stir4200 4-1.6:1.0: IrDA: Registered SigmaTel device irda0
46+
wolf@chimp:~$
47+
{% endhighlight %}
48+
Obviously dongle was recognized and it seems that it was registered without any issues, at least at this point I was not able to see any errors. I proceeded with some more checks on currently loaded kernel modules related to usb functionality and checking if there are proper devices and what kind of access rights do they have.
49+
{% highlight bash %}
50+
wolf@chimp:~$ lsmod | grep usb
51+
usbhid 44460 0
52+
hid 102264 2 hid_generic,usbhid
53+
usb_storage 56215 0
54+
scsi_mod 191405 5 sg,usb_storage,libata,sd_mod,sr_mod
55+
usbcore 195427 6 usb_storage,ehci_hcd,ehci_pci,usbhid,stir4200,xhci_hcd
56+
usb_common 12440 1 usbcore
57+
wolf@chimp:~$ ls -l /dev/ttyS?
58+
crw-rw---- 1 root dialout 4, 64 Feb 6 12:22 /dev/ttyS0
59+
crw-rw---- 1 root dialout 4, 65 Feb 6 12:22 /dev/ttyS1
60+
crw-rw---- 1 root dialout 4, 66 Feb 6 12:22 /dev/ttyS2
61+
crw-rw---- 1 root dialout 4, 67 Feb 6 12:22 /dev/ttyS3
62+
wolf@chimp:~$
63+
wolf@chimp:~$ ls -l /dev/ircomm?
64+
ls: cannot access /dev/ircomm?: No such file or directory
65+
wolf@chimp:~$
66+
{% endhighlight %}
67+
68+
Then in new terminal window I changed my current user to superuser i.e. root and installed few packages that are needed for work with IrDA
69+
{% highlight bash %}
70+
root@chimp:/etc/apt#
71+
root@chimp:/etc/apt# apt-get install irda-utils pilot-link
72+
Reading package lists... Done
73+
Building dependency tree
74+
Reading state information... Done
75+
The following extra packages will be installed:
76+
libopenobex1 libpisock9 openobex-apps setserial
77+
Suggested packages:
78+
libgsmme1c102 liblinc1 obexftp jpilot kpilot gnome-pilot evolution claws-mail sylpheed
79+
The following NEW packages will be installed:
80+
irda-utils libopenobex1 libpisock9 openobex-apps pilot-link setserial
81+
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
82+
Need to get 905 kB of archives.
83+
After this operation, 2,125 kB of additional disk space will be used.
84+
Do you want to continue? [Y/n] Y
85+
Get:1 http://debian.koyanet.lv/debian/ jessie/main irda-utils amd64 0.9.18-12 [98.1 kB]
86+
Get:2 http://debian.koyanet.lv/debian/ jessie/main libopenobex1 amd64 1.5-2.1 [24.5 kB]
87+
Get:3 http://debian.koyanet.lv/debian/ jessie/main libpisock9 amd64 0.12.5-dfsg-1 [272 kB]
88+
Get:4 http://debian.koyanet.lv/debian/ jessie/main openobex-apps amd64 1.5-2.1 [39.5 kB]
89+
Get:5 http://debian.koyanet.lv/debian/ jessie/main pilot-link amd64 0.12.5-dfsg-1 [419 kB]
90+
Get:6 http://debian.koyanet.lv/debian/ jessie/main setserial amd64 2.17-48 [51.3 kB]
91+
Fetched 905 kB in 0s (3,067 kB/s)
92+
Preconfiguring packages ...
93+
Selecting previously unselected package irda-utils.
94+
(Reading database ... 75770 files and directories currently installed.)
95+
Preparing to unpack .../irda-utils_0.9.18-12_amd64.deb ...
96+
Unpacking irda-utils (0.9.18-12) ...
97+
Selecting previously unselected package libopenobex1.
98+
Preparing to unpack .../libopenobex1_1.5-2.1_amd64.deb ...
99+
Unpacking libopenobex1 (1.5-2.1) ...
100+
Selecting previously unselected package libpisock9.
101+
Preparing to unpack .../libpisock9_0.12.5-dfsg-1_amd64.deb ...
102+
Unpacking libpisock9 (0.12.5-dfsg-1) ...
103+
Selecting previously unselected package openobex-apps.
104+
Preparing to unpack .../openobex-apps_1.5-2.1_amd64.deb ...
105+
Unpacking openobex-apps (1.5-2.1) ...
106+
Selecting previously unselected package pilot-link.
107+
Preparing to unpack .../pilot-link_0.12.5-dfsg-1_amd64.deb ...
108+
Unpacking pilot-link (0.12.5-dfsg-1) ...
109+
Selecting previously unselected package setserial.
110+
Preparing to unpack .../setserial_2.17-48_amd64.deb ...
111+
Unpacking setserial (2.17-48) ...
112+
Processing triggers for systemd (215-17+deb8u3) ...
113+
Processing triggers for man-db (2.7.0.2-5) ...
114+
Setting up irda-utils (0.9.18-12) ...
115+
/var/lib/dpkg/info/irda-utils.postinst: line 141: /dev/MAKEDEV: No such file or directory
116+
Setting up libopenobex1 (1.5-2.1) ...
117+
Setting up libpisock9 (0.12.5-dfsg-1) ...
118+
Setting up openobex-apps (1.5-2.1) ...
119+
Setting up pilot-link (0.12.5-dfsg-1) ...
120+
Setting up setserial (2.17-48) ...
121+
removing the old setserial entry in the rcn.d directories
122+
Update complete.
123+
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
124+
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
125+
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
126+
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
127+
Saving state of known serial devices... backing up /var/lib/setserial/autoserial.conf done.
128+
Processing triggers for systemd (215-17+deb8u3) ...
129+
Processing triggers for libc-bin (2.19-18+deb8u2) ...
130+
root@chimp:/etc/apt#
131+
{% endhighlight %}
132+
additionally for convenience not to change access rights for devices all the time I added myself to dialout group
133+
{% highlight bash %}
134+
root@chimp:/etc/apt#
135+
root@chimp:/etc/apt# gpasswd -a wolf dialout
136+
Adding user wolf to group dialout
137+
root@chimp:/etc/apt#
138+
{% endhighlight %}
139+
Time for reboot and after login let's check some basic functionality. After reboot, plugging in IrDA-USB dongle, checking dmesg for errors.
140+
{% highlight bash %}
141+
wolf@chimp:~$
142+
wolf@chimp:~$ dmesg | tail
143+
[ 14.175232] atl1c 0000:05:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
144+
[ 284.941500] usb 4-1.6: new full-speed USB device number 4 using ehci-pci
145+
[ 285.034694] usb 4-1.6: New USB device found, idVendor=066f, idProduct=4200
146+
[ 285.034699] usb 4-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
147+
[ 285.034701] usb 4-1.6: Product: IrDA/USB Bridge
148+
[ 285.034703] usb 4-1.6: Manufacturer: Sigmatel Inc
149+
[ 285.138477] NET: Registered protocol family 23
150+
[ 285.157333] SigmaTel STIr4200 IRDA/USB found at address 4, Vendor: 66f, Product: 4200
151+
[ 285.157682] stir4200 4-1.6:1.0: IrDA: Registered SigmaTel device irda0
152+
[ 285.157718] usbcore: registered new interface driver stir4200
153+
wolf@chimp:~$
154+
{% endhighlight %}
155+
rechecking access rights
156+
{% highlight bash %}
157+
wolf@chimp:~$
158+
wolf@chimp:~$ ls -l /dev/ttyS?
159+
crw-rw---- 1 root dialout 4, 64 Feb 6 12:37 /dev/ttyS0
160+
crw-rw---- 1 root dialout 4, 65 Feb 6 12:37 /dev/ttyS1
161+
crw-rw---- 1 root dialout 4, 66 Feb 6 12:37 /dev/ttyS2
162+
crw-rw---- 1 root dialout 4, 67 Feb 6 12:37 /dev/ttyS3
163+
wolf@chimp:~$ ls -l /dev/ircomm?
164+
ls: cannot access /dev/ircomm?: No such file or directory
165+
wolf@chimp:~$
166+
{% endhighlight %}
167+
168+
add irda kernel module with modprobe
169+
170+
{% highlight bash %}
171+
root@chimp:~#
172+
root@chimp:~# modprobe irda
173+
{% endhighlight %}
174+
checking dmesg and add ircomm kernel module with modprobe
175+
{% highlight bash %}
176+
wolf@chimp:~$
177+
wolf@chimp:~$ dmesg | tail
178+
[ 285.034699] usb 4-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
179+
[ 285.034701] usb 4-1.6: Product: IrDA/USB Bridge
180+
[ 285.034703] usb 4-1.6: Manufacturer: Sigmatel Inc
181+
[ 285.138477] NET: Registered protocol family 23
182+
[ 285.157333] SigmaTel STIr4200 IRDA/USB found at address 4, Vendor: 66f, Product: 4200
183+
[ 285.157682] stir4200 4-1.6:1.0: IrDA: Registered SigmaTel device irda0
184+
[ 285.157718] usbcore: registered new interface driver stir4200
185+
[ 399.834579] net irda0: usb receive submit error: -1
186+
[ 399.934620] net irda0: usb receive submit error: -1
187+
[ 826.967831] net irda0: usb receive submit error: -1
188+
wolf@chimp:~$
189+
root@chimp:~# modprobe ircomm
190+
root@chimp:~#
191+
{% endhighlight %}
192+
checking dmesg
193+
{% highlight bash %}
194+
wolf@chimp:~$ dmesg | tail
195+
[ 285.034701] usb 4-1.6: Product: IrDA/USB Bridge
196+
[ 285.034703] usb 4-1.6: Manufacturer: Sigmatel Inc
197+
[ 285.138477] NET: Registered protocol family 23
198+
[ 285.157333] SigmaTel STIr4200 IRDA/USB found at address 4, Vendor: 66f, Product: 4200
199+
[ 285.157682] stir4200 4-1.6:1.0: IrDA: Registered SigmaTel device irda0
200+
[ 285.157718] usbcore: registered new interface driver stir4200
201+
[ 399.834579] net irda0: usb receive submit error: -1
202+
[ 399.934620] net irda0: usb receive submit error: -1
203+
[ 826.967831] net irda0: usb receive submit error: -1
204+
[ 907.882011] IrCOMM protocol (Dag Brattli)
205+
wolf@chimp:~$
206+
{% endhighlight %}
207+
208+
add ircomm-tty module
209+
210+
{% highlight bash %}
211+
wolf@chimp:~$
212+
wolf@chimp:~$ ls -l /dev/ttyS?
213+
crw-rw---- 1 root dialout 4, 64 Feb 6 12:37 /dev/ttyS0
214+
crw-rw---- 1 root dialout 4, 65 Feb 6 12:37 /dev/ttyS1
215+
crw-rw---- 1 root dialout 4, 66 Feb 6 12:37 /dev/ttyS2
216+
crw-rw---- 1 root dialout 4, 67 Feb 6 12:37 /dev/ttyS3
217+
wolf@chimp:~$ ls -l /dev/ircomm?
218+
ls: cannot access /dev/ircomm?: No such file or directory
219+
wolf@chimp:~$
220+
root@chimp:~# modprobe ircomm-tty
221+
root@chimp:~#
222+
{% endhighlight %}
223+
{% highlight bash %}
224+
wolf@chimp:~$ dmesg | tail
225+
[ 285.138477] NET: Registered protocol family 23
226+
[ 285.157333] SigmaTel STIr4200 IRDA/USB found at address 4, Vendor: 66f, Product: 4200
227+
[ 285.157682] stir4200 4-1.6:1.0: IrDA: Registered SigmaTel device irda0
228+
[ 285.157718] usbcore: registered new interface driver stir4200
229+
[ 399.834579] net irda0: usb receive submit error: -1
230+
[ 399.934620] net irda0: usb receive submit error: -1
231+
[ 826.967831] net irda0: usb receive submit error: -1
232+
[ 907.882011] IrCOMM protocol (Dag Brattli)
233+
[ 1013.850132] net irda0: usb receive submit error: -1
234+
[ 1013.950179] net irda0: usb receive submit error: -1
235+
{% endhighlight %}
236+
{% highlight bash %}
237+
wolf@chimp:~$ ls -l /dev/ttyS?
238+
crw-rw---- 1 root dialout 4, 64 Feb 6 12:37 /dev/ttyS0
239+
crw-rw---- 1 root dialout 4, 65 Feb 6 12:37 /dev/ttyS1
240+
crw-rw---- 1 root dialout 4, 66 Feb 6 12:37 /dev/ttyS2
241+
crw-rw---- 1 root dialout 4, 67 Feb 6 12:37 /dev/ttyS3
242+
wolf@chimp:~$
243+
wolf@chimp:~$ ls -l /dev/ircomm?
244+
crw-rw---- 1 root dialout 161, 0 Feb 6 12:54 /dev/ircomm0
245+
crw-rw---- 1 root dialout 161, 1 Feb 6 12:54 /dev/ircomm1
246+
crw-rw---- 1 root dialout 161, 2 Feb 6 12:54 /dev/ircomm2
247+
crw-rw---- 1 root dialout 161, 3 Feb 6 12:54 /dev/ircomm3
248+
crw-rw---- 1 root dialout 161, 4 Feb 6 12:54 /dev/ircomm4
249+
crw-rw---- 1 root dialout 161, 5 Feb 6 12:54 /dev/ircomm5
250+
crw-rw---- 1 root dialout 161, 6 Feb 6 12:54 /dev/ircomm6
251+
crw-rw---- 1 root dialout 161, 7 Feb 6 12:54 /dev/ircomm7
252+
crw-rw---- 1 root dialout 161, 8 Feb 6 12:54 /dev/ircomm8
253+
crw-rw---- 1 root dialout 161, 9 Feb 6 12:54 /dev/ircomm9
254+
wolf@chimp:~$
255+
{% endhighlight %}
256+
257+
and finally bind the Linux-IrDA stack to a IrDA port, use irda0 interface name and start discovery of remote IrDA devices
258+
259+
{% highlight bash %}
260+
root@chimp:~#
261+
root@chimp:~# irattach irda0 -s
262+
root@chimp:~#
263+
wolf@chimp:~$ dmesg | tail
264+
[ 285.138477] NET: Registered protocol family 23
265+
[ 285.157333] SigmaTel STIr4200 IRDA/USB found at address 4, Vendor: 66f, Product: 4200
266+
[ 285.157682] stir4200 4-1.6:1.0: IrDA: Registered SigmaTel device irda0
267+
[ 285.157718] usbcore: registered new interface driver stir4200
268+
[ 399.834579] net irda0: usb receive submit error: -1
269+
[ 399.934620] net irda0: usb receive submit error: -1
270+
[ 826.967831] net irda0: usb receive submit error: -1
271+
[ 907.882011] IrCOMM protocol (Dag Brattli)
272+
[ 1013.850132] net irda0: usb receive submit error: -1
273+
[ 1013.950179] net irda0: usb receive submit error: -1
274+
wolf@chimp:~$
275+
{% endhighlight %}
276+
doing some basic command to understand if this actually works...
277+
{% highlight bash %}
278+
wolf@chimp:~$
279+
wolf@chimp:~$ pilot-xfer -p /dev/ircomm0 -l
280+
281+
Listening for incoming connection on /dev/ircomm0... connected!
282+
283+
Reading list of databases in RAM...
284+
SF-EE_SysHeap
285+
SFT-EE_SYMSFTES
286+
SFT-EE_SYMSFPOR
287+
SFT-EE_SYMSFPAR
288+
SFT-EE_SYMSFHS
289+
SFT-EE_SYMSFDIA
290+
SFT-EE_SYMSFBDR
291+
SFT-EE_SYMSF2C
292+
AddressDB
293+
DatebookDB
294+
MailDB
295+
MemoDB
296+
ConnectionDB
297+
NetworkDB
298+
ToDoDB
299+
SFE_DiagUtil
300+
SF-EE_SYMBOLDIAG
301+
Graffiti
302+
psysLaunchDB
303+
Graffiti ShortCuts
304+
Unsaved Preferences
305+
Net Prefs
306+
System MIDI Sounds
307+
Saved Preferences
308+
309+
List complete. 24 files found.
310+
311+
312+
Thank you for using pilot-link.
313+
314+
wolf@chimp:~$
315+
{% endhighlight %}
316+
I think that this setup was successful.
317+
318+
reference links:
319+
[https://help.ubuntu.com/community/IrdaHowto](https://help.ubuntu.com/community/IrdaHowto){:target="_blank"}
320+
[http://irda.sourceforge.net/docs/advanced.html](http://irda.sourceforge.net/docs/advanced.html){:target="_blank"}
321+
[http://web.archive.org/web/20040104125306/http://howto.pilot-link.org/irdasync/ca.html](http://web.archive.org/web/20040104125306/http://howto.pilot-link.org/irdasync/ca.html){:target="_blank"}
322+
[https://www.mail-archive.com/[email protected]/msg01377.html](https://www.mail-archive.com/[email protected]/msg01377.html){:target="_blank"}
323+
[http://www.tldp.org/HOWTO/Infrared-HOWTO/infrared-howto-s-terminal-palm.html](http://www.tldp.org/HOWTO/Infrared-HOWTO/infrared-howto-s-terminal-palm.html){:target="_blank"}
324+
[http://linux.die.net/man/8/irattach](http://linux.die.net/man/8/irattach){:target="_blank"}
325+
[http://unix.stackexchange.com/questions/29570/how-do-i-remove-a-user-from-a-group](http://unix.stackexchange.com/questions/29570/how-do-i-remove-a-user-from-a-group){:target="_blank"}
326+
[http://www.cyberciti.biz/faq/linux-show-the-status-of-modules-driver/](){:target="_blank"}
327+

0 commit comments

Comments
 (0)