I don't know much about bluetooth, but I think I can help with your C problems.
the data types uint8, uint16 and uint32 are unsigned integers, the numbers are the amount of bits in that type.
uint8_t --> byte [unsigned char]
uint16_t --> word [unsigned short]
uint32_t --> long [unsigned long]
these types are defined in <stdint.h>
the error you are getting is because you cannot do an implicit conversion from a void pointer to any other pointer type in C++ without a cast, take for example:
note: malloc is a void*
Code:
#include <stdio.h>
#include <stdint.h>
#include <malloc.h>
int main(void)
{
uint8_t *a;
a=malloc(5);
return 0;
}
it will compile just fine under gcc, but with g++ you will receive an error:
Code:
test.c: In function 'int main()':
test.c:9: error: invalid conversion from 'void*' to 'uint8_t*'
you need a cast in c++, so just place '(uint8_t *)' in front of malloc and everything will work. it may be harder to fix in someone elses code though.
if you keep having problems, to get the output of hcidump in your C++ program you can read the input from the command with popen:
http://www.gnu.org/software/libc/man...ubprocess.html
the hcidump man page also says:
Quote:
-w <file>, --save-dump=<file>
Parse output is not printed to screen, instead data read from device is saved in file file. The saved dump
file can be subsequently parsed with option -r.
|
so you could try to execute hcidump with argument '-w /tmp/hcidump', then read from the temp file.