EB024 / Bluetooth component buffer size

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
RobinCordell
Flowcode V4 User
Posts: 15
Joined: Fri Mar 12, 2010 9:37 pm
Has thanked: 4 times
Contact:

EB024 / Bluetooth component buffer size

Post by RobinCordell »

Hi Guys,

I am using an EB024 (with a PIC 16F877A on an EB006) to connect to a Active Pilot Bluetooth GPS unit and am trying to retrieve the NMEA sentences from the device and display these on an EB005 display module. The issue that I am having is that when I use the Bluetooth StringRecieve function, the received string length seems to be limited to 64 characters (with the NMEA sentences from the ActivePilot being about 70 characters long). Is this a limitation of the Blu2i or the Flowcode component that I haven't found in the documentation? Or is there some configuration setting that I have missed? My suspicions are aroused because 64 is quite a nice 'round number' :wink:

Any one any clues on this?

Many thanks

Robin

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: EB024 / Bluetooth component buffer size

Post by Sean »

Hello Robin,

The size of the Bluetooth string buffer is set to a default value of 32 bytes.

The buffer size can be adjusted from Flowcode by using the 'Custom Code' feature.

With the Bluetooth component selected in the Properties panel, click on the dots next to 'Custom Code'.
Select [Defines] and click on the 'Edit Code' button.

The line:

#define BLU_STRING_ARRAY_SIZE 32

is used to set the size of the Bluetooth string buffer (line 90 in my version).

You can experiment with different values for this array size - within the usual memory limits.

RobinCordell
Flowcode V4 User
Posts: 15
Joined: Fri Mar 12, 2010 9:37 pm
Has thanked: 4 times
Contact:

Re: EB024 / Bluetooth component buffer size

Post by RobinCordell »

Thanks Sean,

I did wonder whether there was a buffer size issue. I will have a play as you suggest. If I customise the code in one application, am I customising for all applications including the Bluetooth component or is it confined to that application?

Best regards

Robin

User avatar
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: EB024 / Bluetooth component buffer size

Post by Benj »

Hi Robin,

The change is confined to that program if you use the custom code feature. You can then export the updated component and import into other programs if needed. You can also revert back to the original code set at any time by looking for the customised functions, clicking edit and then clicking revert.

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: EB024 / Bluetooth component buffer size

Post by Sean »

Customisation applies only to individual projects.

Any changes that are likely to be a common requirement can be made to the corresponding component C file in the Components folder of the Flowcode installation. The changes would then affect every program using the component (save a backup of the original file).

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: EB024 / Bluetooth component buffer size

Post by Spanish_dude »

Hi,

If you need a NMEA parser you can check this article I made a while back when I received the GPS E-Block ;)
http://www.matrixmultimedia.com/mmforum ... =26&t=7879

BR,

Nicolas L.

Post Reply