|
Cellular forums Home > Archive > Bluetooth discussion > December 2007 > Bluetooth AT Commands (HCI Commands) How to Send ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Bluetooth AT Commands (HCI Commands) How to Send ?
|
|
| http://members.lycos.co.uk/dariusjack/ 2007-10-28, 10:33 am |
| Hi,
I have bluetooth usb dongle connected to my PC running XP Windows.
How to send AT Commands to bluetooth usb dongle to set in discovery
mode
and read mac addresses of other bluetooth device nearby.
There is a good example from Linux minicom unfortunately it crashed
under Windows Hyperminal
wheneever I start it and try to type in anything from keyboard.
At the same time Widcomm and Bluesoleil bluetooth drivers/application
provided with bluetooth usb dongle work fine
and can discover nearby bluetooth devices and perform discovery
search.
Thanks.
Darius
I don't have any experience so far with connecting to GPS units
and issuing NMEA sentences. But I do have experience with
connecting to Bluetooth-enabled mobile phones.
Below is the log of a session with the Parani SD100, using
minicom (the Linux version of Hyperterminal). I have added
some comments. They are the lines beginning with "*".
I assume that a connection to a GPS unit would be very similiar,
except that NMEA sentences would be issued instead of
cellular-specific "AT" commands.
* start
ATZ
OK
* issue the command to scan for visible devices
AT+BTINQ?
0001E36B52C0,John S55,720204
0016209D8A7C,John V600i,520204
OK
* 2 mobile phones found on this scan - connect to the Siemens
* S55
ATD0001E36B52C0
OK
CONNECT 0001E36B52C0
* from here, we're talking to the S55
*
* issue the phone some commands to tell us the cell ID and
* Location Area Code whenever the phone changes serving cell,
* and also the name (in PDU-mode encoding) of that cell
AT+CREG=2
OK
AT+CNMI=1,0,2,0,1;+C
SCB=0,50,"0-15"
OK
+CBM: 88
1B20003201114679785E
96371A8D46A3D168341A
8D46A3D168341A8D46A3
D168341A8D46A3D16834
1A8D46A3D168341A8D46
A3D168341A8D46A3D168
341A8D46A3D168341A8D
46A3D168341A8D46A3D1
68341A8D46A3D100
* what phone network are we connected to?
AT+COPS?
+COPS: 2,0,"Telstra"
OK
AT+CREG?
+CREG: 2,1,"1030","639E"
OK
+CREG: 1,"1030","1401"
+CBM: 88
07B000320111C8F4F99C
76CF418D46A3D168341A
8D46A3D168341A8D46A3
D168341A8D46A3D16834
1A8D46A3D168341A8D46
A3D168341A8D46A3D168
341A8D46A3D168341A8D
46A3D168341A8D46A3D1
68341A8D46A3D100
+CREG: 1,"1030","639E"
+CBM: 88
1B20003201114679785E
96371A8D46A3D168341A
8D46A3D168341A8D46A3
D168341A8D46A3D16834
1A8D46A3D168341A8D46
A3D168341A8D46A3D168
341A8D46A3D168341A8D
46A3D168341A8D46A3D1
68341A8D46A3D100
AT+CSQ
+CSQ: 18,99
OK
+CREG: 1,"1030","1401"
+CBM: 88
07B000320111C8F4F99C
76CF418D46A3D168341A
8D46A3D168341A8D46A3
D168341A8D46A3D16834
1A8D46A3D168341A8D46
A3D168341A8D46A3D168
341A8D46A3D168341A8D
46A3D168341A8D46A3D1
68341A8D46A3D100
OK
* give the escape sequence to the Parani to drop back into
* command mode
+++
* now disconnect from the phone
ATH
OK
DISCONNECT
* end
Please note that the Parani and the S55 were previously paired.
John
| |
| Flemming L. Baerentsen 2007-11-23, 10:33 am |
| Hi Darius,
This question is not 100% aimed at your topic, but I think you can help me.
What is the average time for establishing connection between two Bluetooth
units.
Timing start: The two units is in physical reading range.
Timing stop: Unit one read unit two ID.
I look forward to hear from you.
Regards
Flemming
"http://members.lycos.co.uk/dariusjack/" < dariusjack2006@yahoo
.ie> skrev i
en meddelelse news:1193575982.602234.219190@z9g2000hsf.googlegroups.com...
> Hi,
>
> I have bluetooth usb dongle connected to my PC running XP Windows.
> How to send AT Commands to bluetooth usb dongle to set in discovery
> mode
> and read mac addresses of other bluetooth device nearby.
>
> There is a good example from Linux minicom unfortunately it crashed
> under Windows Hyperminal
> wheneever I start it and try to type in anything from keyboard.
>
> At the same time Widcomm and Bluesoleil bluetooth drivers/application
> provided with bluetooth usb dongle work fine
> and can discover nearby bluetooth devices and perform discovery
> search.
>
>
> Thanks.
> Darius
>
> I don't have any experience so far with connecting to GPS units
> and issuing NMEA sentences. But I do have experience with
> connecting to Bluetooth-enabled mobile phones.
>
> Below is the log of a session with the Parani SD100, using
> minicom (the Linux version of Hyperterminal). I have added
> some comments. They are the lines beginning with "*".
>
> I assume that a connection to a GPS unit would be very similiar,
> except that NMEA sentences would be issued instead of
> cellular-specific "AT" commands.
>
> * start
>
> ATZ
>
> OK
>
> * issue the command to scan for visible devices
>
> AT+BTINQ?
>
> 0001E36B52C0,John S55,720204
>
> 0016209D8A7C,John V600i,520204
>
> OK
>
> * 2 mobile phones found on this scan - connect to the Siemens
> * S55
>
> ATD0001E36B52C0
>
> OK
>
> CONNECT 0001E36B52C0
>
> * from here, we're talking to the S55
> *
> * issue the phone some commands to tell us the cell ID and
> * Location Area Code whenever the phone changes serving cell,
> * and also the name (in PDU-mode encoding) of that cell
>
> AT+CREG=2
> OK
> AT+CNMI=1,0,2,0,1;+C
SCB=0,50,"0-15"
> OK
>
> +CBM: 88
> 1B20003201114679785E
96371A8D46A3D168341A
8D46A3D168341A8D46A3
D168341A8D46A3D16834
> 1A8D46A3D168341A8D46
A3D168341A8D46A3D168
341A8D46A3D168341A8D
46A3D168341A8D46A3D1
> 68341A8D46A3D100
>
> * what phone network are we connected to?
>
> AT+COPS?
> +COPS: 2,0,"Telstra"
>
> OK
> AT+CREG?
> +CREG: 2,1,"1030","639E"
>
> OK
>
> +CREG: 1,"1030","1401"
>
> +CBM: 88
> 07B000320111C8F4F99C
76CF418D46A3D168341A
8D46A3D168341A8D46A3
D168341A8D46A3D16834
> 1A8D46A3D168341A8D46
A3D168341A8D46A3D168
341A8D46A3D168341A8D
46A3D168341A8D46A3D1
> 68341A8D46A3D100
>
> +CREG: 1,"1030","639E"
>
> +CBM: 88
> 1B20003201114679785E
96371A8D46A3D168341A
8D46A3D168341A8D46A3
D168341A8D46A3D16834
> 1A8D46A3D168341A8D46
A3D168341A8D46A3D168
341A8D46A3D168341A8D
46A3D168341A8D46A3D1
> 68341A8D46A3D100
> AT+CSQ
> +CSQ: 18,99
>
> OK
>
> +CREG: 1,"1030","1401"
>
> +CBM: 88
> 07B000320111C8F4F99C
76CF418D46A3D168341A
8D46A3D168341A8D46A3
D168341A8D46A3D16834
> 1A8D46A3D168341A8D46
A3D168341A8D46A3D168
341A8D46A3D168341A8D
46A3D168341A8D46A3D1
> 68341A8D46A3D100
>
> OK
>
> * give the escape sequence to the Parani to drop back into
> * command mode
>
> +++
>
> * now disconnect from the phone
>
> ATH
>
> OK
>
> DISCONNECT
>
> * end
>
> Please note that the Parani and the S55 were previously paired.
>
> John
>
| |
|
| "Flemming L. Baerentsen" < f_l_bremovethistext@
hotmail.com> wrote in
news:4746e787$0$2102
$edfadb0f@dtext02.news.tele.dk:
> Hi Darius,
>
> This question is not 100% aimed at your topic, but I think you can
> help me.
>
> What is the average time for establishing connection between two
> Bluetooth units.
> Timing start: The two units is in physical reading range.
> Timing stop: Unit one read unit two ID.
>
> I look forward to hear from you.
>
> Regards
> Flemming
>
>
I'm using a MotoROKR Z6m with BT DUN connection to a Nokia N800 Linux
internet tablet. From a cold start bootup until the phone beeps to
confirm the data connection is approximately 2 seconds. There are two
splash screens on the device. The first is a NOKIA on white background
with a little linear bootup guage across the bottom. When that guage
completes, Linux is loaded and a second splash screen comes up as Linux
loads its GUI and drivers off the internal non-volatile memory. The beep
happens when the second splash screen appears. By the time the GUI is
loaded 2 seconds later, opening applets are already connected to their
servers for new weather, updates, etc.
It's really fast!....lots faster than the wifi connection connects.
Connecting the tablet's File Manager to the ROKR's 2GB microSD memory
card over Bluetooth FTP is faster than waking up a USB hard drive to get
something, also about 2 seconds, too. Too bad the ROKR is incapable of
more than one BT connection at a time. It only uses one profile at a
time, disconnecting the internet DUN while the FTP is connected. If my
MotoROKR S9 stereo BT headset is connected, it won't connect to the
tablet at all on any function. You'd think Motorola, one of the largest
communications companies on the planet, could figure out how to make two
or 3 simultaneous BT connections, wouldn't you? Disappointing, very.
Larry
--
Xterm IS the ultimate video game...(c;
| |
| Flemming L. Baerentsen 2007-11-27, 4:33 am |
|
"Larry" <noone@home.com> skrev i en meddelelse
news:Xns99F1ED4BF7EC
8noonehomecom@208.49.80.253...
> "Flemming L. Baerentsen" < f_l_bremovethistext@
hotmail.com> wrote in
> news:4746e787$0$2102
$edfadb0f@dtext02.news.tele.dk:
>
>
> I'm using a MotoROKR Z6m with BT DUN connection to a Nokia N800 Linux
> internet tablet. From a cold start bootup until the phone beeps to
> confirm the data connection is approximately 2 seconds. There are two
> splash screens on the device. The first is a NOKIA on white background
> with a little linear bootup guage across the bottom. When that guage
> completes, Linux is loaded and a second splash screen comes up as Linux
> loads its GUI and drivers off the internal non-volatile memory. The beep
> happens when the second splash screen appears. By the time the GUI is
> loaded 2 seconds later, opening applets are already connected to their
> servers for new weather, updates, etc.
>
> It's really fast!....lots faster than the wifi connection connects.
>
> Connecting the tablet's File Manager to the ROKR's 2GB microSD memory
> card over Bluetooth FTP is faster than waking up a USB hard drive to get
> something, also about 2 seconds, too. Too bad the ROKR is incapable of
> more than one BT connection at a time. It only uses one profile at a
> time, disconnecting the internet DUN while the FTP is connected. If my
> MotoROKR S9 stereo BT headset is connected, it won't connect to the
> tablet at all on any function. You'd think Motorola, one of the largest
> communications companies on the planet, could figure out how to make two
> or 3 simultaneous BT connections, wouldn't you? Disappointing, very.
>
> Larry
> --
> Xterm IS the ultimate video game...(c;
Thanks for your answer Larry,
I now realize that my writtenquestion was missing an important detail, so I
will try to include this detail
What is the average time for establishing connection between two
Bluetooth units.
Initial condition: The two units have never meet before.
Timing start: The two units is in physical reading range.
Timing stop: Unit one read unit two ID.
I look forward to hear from you all.
Best regards
Flemming
| |
| John Henderson 2007-11-27, 7:33 am |
| Flemming L. Baerentsen wrote:
> Thanks for your answer Larry,
>
> I now realize that my writtenquestion was missing an important
> detail, so I will try to include this detail
>
> What is the average time for establishing connection between
> two Bluetooth units.
> Initial condition: The two units have never meet before.
> Timing start: The two units is in physical reading range.
> Timing stop: Unit one read unit two ID.
If I've understood you correctly, I guess the average time to be
several seconds.
I sometimes run a Parani SD100 in inquiry scan mode (looking for
discoverable devices). If I then make a nearby mobile phone
Bluetooth discoverable, it takes typically 3 to 5 seconds for
the Parani to identify it to me (12-digit Bluetooth ID,
user-friendly name, and 6-digit device class code).
This figure is an estimate taken from limited crude
experimentation.
If the distance is considerably greater, the Parani can take
much longer (maybe 10 seconds or more) to report the Bluetooth
ID and device class code, while sometimes reporting the
user-friendly name as "**UNKNOWN**".
John
| |
| Flemming L. Baerentsen 2007-11-27, 10:33 am |
|
"John Henderson" < jhenRemoveThis@talk2
1.com> skrev i en meddelelse
news:5r2k2bF128u82U1
@mid.individual.net...
> Flemming L. Baerentsen wrote:
>
>
> If I've understood you correctly, I guess the average time to be
> several seconds.
>
> I sometimes run a Parani SD100 in inquiry scan mode (looking for
> discoverable devices). If I then make a nearby mobile phone
> Bluetooth discoverable, it takes typically 3 to 5 seconds for
> the Parani to identify it to me (12-digit Bluetooth ID,
> user-friendly name, and 6-digit device class code).
>
> This figure is an estimate taken from limited crude
> experimentation.
>
> If the distance is considerably greater, the Parani can take
> much longer (maybe 10 seconds or more) to report the Bluetooth
> ID and device class code, while sometimes reporting the
> user-friendly name as "**UNKNOWN**".
>
> John
Hi John,
Thank you for your answer, which was the answer I was looking for.
Some years ago I did a test with a bluetooth development board (bluetooth
version 1.1) and discovered the time to be similar to your test. Of which
version is your bluetooth devices?
Regards
Flemming
| |
| Larry 2007-11-27, 12:33 pm |
| "Flemming L. Baerentsen" < f_l_bremovethistext@
hotmail.com> wrote in
news:474bd195$0$2095
$edfadb0f@dtext02.news.tele.dk:
> What is the average time for establishing connection between two
> Bluetooth units.
About 2-3 seconds.
> Initial condition: The two units have never meet before.
> Timing start: The two units is in physical reading range.
> Timing stop: Unit one read unit two ID.
Bluetooth devices will NOT connect at all until you force them to. Only
a few of them will stay in "discovery" mode more than a couple of minutes
for security. You cannot pair with that guy's phone at the next table
because of it. Your phone cannot find his. Even if it could find his he
has to press a button to complete the pairing and accept the connection,
manually. Only bluetooth sources, like my Nokia BT GPS receiver,
transmit who they are.
To pair them, you must put one of them in "discovery" mode. This causes
the device to transmit a "here I am...come and mate with me" signal, sort
of like that horny blonde in a bar. Then, you put the other unit in
search mode looking for that horny blonde's discovery signal. Once the
other unit finds it, you pair with it. That causes the first unit to
warn its operator that you want to pair with it....like the blonde's
brother, the one with the baseball bat, does. Then you must "accept" the
pairing on the discovery mode unit.....no mating the blonde until you
have permission to do so.
They'll then both units say pairing successful...like mating the blonde
and hearing from her attorney about the pregnancy....(c;
If they run and can see each other on Bluetooth, they'll pair
automatically in the future...running down both batteries in the process
unless you turn BLUETOOTH OFF on one of them to stop it. My Nokia N800
internet tablet, left idling with the display off, constantly pairs with
my MotoROKR Z6M eating the battery checking the weather, software
upgrades, and other stuff going on behind my back....just like a blonde
in a bar after you pair with her!
Coincidence?....??
Larry
--
Isn't it ironic that the same ISPs that are telling you
you're downloads threaten their networks......
.....are testing 100Gbps TV to sell on the SAME systems?
http://tinyurl.com/27qx3v
| |
| John Henderson 2007-11-27, 3:33 pm |
| Flemming L. Baerentsen wrote:
> Thank you for your answer, which was the answer I was looking
> for.
>
> Some years ago I did a test with a bluetooth development board
> (bluetooth version 1.1) and discovered the time to be similar
> to your test. Of which version is your bluetooth devices?
The Parani SD100 I use is a class 1 device, Bluetooth version
1.2 (class code 001F00).
The phones I tested are are a Siemens S55 (class code 720204)
and a Sony-Ericsson V600i (class code 520204). These are class
2, with the version not specified in the user manuals.
John
| |
| Flemming L. Baerentsen 2007-11-30, 4:33 am |
| Hi Larry,
Thanks for your comments on bluetooth. LOL
> To pair them, you must put one of them in "discovery" mode. This causes
> the device to transmit a "here I am...come and mate with me" signal, sort
> of like that horny blonde in a bar. Then, you put the other unit in
> search mode looking for that horny blonde's discovery signal. Once the
> other unit finds it, you pair with it. That causes the first unit to
> warn its operator that you want to pair with it....like the blonde's
> brother, the one with the baseball bat, does. Then you must "accept" the
> pairing on the discovery mode unit.....no mating the blonde until you
> have permission to do so.
My maybe-tobe-application is access control. The "time to read ID"
comparisation is RFID, which only takes ~100ms. So 2-3 seconds is a loooong
time to pickup the horny bluetooth blonde ;-).
So what I have is a basestation which can be in "search" mode all the time
as it is connected to a powerplug and thus has no concern regarding
battery-drain. So when a user wants to connect at first time, he just put
his phone in "discovery" mode and the ID is stored in the basestation. What
I read here is that this process takes 2-10 seconds. Hmmm long time but
acceptable as it is only a few times.
What I read here is that even though the two bluetooth units know each other
in advance the connection time is 2-3 seconds. It puzzles me that this can
not be done faster. My hope was that bluetooth blond version 2 was so needy
that she would be faster to connect.
Anyone know if it is possible to dig in to the bluetooth protocol layers and
minimize the connection time?
Regards
Flemming
| |
| http://members.lycos.co.uk/dariusjack/ 2007-12-05, 10:33 pm |
| On Nov 30, 10:07 am, "Flemming L. Baerentsen"
<f_l_bremovethist...@hotmail.com> wrote:
> Hi Larry,
>
> Thanks for your comments on bluetooth. LOL
>
>
> My maybe-tobe-application is access control. The "time to read ID"
> comparisation is RFID, which only takes ~100ms. So 2-3 seconds is a loooong
> time to pickup the horny bluetooth blonde ;-).
>
> So what I have is a basestation which can be in "search" mode all the time
> as it is connected to a powerplug and thus has no concern regarding
> battery-drain. So when a user wants to connect at first time, he just put
> his phone in "discovery" mode and the ID is stored in the basestation. What
> I read here is that this process takes 2-10 seconds. Hmmm long time but
> acceptable as it is only a few times.
>
> What I read here is that even though the two bluetooth units know each other
> in advance the connection time is 2-3 seconds. It puzzles me that this can
> not be done faster. My hope was that bluetooth blond version 2 was so needy
> that she would be faster to connect.
>
> Anyone know if it is possible to dig in to the bluetooth protocol layers and
> minimize the connection time?
>
> Regards
> Flemming
Hi Flemming,
it can be done faster for one specific channel.
But there is a number of channels to be scanned and your basestation
has to feed some packets from serial transmission on each channel to
extract ID data.
Wifi (rdif) is much faster, look at kismet how much data and networks
can it discover on-the-fly.
What is a name of your basestation ?
Darius
| |
| Flemming L. Baerentsen 2007-12-10, 10:33 am |
|
"http://members.lycos.co.uk/dariusjack/" < dariusjack2006@yahoo
.ie> skrev i
en meddelelse
news:fd504497-cf4c-4eda-a9ae- aab0925a0517@x69g200
0hsx.googlegroups.com...
> On Nov 30, 10:07 am, "Flemming L. Baerentsen"
> <f_l_bremovethist...@hotmail.com> wrote:
>
> Hi Flemming,
> it can be done faster for one specific channel.
> But there is a number of channels to be scanned and your basestation
> has to feed some packets from serial transmission on each channel to
> extract ID data.
> Wifi (rdif) is much faster, look at kismet how much data and networks
> can it discover on-the-fly.
> What is a name of your basestation ?
>
> Darius
Hi Darius,
Thank you for answering my question.
That it can be done faster sounds very interesting to me and I would like to
know more of this.
Our plan is to build an embedded platform with a bluetooth interface, but
only if it is possible to get an acceptable
bluetooth-Device-ID-recovery-time. So I do not have a specific basestation.
I know that bluetooth operate with 79 different channels, but I am not 100%
sure how a bluetooth basestation connects with a device for the first time.
Is see for me that there is a dedicated channel (or hopping scheme) only
used for device-discovery, but is this the truth? If this is the truth I
only need to scan one channel :-)
I hope that you or another have the time to help me get wiser in this
subject.
Regards
Flemming
|
|
|
|
|