I use lightblue to receive files by bluetooth,but I can't get the file name and extension.And I use "hcidump -X -V" to monitor the data stream,I find the filename and extension are included in the first package,but I don't know how to get it out? I think it's convenient if we can get the filename by this method.
the example in lightblue:
# receive a file and save it as MyFile.txt
>>> s = lightblue.socket()
>>> s.bind(("", 0))
>>> lightblue.advertise("My OBEX Service", s, lightblue.OBEX)
>>> lightblue.obex.recvfile(s, "MyFile.txt") # or pass file object instead
>>> s.close()
maybe it's not a .txt file :)
with hcidump -X -V
we can see name\ length \type \time \body items of a file.
how to get it in bluelight?
Maybe it's a convenient and useful function for the better use of lightblue! :D
thank you for your great work!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hello:
I use lightblue to receive files by bluetooth,but I can't get the file name and extension.And I use "hcidump -X -V" to monitor the data stream,I find the filename and extension are included in the first package,but I don't know how to get it out? I think it's convenient if we can get the filename by this method.
the example in lightblue:
# receive a file and save it as MyFile.txt
>>> s = lightblue.socket()
>>> s.bind(("", 0))
>>> lightblue.advertise("My OBEX Service", s, lightblue.OBEX)
>>> lightblue.obex.recvfile(s, "MyFile.txt") # or pass file object instead
>>> s.close()
maybe it's not a .txt file :)
with hcidump -X -V
we can see name\ length \type \time \body items of a file.
how to get it in bluelight?
Maybe it's a convenient and useful function for the better use of lightblue! :D
thank you for your great work!
Hi,
I've posted a solution in this thread:
https://sourceforge.net/forum/message.php?msg_id=4814640
It's definitely something I want to add in a later release.
Great!
Now I distinguish with first line contents in the received data,of course it's not reliable.
Get the file name automatically will be great help!
Thank you for you reply!