Code Monkey home page Code Monkey logo

bl652-applications's People

Contributors

greg-leach avatar henrikh avatar kieran-mackey avatar mtwooburn avatar thedjnk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bl652-applications's Issues

Example for event EVSPISLAVETXRX

Hello sir i am trying to receive spi data from stm32f103, but cannot find it working.
BL652 need to receive data from controller on the interrupt. I have found this interrupt in the guide but cannot find any example elaborating functionality of this interrupt (EVSPISLAVETXRX).
please help

Firmware upgrades under Linux/Wine failing

Does anyone have experience upgrading the firmware on the BL652 using BL65xUartFwUpgrade.exe, running under a Linux/Wine environment? While trying to upgrade, as soon as I select the appropriate COM port, the upgrade utility crashes, with this error:

Exceptipon EInOutError in module
BL65xUartFwUpgrade.exe at 000150AB.
Device read error.

I've tried playing with permissions/owernship of /dev/ttyUSB0, wine registry settings, and a few other ideas, but can't seem to get around this. Any help would be much appreciated.

$autorun$.devkit.sample.app.sb not running as intended

Hello,

this might not be the place to post this, but as there's no BL652 forum I'll post this here.

When following the quick start guide here:
https://www.lairdtech.com/bl652-quick-start

The $autorun$.devkit.sample.app.sb does not have the behavior explained in the quick start.

In the moduleLink app, the device is discovered, and once you click on it it get stuck at service discovery.
All it does is writting in the UwTerminalX:

======================== BLE Device connected =======================
 Connection: Interval=48750us LinkTimeout=20000000us SlaveLatency=0
=====================================================================

# CCCD() Vcc, 0
# CCCD() Temperature, 0
# CCCD() Packet ID, 0
# CCCD() Rssi, 0
# CCCD() Buttons, 0

====================== BLE Device disconnected ======================

The service discovery eventually time out and pop-up the Alert:

Service Discovery Failed; Device may be unsupported! If trying to use OTA download, restart the app.

When using Xamarin and debbuging the ModuleLink app, I see that the GPIOs service is not instancing since it's never discovered.

So I guess the service is never created/activated in the SmartBasic.

EDIT:
So after some tests. I've tried another phone and it worked. Both phone are Galaxy s4 same model SGH-I337M.
Also tried with a galaxy S6 and it worked. I wonder what cause this issue...

need firmware upgrade

Hi, My DVK-BL652 board has a firmware version of 28.6.2.0, which prevents me from compiling the code. So according to one of the answers, I need a firmware upgrade. but I cannot download anything from the software session of the product page. any thought?

Getting a compile error

Failed to compile -9; Application failed to compile
rc = BlePhySet(hConn, PhyTx, PhyRx, 0)

Compile Error: (0x0433) TOK_UNEXPECTED_TOKEN_IN_EXPR

File : $autorun$.devkit.sample.app.sb
Line : 901
Source : rc = BlePhySet(hConn, PhyTx, PhyRx, 0)
: ---------^

BL652 VSP Packet drop @ higher data Rate (2800 bytes per second)

Dear Community ,

I would like to understand the data rate that can be supported over the Laird BL 652 VSP service. I use the BL-652 as part of my product and have been using the VSP for a while now without any issues. We started out with a data rate of 300 bytes per second. Over time we are now at a data rate of 2800 bytes per second. I now see a lot of dropped bytes. I am still debugging this and have so far not been able to firmly concluded if the issue is on the BL 652 side or the receiver side.

Some items that have been checked are listed below

On the BL 652 side, the UART RX line is tapped out and forwarded to a windows laptop and read using serial. The data is fine. So I have confirmed that the BL 652 RX pin is indeed seeing the correct data.

I tried to receive the BLE data using PunchThrough LightBlue BLE app on android. Here is see only around 1200 to 1500 bytes of data per second. This log is generated by the Light Blue Android app.

On Windows i have used the below applications
https://github.com/sensboston/BLEConsole
https://github.com/noble/noble-device

