|
|
Home Linux and 3G Forum
|
|
PHARscape 3G Datacards and Linux
|
| View previous topic :: View next topic |
| Author |
Message |
atlas95
Joined: 08 Jul 2008 Posts: 8

|
Posted: Thu Jul 10, 2008 4:16 am Post subject: Autorun hsoconnect |
|
|
Hello,
I search how to autorun hsoconnect when i plug my icon225 with dbus please.
I have try but this doesn't work  |
|
| Back to top |
|
 |
atlas95
Joined: 08 Jul 2008 Posts: 8

|
Posted: Thu Nov 06, 2008 8:01 pm Post subject: |
|
|
I have done it !
In all the script replace "cyril" by ur username
Here my hso udev rules :
cyril@atlas-debian:~$ cat /etc/udev/rules.d/z20_hso-udev.rules
| Code: | ACTION!="add", GOTO="hso_end"
# send rezero command via usb_storage driver for all ZCOPTION devices
SUBSYSTEMS=="scsi", ATTRS{vendor}=="ZCOPTION", KERNEL=="sg[0-9]*", RUN+="/usr/sbin/rezero /dev/%k"
# Start the HSOconnect client via our shell script
SUBSYSTEMS=="scsi", ATTRS{vendor}=="ZCOPTION", KERNEL=="sg[0-9]*", ENV{DISPLAY}=":0.0", ENV{USER}="cyril", RUN+="/bin/su cyril -c '/usr/bin/hsoconnect.sh'"
SUBSYSTEM!="usb", GOTO="hso_end"
# The follwing lines are only needed for testing and debugging.
# Because the old option mainline driver "option" is blacklisted and
# the new option hso driver is installed into one kernel modules tree
# - hopefully your current one - there is normally nothing special to do.
#
# But if you like to load instead of the default hso driver a special one
# you can use these lines as a template for your own setting.
# Therefore blacklist also the hso driver. This prevents loading the default
# driver in the current kernel modules and loading the driver manually works
# anyway.
#
# Don't forget to corret the path to your needed alternative driver!
#
#SYSFS{idVendor}=="0af0", SYSFS[idProduct}=="6911", RUN+="/sbin/modprobe hso"
#SYSFS{idVendor}=="0af0", SYSFS[idProduct}=="c031", PROGRAM="/bin/sh -c 'uname -r'", RUN+="/sbin/insmod /lib/modules/%c/kernel/drivers/net/wwan/hso.ko debug=0xff"
#SYSFS{idVendor}=="0af0", SYSFS[idProduct}=="d013", PROGRAM="/bin/sh -c 'uname -r'", RUN+="/sbin/insmod /lib/modules/%c/kernel/drivers/net/wwan/hso.ko debug=0xff"
#SYSFS{idVendor}=="0af0", SYSFS[idProduct}=="d033", PROGRAM="/bin/sh -c 'uname -r'", RUN+="/sbin/insmod /lib/modules/%c/kernel/drivers/net/wwan/hso.ko debug=0xff"
#SYSFS{idVendor}=="05c6", SYSFS[idProduct}=="1000", PROGRAM="/bin/sh -c 'uname -r'", RUN+="/sbin/insmod /lib/modules/%c/kernel/drivers/net/wwan/hso.ko debug=0xff"
LABEL="hso_end"
|
And here the hsoconnect.sh script create by (i lost the topic i will edit it, thank to the man who create it ) :
cyril@atlas-debian:~$ cat /usr/bin/hsoconnect.sh
| Code: | #!/bin/bash
# Shell script to start the HSOConnect Python application from udev
DISPLAY=':0.0'
if ps -ef | grep -v grep | grep "python2.5 -m hsoc" > /dev/null
then
#Program is already running, die quietly
exit 0
else
#Start HSOConnect independantly
( sudo -u cyril /usr/bin/python2.5 -m hsoc 2>&1 > /dev/null &) &
exit 0
fi |
chmod +x this script and don't forgot to replace cyril by OUR USERNAME  |
|
| Back to top |
|
 |
Paul Site Admin
Joined: 08 Oct 2004 Posts: 510 Location: UK and Belgium

|
Posted: Fri Nov 07, 2008 7:41 am Post subject: |
|
|
Bravo!
Many thanks for the tip.
Paul |
|
| Back to top |
|
 |
atlas95
Joined: 08 Jul 2008 Posts: 8

|
Posted: Fri Nov 07, 2008 9:14 am Post subject: |
|
|
Hihi !
I'm too happy ! This will very good morever because the app start when hso is fully loaded ! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
|
|
|
|