http://www.raspberrypi.org/phpBB3/viewt ... 97#p461897 [EDIT: With appropriate changes for Python 3]Basil_R wrote:I used the debugger in the same Idle 3 to test run the 'test-nap' script and it fell over at the same line attempting the import dbus. Probably a daft question but I assume there is no need to include a "path" statement anywhere to tell the script where to find dbus?
Code: Select all
>>> import sys >>> from pprint import pprint as p >>> p(sys.path) ['', '/home/pi', '/usr/bin', '/usr/lib/python3.2', '/usr/lib/python3.2/plat-linux2', '/usr/lib/python3.2/lib-dynload', '/usr/local/lib/python3.2/dist-packages', '/usr/lib/python3/dist-packages'] >>> import dbus Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> import dbus ImportError: No module named dbus >>>
Code: Select all
$ sudo find / -name dbus /run/dbus /var/lib/dbus /usr/share/doc/dbus /usr/share/lintian/overrides/dbus /usr/share/pyshared/dbus /usr/lib/python2.7/dist-packages/dbus /usr/lib/python2.6/dist-packages/dbus /usr/lib/cups/notifier/dbus /usr/include/dbus-1.0/dbus /etc/default/dbus /etc/init.d/dbus
Congratulations Douglas6! Glad to hear that you got it working and typing that via Bluetooth Internet!Douglas6 wrote:After catching a second wind and attacking this again, I think I licked it. In fact I'm typing this on my phone, connected via Bluetooth to a Raspberry Pi access point connected via WiFi to my router and out over the internet.
It's a bit of an awkward process but it works.Gonna see if I can automate some of it and I'll be posting a step-by-step tutorial. It's really not difficult for someone who can follow instructions better than me.
It's not really. Using wlan0 instead of eth0 is a bit different, and also when using Raspian, you'll need to 'sudo apt-get install bridge-utils' yourself.ykasidit wrote:I'm sure that tutorial wasn't too complicated once you have the python-dbus working correctly.
Glad to hear that!Douglas6 wrote:It's not really. Using wlan0 instead of eth0 is a bit different, and also when using Raspian, you'll need to 'sudo apt-get install bridge-utils' yourself.ykasidit wrote:I'm sure that tutorial wasn't too complicated once you have the python-dbus working correctly.
And here's another tip that would have saved me 30 minutes or so. Don't try this by plugging in two different Bluetooth adapters, one of which looks VERY similar to the Wifi dongle you left lying on the desk. This will NOT work
I'm still polishing up a Python daemon that can be used to automate the connections on a headless Pi, and I'll be posting it with some instructions. It's been a great learning experience for network bridging and using d-bus with Bluez
Thanks for the link to your posts - it's a really great idea to use a tablet to ssh to the Pi via Bluetooth. I went to see the python test-nap code there and posted a humble suggestion (which you guys might have already done) in the test-nap script which I want to share in this thread for those who are following http://www.hkepc.com/forum/viewthread.php?tid=1710030 (which is using essentially the same code from the bluez release sameple/test code) in the test-nap python script - simply add a while loop to the line "time.sleep(1000)" or replace it like:maxwed wrote:A couple of months ago I posted a solution for using the PAN profile of bluetooth to be able to use a tablet as screen and input device... here: http://www.raspberrypi.org/phpBB3/viewt ... 36&t=37655
I remember faintly that I too initially had a problem running the nap script, and I had to install the following (in addition to "bluez"), which fixed it:
sudo apt-get install python-gobject
But I think this has nothing to do with dbus.
Code: Select all
while (1): time.sleep(30)
Hello Chris,chrisryall wrote: Questions please: Can it practically FTP between PC and Pi; and is an internet 'share' (=heaven) possible?
Better to know before I invest in 2 USB dongles! TIA Chris