spacer
spacer search

PHARscape
Phar enough!

Search
spacer
header
Main Menu
Home
Linux and 3G
Linux and 3G Forum
Python Stuff
Pictures
Astronomy
Links
Contacting Me
Search
Mambo License
About
Syndicate
Lunarpages.com Web Hosting
 
Home arrow Linux and 3G Forum

PHARscape
3G Datacards and Linux
 
  FAQFAQ    SearchSearch  RegisterRegister 
   Log inLog in 

Autorun hsoconnect

 
Post new topic   Reply to topic    PHARscape Forum Index -> HSOconnect
View previous topic :: View next topic  
Author Message
atlas95



Joined: 08 Jul 2008
Posts: 8

france.gif
PostPosted: Thu Jul 10, 2008 4:16 am    Post subject: Autorun hsoconnect Reply with quote

Hello,
I search how to autorun hsoconnect when i plug my icon225 with dbus please.
I have try but this doesn't work Sad
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
atlas95



Joined: 08 Jul 2008
Posts: 8

france.gif
PostPosted: Thu Nov 06, 2008 8:01 pm    Post subject: Reply with quote

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 Wink ) :

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 Smile
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Paul
Site Admin


Joined: 08 Oct 2004
Posts: 510
Location: UK and Belgium

uk.gif
PostPosted: Fri Nov 07, 2008 7:41 am    Post subject: Reply with quote

Bravo! Smile

Many thanks for the tip.

Paul
Back to top
View user's profile Send private message Visit poster's website
atlas95



Joined: 08 Jul 2008
Posts: 8

france.gif
PostPosted: Fri Nov 07, 2008 9:14 am    Post subject: Reply with quote

Hihi !
I'm too happy ! This will very good morever because the app start when hso is fully loaded !
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    PHARscape Forum Index -> HSOconnect All times are GMT
Page 1 of 1

 
Jump to:  
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


phpBB component by Adam van Dongen. Based on phpBB © 2001, 2002 phpBB Group
spacer

 
Copyright 2000 - 2005 Miro International Pty Ltd. All rights reserved.
Mambo is Free Software released under the GNU/GPL License.
spacer