PDA

View Full Version : BlueSerial Help.


SeRi@lDiE
08-30-2006, 01:14 PM
Has any body been able to run blueserial.sh?
I download it the tar and pass the files to my documents in the Nokia 770 but when I executed it said device not found...

Any ideas?

Thank You.

SeRi@lDiE
09-01-2006, 02:01 PM
Any body?

Thank You.

zape638
09-02-2006, 02:28 AM
I am setup blueserial.sh to. I have other problem. When I execute .sh it founded my cellur and ask the question to connect it. After confirm connection .sh write post: 33: cu: not found. cu is in the same folder with .sh. Continue thinking....

BanditRider
09-02-2006, 08:39 AM
If you don't tell the Linux shell (sh) where to find a command, it searches through an environment variable called $PATH.
$PATH contains a colon ( : ) separated list of directories and those directories are searched in sequence to look for your command. If it doesn't find it in any of those directories, you'll get the "not found" response.

The default $PATH for user is /usr/bin:/bin

The default $PATH for root is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11

You can see your $PATH with the command echo $PATH

To execute a command that's not in your $PATH, you must enter a fully qualified path to the command or a relative path. Fully qualified paths start with / like this: /home/usr/bin/cu or ~/bin/cu ( ~ expands to the user's home directory).
Relative paths start at the current directory like this ./cu or ./bin/cu ( . expands to the current directory). The pwd command prints your current directory.

Now, it's often desirable to execute commands without having to type in the full path to it. To do this, you can either move the command to a directory in your $PATH like /usr/bin or add the command's directory to your default $PATH.

While it's easier to just move the command to /usr/bin, most Linux users prefer to add directories to their $PATH which I'll explain how to do on the 770.

Typically, a user modifies his environment by editing his ~/.profile which is run during the login process but alas, xterm doesn't use the login process but it will look for a variable called $ENV and run whatever command it points to.

I have my $ENV point to a file called .shrc in my home directory. Files and directories that start with . are hidden. To see hidden files and directories, use the -a or -A option to ls like this ls -lA

Here is my .shrc file:
export VISUAL=/bin/vim
export PATH=$PATH:~/bin
alias ll='ls -l'
alias l='ls -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

cd $HOME

I created a directory in my home directory called bin where I store my local shell scripts and such and I've appended it to my $PATH. I've also defined a few aliases that I use to save a few keystrokes and added a cd $HOME so you'll be in your home directory when you start xterm.

Now we just need to set the $ENV variable to point to ~/.shrc. After a bit of trial and error I found that the easiest place to do this is in the file:
/etc/osso-af-init/af-defines.sh

Search down to where the MyDocs directory is defined and add this line:
export ENV=$HOME/.shrc

That's it. Now any command in your home bin directory are executable without having to type the full path to it.

Sorry if this is too simple as this is basic Linux stuff everybody should know.

I could have just said: zape638, copy cu to /usr/bin

seraph
10-26-2006, 03:46 PM
I have moved cu and blueserial.sh into /usr/bin and it still doesn't work. I still get: root is not in the sudoers file (why should it be?). The incident will be reported.
/usr/bin/blueserial.sh: 33: cu: not found

I also tried running cu directly by doing ./cu or /usr/bin/cu... and it says 'not found'. How is that possible?? I'm running it directly.

Anyone get this to work yet? Any help would be appreciated!

TIA

SeRi@lDiE
12-10-2006, 04:36 AM
I have moved cu and blueserial.sh into /usr/bin and it still doesn't work. I still get: root is not in the sudoers file (why should it be?). The incident will be reported.
/usr/bin/blueserial.sh: 33: cu: not found

I also tried running cu directly by doing ./cu or /usr/bin/cu... and it says 'not found'. How is that possible?? I'm running it directly.

Anyone get this to work yet? Any help would be appreciated!

TIA

Sorry to come back to this old post but I have the same error as the above post....

I am not sure why is it that I am doing wrong... :confused:

BanditRider
12-10-2006, 09:30 AM
I just played with it a bit and I think the cu program may have been compiled wrong or something.
As far as the sudoers bit, if you're running the script as root, remove the sudos from the .sh file.

SeRi@lDiE
12-10-2006, 05:23 PM
I just played with it a bit and I think the cu program may have been compiled wrong or something.
As far as the sudoers bit, if you're running the script as root, remove the sudos from the .sh file.
Yea I figure that much to take the sudoers call out of the script but I think I will agree with you about the cu been compiled wrong because I can run it just fine in my Laptop runing FC6 it just calls on a few tools that are only in maemo... This would be a grate IT/IS assesment tool.

insert_nick
12-15-2006, 11:44 AM
Sorry if this is too simple as this is basic Linux stuff everybody should know.
I could have just said: zape638, copy cu to /usr/bin
Great tutorial instead! This is really useful, thank you from me and all the other non-linux-ready guys here; this is a great example on how to explain stuff.

BanditRider
12-16-2006, 09:18 AM
You're most welcome.

Pantoche
01-28-2007, 09:45 PM
Is blueserial working in 2006 OS??
Im still stuck on the 33:cu not found problem
Please if someone has the solution post it.
Thanks!

stuH
02-22-2007, 04:50 PM
:D hi all, after days and days of reflashing to 05 and trying all manner of scary things i can now get the blueserial to run in x-term! yipee, oh but i get the root is not in sudoers message, also 33:cu:not found.
can anyone tell me how to remove the sudoers from the .sh script please!

ive got this far in a few weeks without ever hearing of linux so i'd be gutted if i cant get to the end of sorting this out, it feels so close !

Any help with the last little bugs really appreciated.

And all ive learned has been from kind forumeers ! cheerz guys !!!

SeRi@lDiE
02-22-2007, 04:53 PM
You have to use vi to edit the file...
so you go to xterm and type vi /the/file/path/blueserial.sh and you will be able to edit the file.

stuH
02-22-2007, 05:13 PM
Cheerz matey !! i'll go an give it a try !

gammer
02-23-2007, 08:09 AM
I'd also like to thank you! Even if some points "are basic Linux stuff everybody should know", others are not as to put ENV into /etc/osso-af-init/af-defines.sh! And lots of users just try to acquire the "basic stuff"... Well done!

SeRi@lDiE
02-28-2007, 12:49 AM
I am glad I was of help.

stuH
03-15-2007, 11:21 AM
I can get the connect to xx:xx:xx:xx:xx; some phone
I put the "y" after the xx:xxx:xx:xx:xx: some phone y hit return and i get
password: wtf is the password to complete connection then keep going with whatever commands you want to use on the attacked phone?

Anyone know the password!?
BTW this only works when not in root only in user mode! in root i get the cu:33 sudoers blah blah!

lucky-luke
03-15-2007, 12:13 PM
Where I can find Blueserial for maemo?

stuH
03-15-2007, 12:19 PM
Trifinite.org Theres A Page About 770 Downloads,

hantakage
03-26-2007, 12:21 PM
I am having the same issue as the previous poster.

Has anyone succeeded in getting blueserial to work.

Specifically does anyone know where to get a working version of cu??

lucky-luke
03-26-2007, 12:27 PM
As I can't have a scratchbox enviorement usable, Please, anybody can compile all the trifinite stuff in order to work in it OS 2006-3?.

Thanks

noki
04-10-2007, 01:01 PM
You have to use vi to edit the file...
so you go to xterm and type vi /the/file/path/blueserial.sh and you will be able to edit the file.
when you say edit what should i actually edit?

noki
04-10-2007, 01:53 PM
Great tutorial instead! This is really useful, thank you from me and all the other non-linux-ready guys here; this is a great example on how to explain stuff.

sorry to be a dope but i still cant figure out how to run blueserial

noki
04-10-2007, 05:20 PM
what edit do i make to blueserial?

lucky-luke
05-24-2007, 07:47 AM
As I can't have a scratchbox enviorement usable, Please, anybody can compile all the trifinite stuff in order to work in it OS 2006-3?.

Thanks

Does anybody did it?
I'm very interested in using cu.

edit:
I think that CU would be interesting to make a more interesting our N770.
Please, can anybody port it to OS2006-3?
Thanks

junioru
07-26-2007, 10:40 AM
so, i think somebody has did it while is on that website on download, now, my problem is that im very new, i put the files on card and i installed the xterm now i dont know where i can find them i've been looking in all over the places. any help at all please for a junior?

