hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: programming token ring

Fri Dec 19, 2008 7:11 pm

error 1:
m_network = m_manager.Networks(0)\ might work

error 2:
orig c#:
connectedStream.BeginRead(buffer, 0, buffer.Length, new AsyncCallback(readCallback), connectedStream);
trans vb:
connectedStream.BeginRead(buffer, 0, buffer.Length, New AsyncCallback(readCallback), connectedStream)

Error: Der Delegat "System.AsyncCallback"erfordert als einziges Argument für seinen Konstruktor einen AddressOf-Ausdruck oder einen Lambda-Ausdruck.

'readCallback' calls: 'Private Sub readCallback(ByVal result As IAsyncResult)', so maybe it needs an argument as 'result' like:
connectedStream.BeginRead(buffer, 0, buffer.Length, New AsyncCallback(readCallback(..!here is result!....)), connectedStream)

but what - a dummy as IAsyncResult?

error 3:
byteWrite(inx) = CType(AscW(charWrite(inx)), Byte)\ might work

thank you so much

hajoko

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: programming token ring

Sat Dec 20, 2008 2:13 am

no more error 2 now with:

" selectedStream.BeginWrite(byteWrite, 0, byteWrite.Length, Me.Invoke(New writeCallbackDelegate(AddressOf readCallback), New Object()), selectedStream)"

-- but don't know, if it works, because my second PPC (Ipaq 4350) is wrong with "Failed to load stack driver(BlueToolsWC.dll)" - have to solve that first.

regards

hajoko

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: programming token ring

Mon Dec 22, 2008 3:43 pm

hi again -
now, both PCC find widcomstack,
I pair the PCC over bt
I start simpleservise on both PCC
I click 'advertise'
nothing happens - no entrance in 'sessionlist'
what did I wrong or where can I find more information for SimpleService?

regards

hajoko

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: programming token ring

Mon Dec 22, 2008 4:03 pm

SimpleService simply creates a service that you can connect to.


Regards,
Jonas

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: programming token ring

Mon Dec 22, 2008 4:21 pm

yeaaah!!!!

its great:-))))


regards

hajoko

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: programming token ring

Mon Dec 29, 2008 8:59 pm

hi there,

I found, that PDA only accept 2 or 3 services max. and after then, they ar not even found as device - maybe a problem of processor capacity or timing?

Is there a border (number of active services) for dongles too? I pushed them up to 4 devices, but need some more in future.

regards

hajoko

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: programming token ring

Mon Dec 29, 2008 9:05 pm

The bluetooth specification states 7 simultaneous connections. This is usually not true, as you say 4 connections is usually a top limit for the Microsoft stack, as low as two is common for the Widcomm stack.

Regards,
Jonas

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: programming token ring

Mon Dec 29, 2008 10:47 pm

hi jonas,

is'nt there a difference between connectiones and services?

regards

hajoko

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: programming token ring

Mon Dec 29, 2008 11:37 pm

Yes, but there is likely a limit on how many services you can create as well (as you have noticed).

Regards,
Jonas

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: programming token ring

Tue Dec 30, 2008 2:59 pm

Is there a limit for sessiones too?

regards

hajoko

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: programming token ring

Tue Dec 30, 2008 7:19 pm

Sessions and connections is basically the same thing.

Regards,
Jonas

Return to “BlueTools”