Both these applications receive around 1000 odd bytes similar to the light blue. That's when i started to think if the issue is actually on the BL 652 side.

While I have yet to do a lot of debugging my query is just to understand the data rates that can be supported and if there have been similar observations with the vsp.

Thanks,
Abel.

slave buffer is always empty

Hello Sir
i am trying to read SPI slave data using example code (SpiSlaveRxBufferRead.sb) but when i read the buffer it is always empty and i get the message "No SPI slave data read".
I have successfully get the other example (SpiSlaveTxBufferWrite.sb) working where SPI slave transmits the data and master SPI receives it.
I am using an stm32f103 as SPI master. I am doing following steps, please let me know where i am making mistake.

  1. CS of bl652 (SPI slave) is driven high from stm32f103 (SPI master)
  2. Open SPI Slave Peripheral in bl652
  3. CS of bl652 (SPI slave) is driven low from stm32f103 (SPI master)
  4. data is sent from stm32f103 (SPI master) , i have seen the data on logic analyzer too to certify it is going to bl652 (SPI slave).
  5. CS of bl652 (SPI slave) is driven high from stm32f103 (SPI master)
  6. read SPI slave using SpiSlaveRxBufferRead. it always return an empty string
    i shall be thankful for your help. regards

Config_Fail

Hello,

I keep receiving Config_Fail during the provisioning stage in the Mesh example.
Please help!

BL652 with a MS5803 pressure sensor

Hello everybody,

I try to do the following:

Four modules are to measure the pressure and the values should then be sent to a fifth module.

I try to write two codes. For the four modules I want to write a code as a client and for the one moduel the values receives a code as a server.

The code for the server is ready. Server and client connect but I can not get it that he receives the data. How can I do that the values arrive here?

The code for the clients is a bit harder.
On the board is a MS5803 pressure sensor on it, which should measure pressure.
I found an example code in the language C, which I am trying to rewrite in smartBASIC.
The CRC check, but I can not continue because I am constantly displayed errors.

These two problems have, it would be great if someone could help me or give me tips

In this document is the sample code for the pressure sensor in c:
MS5803.pdf

`//Client--CRC check

n_rem = 0x00
crc_read = sensorCoefficients[7] //save read CRC
sensorCoefficients[7] = ( 0xFF00 & ( sensorCoefficients[7] ) ) //CRC byte is replaced by 0

for count=0 to 16 //operation is performed on bytes

if ( count%2 == 1 ) n_rem ^= ( ( sensorCoefficients[count>>1] ) & 0x00FF ) //choose LSB or MSB
else n_rem ^= (sensorCoefficients[count>>1]>>8)

for (n_bit=8; n_bit>0; n_bit--)

	if (n_rem&(0x800))
		n_rem=(n_rem<<1) ^ 0x3000
	else n_rem = (n_rem<<1)

n_rem = (0x00F & (n_rem >> 12))
sensorCoefficients[7] = crc_read`

`//SERVER--- receive value

FUNCTION HandlerCharVal(BYVAL hChar_written AS INTEGER, BYVAL offset, BYVAL len) AS INTEGER

// Characteristic handle that was returned when the characteristic was registered using the function

BleCharCommit()
PRINT "beispeiltext" // ----> error, is not displayed
DIM attr$
IF hChar_written == hChar THEN
rc = BleCharValueRead(hChar,attr$) //Read the value
print "\n written to service: ";attr$
IF ms_buffer_pos>=MEASUREMENT_BUFFER_SIZE THEN
//If Buffer full, than stop. Otherwise save the pressure and who send it

PRINT "\n buffer full, can't accept more measurements"
ELSE
//ToDo: have to split up the message into id and value!
ms_buffer_value[ms_buffer_pos]=STRVALDEC(attr$) //Save the pressure value
ms_buffer_id[ms_buffer_pos]=STRVALDEC(attr$) //Save who sent it
ms_buffer_pos=ms_buffer_pos+1

ENDIF
ENDIF
ENDFUNC 1`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.