junioru
07-27-2007, 05:14 AM
:33 is coming from file blueserial.sh on line 33 is trying to get execute something from /dev folder where you dont have access because you are not a root, now, if you got a root access you you'll get an error with you will be reported whatever, anyway i reflashed the 770 and i lost everything now i need to start again, i hope in a few days will be ready, anyway, if you will look on this forum much better you will see that somebody has did it :) not me. is somebody.

by the way, that password is rootme which is the default one :) but, you can't type it in, will disapear when you will sh blueserial.sh as a root. more info to come i hope now is clear for everybody WHY? all you need to do is to rtfm :) in this case the errors.

SeRi@lDiE
07-27-2007, 09:44 AM
Yes I am not quite sure why you guys are so in to "getting this to work".... This use to work back with BT 1 & 1.1 Not no more....

junioru
07-28-2007, 06:04 PM
well, i think for calling premium rate numbers? most of them, for me now is more a thing like "you can't do it", and at this point i'm getting mad :) anyway, i managed to run this bluetooth.sh and is full of errors on code, now i'm working to make a complete new new one. using hcitool and hciconfig and rfcomm.o, anyway, now i will explain for newbies where those error are comming from.


first at all about that :33 error. 33 is the line of the code in blueserial.sh where he is trying to do something in a folder, for more details open your own i wont loose time explaining it.

second at all that password, is because you are trying to run an application as a root when in fact you are not one, to get that root account you find more info on maemo.org, use the simple way. the password is rootme but it wont work if you just try to type it in, now.


about that error soeuser or what ever you need to open the file and add

root ALL = (ALL) ALL which means all aplication, access, or you can add the folder where did you put the cu file and so on so far (RTFM)

now.

after everything seems to work perfect, you still get an error, some lines depending on your file 8: 11: 13: (from what i remember) i dont know because i modified a little the blueserial.sh to be much easier for me, but. in addition, to see if blueserial.sh can work anyway for you, you can run those "commands" which are in it by hand, like hcitool scan (type it in xterm).

anyway, to run this blueserial.sh you need

hciconfig, rfcomm.o (you can download it - use google), and hcitool.


other toolse need it: xterm and root access and i think gnokii as well.

now, "this incident will be reported" is comming from:
sudo rfcomm bind 0 $TARGET 17 line, even if you are root, anyway i managed to go over but i get those errors with 8: 11: 13: whatever, anyway if you want to connect to your mobile without pairing it with a pin password or whatever you can do it from xterm first you will need to type:
hcitool scan - to scan for mobile phones arround you
rfcomm connect hci0 mac 1 (where mac hci0 is your device bluetooth, mac is mobile mac address and 1 is the channel)
anyway you still need to click yes on mobile phone but i'm working on it.


if i will manage to go on i will let you know, any help or advice are welcome

SeRi@lDiE
07-28-2007, 09:14 PM
junioru if you get this to work agains BT 2.0 you are a genious... but again I doubt 2.0 is exploitable..

junioru
07-29-2007, 10:42 AM
I won't be agenious because probably is no way, but anyway even for bt 1 is ok there are lots of phones on the market yet. anyway, i f***ed my susoers file so if somebody can give me an original one will be nice of him :).


i managed to go over those error like expecting do on line 8: bla bla, but i broked the sudoers file so now i need a new one, because i set up the permisions for Nokia-49 there over /bin /dev bla bla... and i can't find an original file to try again.


by the way for those users who want blueserial.sh on their phone and want to start trying, make backups of your data before because this is in "don't try at home" area.

SeRi@lDiE
07-29-2007, 01:35 PM
How did you brake your sudoers file?
All you had to do is take the sudo call in the blueserial.sh
You run the script as root anywais why would you want sudo in it....
What are you trying to do?

junioru
07-30-2007, 05:23 AM
"root is not in the sudoers file". this is the error if i'm running the script as a rooter. but, from what i've seen cu is working with rfcomm and hciconfig where you are not allowed if you are not a rooter, or hciconfig as well. that's why i tryed to add in sudoers file access to those files for rooter, and for everybody so i don't need to login as rooter anymore to run the script. anyway is not working for me yet, i'm still working on it. and by the way, there's a way to hack in a bluetooth 2 enabled device, everything is on internet, all you need to do is don't sleep :)


NAME=`sudo hciconfig -a hci0 name | grep Name | cut -f 2 -d "'"`
sudo hciconfig -a hci0 name Charger
sudo rfcomm bind 0 $TARGET 17
sleep 2
cu -l /dev/rfcomm0
sudo rfcomm release 0
sudo hciconfig -a hci0 name $NAME

