Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

error reading datafile #18

Closed
NadSo opened this issue Oct 9, 2017 · 28 comments
Closed

error reading datafile #18

NadSo opened this issue Oct 9, 2017 · 28 comments

Comments

@NadSo
Copy link

NadSo commented Oct 9, 2017

Hello,
I wanted to read a data file but I got the following error:
datafile_error

the file.txt is saved under the same directory where the bleah is

@evilsocket
Copy link
Owner

is file.txt in the folder where you're running the tool from?

@NadSo
Copy link
Author

NadSo commented Oct 9, 2017

file.txt is saved under: Desktop->bleah-master->bleah

@evilsocket
Copy link
Owner

you're running the tool from your home folder, give it the correct path of the file, how do you even expect it to work if you don't do that?! -.-

@NadSo
Copy link
Author

NadSo commented Oct 9, 2017

but that is what I did

@evilsocket
Copy link
Owner

no, your CWD is your home, so -r file.txt means -r /home/kamdem/file.txt which obviously does not exist .. learn to use a terminal please.

@NadSo
Copy link
Author

NadSo commented Oct 9, 2017

Is it supposed to do that?

datafile

@NadSo
Copy link
Author

NadSo commented Oct 9, 2017

I thought it would Read data to be written from the file.txt. Instead of it It just scan for BLE devices

@evilsocket
Copy link
Owner

There's a help menu and several examples in the README, you clearly didn't bother reading and understanding that documentation.

@NadSo
Copy link
Author

NadSo commented Oct 9, 2017

no it is not true. In the README the description says "Read data to be written from this file" . There is not any example about the datafile.

@buffermet
Copy link

it can be any data

@NadSo
Copy link
Author

NadSo commented Oct 9, 2017

thanks yungtravla for your reply. But I thought the data in my file.txt should be read

@buffermet
Copy link

? The grammar in the --help and README.md are correct, maybe you are misinterpreting?

Bleah reads the data - that will be written - from your text file

@buffermet
Copy link

so it reads whatever contents from your file.txt and writes it to the UUID that you specify from a ble device

@NadSo
Copy link
Author

NadSo commented Oct 9, 2017

so for example if my file.txt contents the data: 1,2,3,4. the tool will write this data to the UUID ?

@buffermet
Copy link

Have you tried --data? Then you will understand --datafile/-r

@NadSo
Copy link
Author

NadSo commented Oct 9, 2017

yes I did. --data is used to write some data to the characteristic

@buffermet
Copy link

and yes.

@buffermet
Copy link

bingo, and --datafile does the same, but reads the data from a file

@NadSo
Copy link
Author

NadSo commented Oct 9, 2017

In the same way --datafile/r is used the write data to characteristic from the file.txt, right?

@buffermet
Copy link

that is exactly what I said and what is written in the docs.

@buffermet
Copy link

wait. what...? Did you really just say it is used to write data to characteristics from the file.txt? Grammar plz

@buffermet
Copy link

please explain to me what characteristics from a txt file are

@NadSo
Copy link
Author

NadSo commented Oct 9, 2017

Thank you so much. So by using --datafile I have to specify which characteristic I want to write data to. That is what was missing

@NadSo
Copy link
Author

NadSo commented Oct 9, 2017

I meant write data from the file to characteristics

@buffermet
Copy link

try bleah -t10 -fe

@buffermet
Copy link

wait 20 seconds, and bleah will enumerate all the characteristics

@buffermet
Copy link

000fe00-000f-00f0-00f0-0000f00f0f0f00f these address types are UUIDs, you can write data to a UUID if it has the WRITE property listed next to it

Repository owner locked and limited conversation to collaborators Oct 9, 2017
@evilsocket
Copy link
Owner

Fixed by properly handling the exception:

lulz

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants