Hi,

I made synce work ( Fedora core 4 + HP ipaq rx3115 ), following the howto. But it was not as straightforward as it should be. Main issue : Fedora4 default iptables rules. Feel free to put this "handbook" somewhere, but I don't want my mail to be revealed to spammers. Detail follows:
cheers.
Boris


A)Configuration detail
====================
synce-0.9.0-1.i386.rpm
Fedora core 4
kernel version 2.6.14-1.1653_FC4

HP ipaq rx3115
Windows ME2003SE 4.21.1088

diff /tmp/before /tmp/after
32a33,44
> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  7 Spd=12  MxCh= 0
> D:  Ver= 1.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=16 #Cfgs=  2
> P:  Vendor=03f0 ProdID=1016 Rev= 0.00
> C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=500mA
> I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ipaq
> E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> E:  Ad=04(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> C:  #Ifs= 1 Cfg#= 2 Atr=c0 MxPwr=100mA
> I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=
> E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> E:  Ad=04(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms


B) Modifiying  iptables
=========================================

I have some experiment using synce, since I installed it on my former Linux RH8 2.4.18, one year ago. The firewall rules I was using for one year on RH8 did not work here on FC4. This seem to be due to the line in /etc/sysconfig/iptables:

-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited

To make things work, I added the firewall rule for the ipaq *ABOVE* this line.
/etc/sysconfig/iptables now reads:
....
##ipaq linux
-A RH-Firewall-1-INPUT -i ppp0 -p tcp -m tcp -s 192.168.131.201/255.255.225.255 --dport 5678 --syn -j ACCEPT -A RH-Firewall-1-INPUT -i ppp0 -p tcp -m tcp -s 192.168.131.201/255.255.225.255 --dport 5679 --syn -j ACCEPT -A RH-Firewall-1-INPUT -i ppp0 -p udp -m udp -s 192.168.131.201/255.255.225.255 --dport 5678 -j ACCEPT -A RH-Firewall-1-INPUT -i ppp0 -p udp -m udp -s 192.168.131.201/255.255.225.255 --dport 5679 -j ACCEPT

-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
.....

and restarted iptables:
service iptables restart

C) automatic connection
========================
I added the following line to /etc/hotplug/usb.usermap (0x03f0 0x1016 = Vendor Prod_Id)
--------------------------------
synce 0x0003 0x03f0 0x1016 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
--------------------------------

Then I copied my RH8 /etc/hotplug/usb/synce script. This script did not work either. Reason : it seems I have to wait a while (~10s) till /dev/ttyUSB0 is created.
Here is my new script which works perfectly:

--------- /etc/hotplug/usb/synce  -----------------------

#!/bin/bash

export time=`date +"%b %d %X"`
export uname=`uname -n`
echo "$time $uname $0 [$$]: iPAQ added" >> /var/log/synce
synce-serial-abort >> /dev/null
(
sleep 1
echo -n "waiting for ttyUSB0 creation  " >> /var/log/synce
for x in `seq 1 20`; do
 if ! [ -c /dev/ttyUSB0 ] ; then
    echo -n . >> /var/log/synce
    sleep 1
 else  break
 fi
done
if ! [ -c /dev/ttyUSB0 ]; then
echo "$time $uname $0 [$$]: device node /dev/tts/USB0 not created!" >> /var/log/synce
 exit 1
fi
synce-serial-start >> /var/log/synce
)&

:> $REMOVER
echo "export time=\`date +\"%b %d %X\"\`" >> $REMOVER
echo "export uname=\`uname -n\`" >> $REMOVER
echo "echo \"\$time \$uname $0: iPAQ removed\" >> /var/log/synce" >> $REMOVER
echo "sleep 5 >> /var/log/synce" >> $REMOVER
echo "synce-serial-abort >> /var/log/synce" >> $REMOVER
chmod +x $REMOVER

--------------------------------------------------------

cheers
Boris




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Synce-devel mailing list
Synce-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to