View Full Version : bluetooth and ape deletion
Nicknack
07-08-2008, 02:27 PM
ok , just some more questions:
1. how can you delete a ape particle?
2. i have tried to etasblish a bluetooth conncetion over a running pan server, but the only ip addresses sw_connect accepted without an pushvar error was 127.0.0.1 and the ip of my device itself. has anybody other results (or the same)?
3. swsock only supports ip based connections (expect urls) or is it also capable to connect over that serial port?
Mike Halliday
07-08-2008, 06:54 PM
Nicknack,
How have you connected via bluetooth? I have tried to do this and not been successful.
Any pointers would be helpful!
Nicknack
07-09-2008, 10:36 AM
step by step:
1. use the pan-server service to build up a connection between the devices, it will take some time until you get the connected symbol in the today bar.
2. use a ipconfig tool to find out your "bluetooth-ip", my favorite one is http://pocketpcfreewares.com/en/index.php?soft=1612
3. based on kornelius code in this thread:
http://forums.arianesoft.ca/showthread.php?t=113&highlight=winsock
my test code:
#include "swsock.ppl";
Sw_Init;
s$=Sw_Socket(AF_BTH);
Sw_Connect(s$,AF_BTH,"169.254.242.221",32);
Sw_CloseSocket(s$);
it doesn't makes sense to add more now, because if Sw_Connect doesn't work the rest will also won't work and Sw_Connect doesn't work if i use the ip of the other device.
it only works without error if i use its own "bluetooth-ip" or 127.0.0.1 (which even works without bluetooth enabled).
so i can just make bluetooth connect to one device itself, but only if this device has a pan server connection to another device ...mmhh pretty amazing.
at least this shows that the bluetooth status has somehow effect on the code :D
Ps: good informative links about winsock:
english:http://www.c-worker.ch/dokuwsck/owinsck/winsock.htm
german:http://www.c-worker.ch/tuts/wstut_op.php
Mike Halliday
07-09-2008, 10:42 AM
Is this a daft question, but what is a PAN-Server? - never heard of one!
I wanted to connect a laptop running Bluetooth services to my handheld device! :S
Does the same princple apply then?
Mike Halliday
07-09-2008, 10:47 AM
I have tried the code in Kornalius's post before but could never get it to connect 2 devices together! :(
Nicknack
07-09-2008, 11:37 AM
Pan is a shortcut for personal area network and it's a bluetooth service(application) for connecting serveral devices in one network.
but for us more interesting is the fact , that this pan uses ip addresses like a normal lan network.
since winsock only seem to acceppt ip addresses (e.g. no bluetooth mac addresses over a serial port) the pan could be the only way to go.
@mike: do you have a built in bluetooth manager? i don't know if bluetooth stacks support the pan service...
i have in my bt manager the option to connect to a existing pan or host a new one.
Mike Halliday
07-09-2008, 12:06 PM
Hmmm, it appears that the bluetooth driver (MS) on my windows XP machine does not allow direct connection to a PAN network. It is looking for a device to connect to the network with (Its not using the USB dongle as a network card) - Wonder if I need a PAN server running first?
Nicknack
07-09-2008, 03:08 PM
you need just two bluetooth devices which supports that pan service, there is no physical existent "server".
maybe the term server is a bit displaced in this context, sry if i confuse you.
here i found this instruction on the net:
http://www.velocityreviews.com/forums/t4862-bluetooth-connect-a-laptop-to-internet-via-a-pc.html
Mike Halliday
07-09-2008, 03:42 PM
Thats ok, It was the generic drivers under windows xp. Have found some toshiba stack drivers that are compatible with the BT chipset I am using. Now there are loads more options available - so I am going to have aplay with BlueTooth now!! :)
Nicknack
07-09-2008, 07:46 PM
i found the answer to my question under 1:
you can delete a ape particle with the method:
group_removeparticle(group$, particle$);
:)
Mike Halliday
07-09-2008, 07:48 PM
I haven't used APE yet - but glad you found a solution! :)
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.