Problem with l2test
Hi all
I have problem. This is my part of the simple program. =20
#include <netinet/in.h>
#include <arpa/inet.h>
#include <resolv.h>
#include <netdb.h>
#include <sys/socket.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/l2cap.h>
//Domyslnebdaddr_t bdaddr;
int main()
{
struct sockaddr_l2 addr;
char buf[2048];
char str[18];
char *adres=3D"00:10:60:A5:F4:4C";
int s,i;
uint8_t id;
if (( s=3Dsocket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)) < 0)
{
=09perror("Can't create socket !!!");
=09exit(1);
}
}Exactly at this moment error appears.
Even when I try start the program "l2test" I see communique l2test[4045]: Can't create socket. No such file or directory(2) So I'm asking you, could you tell me where did I make mistake?
regards
Zbyszek
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerHi Zbyszek,
Quoted 28 lines
I have problem. This is my part of the simple program.
#include <
netinet/in.h>
#include <arpa/inet.h>
#include <resolv.h>
#include <netdb.h>
#include <sys/socket.h>#include <
bluetooth/bluetooth.h>
#include <bluetooth/l2cap.h>
//Domyslnebdaddr_tbdaddr;
intmain(){ struct sockaddr_l2 addr; char buf[2048]; char str[18]; char *adres="00:10:60:A5:F4:4C"; int s,i; uint8_t id; if (( s=socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)) < 0) { perror("Can't create socket !!!"); exit(1); } }
Quoted 4 lines
Exactly at this moment error appears.
Even when I try start the program "l2test" I see communique l2test[4045]: Can't create socket. No such file or directory(2) So I'm asking you, could you tell me where did I make mistake?
load the L2CAP kernel module.
Regards
Marcel
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users