this is what you find in blueserial.sh i add the rfcomm.o in /dev downloaded from internet and is working for me, i managed to set cu +x and bs.sh but i still don't have too many permission, what i tryed to do infact is to give full rights to anybody on my 770 ( i don't have personal details or any goodies). so i tryed to jump over that error with you are not allowed anyway i managed to do it.

what i don't know is where to copy the cu file

any idea?

junioru
07-30-2007, 05:36 AM
now, if i'm edit on blueserial.sh the path where is my cu, full rights et up on it, i get this error
: not foundsh: 8:
:not foundsh: 11:
blueserial.sh:13: Syntax erro: word unexpected (expecting "do")

so. or, i'm doing something wrong, or the shell is not writed properly, or i dont know....

junioru
07-30-2007, 06:28 AM
so anybody? i managed to put back my sudoers file but, root is not in the sudoers file, again... what should i do?

SeRi@lDiE
07-30-2007, 06:43 AM
so anybody? i managed to put back my sudoers file but, root is not in the sudoers file, again... what should i do?

d00d take the sudo part out from blueserial.sh and that will take care of the rest!!!
root does not need to be in the sudoers files.

sirhackalot
08-11-2007, 07:18 PM
hehe ummm im new here and im not very into linux....only used it a couple of times and thats all ive done...ive just bought a nokia 770 OS2006 edition and have tryed to install blue serial onto it...i was wondering if someone could write a tutorials for linux neewbies? thanks v much for all the info u guys have posted so far i just cant make sense of it all.....

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
EDIT
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
one of the biggest problems is moving blueserial.sh and cu to the folder root/usr/bin it says the file cannot be moved to this folder? any ideas why?

regards

macegr
08-11-2007, 09:40 PM
one of the biggest problems is moving blueserial.sh and cu to the folder root/usr/bin it says the file cannot be moved to this folder? any ideas why?

Yes...you aren't root.

But that doesn't matter. The "cu" utility isn't compiled correctly and won't run anyway. Plus, the blueserial script is NOT general purpose, it was designed to connect to a specific Motorola phone. The channel it tries to use is probably not the same one you'll find SPP on most Bluetooth devices.

flyinghigh
08-22-2007, 09:08 AM
wondering if someone could write a tutorials for linux neewbies

serious suggestion, go buy Unix for Dummies ISBN 0-7645-0419-3

it's a good primer, a great place to start ( don't be put off by the title ), check the reviews on Amazon

mickyb99
09-14-2008, 12:04 PM
Hey guys,

Sorry to dig up an old thread like this but I only recently came across this blueserial business. Anyways I had the same problems as ye, the cu command not found crap.
So I obtained the source code for uucp (the package which cu comes from) and I compiled it in the maemo sandbox. I copied the newly compiled cu binary to the 770 and typing "./cu --help" actually prints the help messages unlike the old one where I would only get the "cu: not found" message.

I had to edit the blueserial script so that the line which calls cu had "./cu" instead of just "cu" as otherwise I got the old cu not found message.

Now I've come across a new problem, "Permission denied" when it tries to create files in the /usr/ directory. First it was permission denied when doing a mkdir /usr/spool/ so I created the directory manually, then permission denied when doing mkdir /usr/spool/uucp and now its permission denied creating some file in /usr/spool/uucp , which I can't do manually !

It seems as if the script or cu program doesn't have the root permissions when running, even though I run it as root. If any linux guru out there knows a reason for this please let me know !!!

If anyone wants the cu I compiled let me know and I can email it or upload or whatever.

Cheers



EDIT:
I got past the permissions problem with a simple command,
"chmod -R 777 /usr/spool/"
Now the the cu program runs until I get a connection refused message from rfcomm. I'd like to think that I have the blueserial script working correctly and that the only reason I'm getting connection refused is that the phone I'm connecting to (Nokia N70) isn't one that has the bluetooth flaw that allows the hack to work.

The phones it does work on are:
Nokia 6310i(4.06,4.07,4.80,5.10,5.22,5.50,5.51); Motorola V600, V80; Sony Ericsson T610(20R1A081)

I don't have any of those phones so I guess I'll never be able to test it properly. Ah well ! Looks like I'm over a year late with these developements, acvtivity in this forum has really reduced. :(