hybridgroup / gort

Command Line Interface (CLI) for RobotOps

Home Page:http://gort.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

panic on bluetooth pair or connect

Kroid opened this issue · comments

$ ./gort scan bluetooth
Scanning ...
    74:E5:43:9C:66:84   MindWave Mobile
$ ./gort bluetooth pair 74:E5:43:9C:66:84
panic: runtime error: index out of range

goroutine 16 [running]:
runtime.panic(0x828e640, 0x841f5fc)
    /home/adrian/go/go_1.3.1/src/pkg/runtime/panic.c:279 +0xe9
github.com/hybridgroup/gort/commands.func·004(0x18604360)
    /home/adrian/development/gopath/src/github.com/hybridgroup/gort/commands/bluetooth.go:48 +0xaa7
github.com/codegangsta/cli.Command.Run(0x82bb318, 0x9, 0x0, 0x0, 0x82fcb48, 0x2c, 0x0, 0x0, 0x0, 0x0, ...)
    /home/adrian/development/gopath/src/github.com/codegangsta/cli/command.go:101 +0xac2
github.com/codegangsta/cli.(*App).Run(0x18628930, 0x1860e000, 0x4, 0x4, 0x0, 0x0)
    /home/adrian/development/gopath/src/github.com/codegangsta/cli/app.go:125 +0x7cc
main.main()
    /home/adrian/development/gopath/src/github.com/hybridgroup/gort/gort.go:23 +0x1fb

goroutine 17 [runnable]:
runtime.MHeap_Scavenger()
    /home/adrian/go/go_1.3.1/src/pkg/runtime/mheap.c:507
runtime.goexit()
    /home/adrian/go/go_1.3.1/src/pkg/runtime/proc.c:1445

goroutine 18 [runnable]:
bgsweep()
    /home/adrian/go/go_1.3.1/src/pkg/runtime/mgc0.c:1976
runtime.goexit()
    /home/adrian/go/go_1.3.1/src/pkg/runtime/proc.c:1445

goroutine 19 [runnable]:
runfinq()
    /home/adrian/go/go_1.3.1/src/pkg/runtime/mgc0.c:2606
runtime.goexit()
    /home/adrian/go/go_1.3.1/src/pkg/runtime/proc.c:1445

Fedora 20

Hi @Kroid I think I've corrected your issue in the master branch. Can you please retry after building from source?

$ gort bluetooth pair 74:E5:43:9C:66:84
2014/11/20 09:35:33 exec: "bluez-simple-agent": executable file not found in $PATH

I download script http://git.kernel.org/cgit/bluetooth/bluez.git/plain/test/simple-agent, try:

$ python simple-agent.py 
Traceback (most recent call last):
  File "simple-agent.py", line 14, in <module>
    import bluezutils
ImportError: No module named bluezutils

Trying install bluezutils:

$ sudo easy_install bluezutils
Searching for bluezutils
Reading https://pypi.python.org/simple/bluezutils/
Couldn't find index page for 'bluezutils' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for bluezutils
error: Could not find suitable distribution for Requirement.parse('bluezutils')

Hi, @Kroid

Which OS are you running again? You probably want to do a sudo apt-get build-dep bluez-tools to install BlueZ, not the python script you pasted above.

Hi, @deadprogram

I'm use reinstalled Fedora 20. Install bluez and all bluez-* by sudo yum install

Appears like the yum install script for bluez did not add the bluez commands to your PATH. Can you add the PATH yourself, and see if you can run bluez-simple-agent -h?

Hi, @Kroid are you still having trouble with this? If so please reopen this issue. Thanks!

still having the same issue on raspberry pi ? anyone can help ?

you can download this script where you are running.
simple-agent is needs this script
wget https://raw.githubusercontent.com/pauloborges/bluez/master/test/bluezutils.py