Hi,
I'm having trouble to connect between two BL0170 (E-blocks2) modules via Bluetooth.
I tried different ways.Also I tried to use AT commands but I dont get it.
E-blocks2 component macros differ from earlier components (for E-blocks1), there are no necessary macros for BL0170 .
Now I am must use ONLY AT-commands?
Unfortunately, I can not use the AT-commands, because there are no suitable macros.
I hope you can help me with my problem. With another component in this series (WLAN BL0136) aslo was a problem, but after the update Flowcode8 from Benj its all worked.
Thanks in advance for your help.
E-blocks 2 Bluetooth (BL0170)
-
- Posts: 26
- Joined: Tue Sep 18, 2018 5:22 pm
- Has thanked: 1 time
- Been thanked: 3 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: E-blocks 2 Bluetooth (BL0170)
Hello,
The current macros assume that the board will be connected from a PC or from a phone.
I'll make some additions to the component to allow for things like scanning and connections to be established via the BL0170 boards.
The current macros assume that the board will be connected from a PC or from a phone.
I'll make some additions to the component to allow for things like scanning and connections to be established via the BL0170 boards.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: E-blocks 2 Bluetooth (BL0170)
Hello,
I have now added some additional macros to the BL0170 and RN4677 components to allow you to read the MAC address and connect to a MAC address. You will need to record the MAC address of the unit you wish to connect to and then use this when connecting.
Currently nothing to do an enquiry as I had a quick go and this wasn't doing what I expected. Highly likely it's me doing things wrong so I'll keep on at this.
I have also exposed the EnterCommandMode, SendCommand and LeaveCommandMode macros so you can call additional commands as required.
The datasheet here lists the various commands if you should need anything extra.
http://ww1.microchip.com/downloads/en/D ... 02506B.pdf
Here is an example project where I have two bluetooth modules connected to the same dsPIC EB2 upstream board.
I have now added some additional macros to the BL0170 and RN4677 components to allow you to read the MAC address and connect to a MAC address. You will need to record the MAC address of the unit you wish to connect to and then use this when connecting.
Currently nothing to do an enquiry as I had a quick go and this wasn't doing what I expected. Highly likely it's me doing things wrong so I'll keep on at this.
I have also exposed the EnterCommandMode, SendCommand and LeaveCommandMode macros so you can call additional commands as required.
The datasheet here lists the various commands if you should need anything extra.
http://ww1.microchip.com/downloads/en/D ... 02506B.pdf
Here is an example project where I have two bluetooth modules connected to the same dsPIC EB2 upstream board.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 26
- Joined: Tue Sep 18, 2018 5:22 pm
- Has thanked: 1 time
- Been thanked: 3 times
Re: E-blocks 2 Bluetooth (BL0170)
Bluetooth module BL0170 uses Microchip RN4677 AT commands, right?
I tried various commands from here :
http://ww1.microchip.com/downloads/en/D ... 02377A.pdf
But they do not work, it may be a matter of syntax.
Could you tell me how to work with AT commands correctly?
I tried various commands from here :
http://ww1.microchip.com/downloads/en/D ... 02377A.pdf
But they do not work, it may be a matter of syntax.
Could you tell me how to work with AT commands correctly?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: E-blocks 2 Bluetooth (BL0170)
Hello,
Here is the ConnectToMAC command in action from section 2.5.6 of the datasheet.
I wouldn't call them AT commands as they generally start with the command string with "AT" but yes the document you are looking at has the correct commands for the module.Bluetooth module BL0170 uses Microchip RN4677 AT commands, right?
Here is the ConnectToMAC command in action from section 2.5.6 of the datasheet.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 26
- Joined: Tue Sep 18, 2018 5:22 pm
- Has thanked: 1 time
- Been thanked: 3 times
Re: E-blocks 2 Bluetooth (BL0170)
Hello ,
Can I use the WaitForValue macro when connecting to a module via a mobile device or PC?
I could not detect the "CONNECT" value when connected via smartphone.
Therefore, I wanted to know, how can I work with the module through the PC terminal? (if its possible)
Thanks in advance for the answer
Can I use the WaitForValue macro when connecting to a module via a mobile device or PC?
I could not detect the "CONNECT" value when connected via smartphone.
Therefore, I wanted to know, how can I work with the module through the PC terminal? (if its possible)
Thanks in advance for the answer
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: E-blocks 2 Bluetooth (BL0170)
Hello,
Yes that should be possible, the easiest way is to use an USB to TTL serial adapter with flying leads and then connect the leads to the E-block.
Something like this would likely do a good job.
https://cpc.farnell.com/pro-signal/usb- ... 9gQAvD_BwE
Yes that should be possible, the easiest way is to use an USB to TTL serial adapter with flying leads and then connect the leads to the E-block.
Something like this would likely do a good job.
https://cpc.farnell.com/pro-signal/usb- ... 9gQAvD_BwE
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel