Bluefruit LE SPI friend - periodic error - no data reception

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
schrikdraad
 
Posts: 2
Joined: Tue Jan 23, 2018 7:16 am

Bluefruit LE SPI friend - periodic error - no data reception

Post by schrikdraad »

Hi there..
I am trying to get the Bluefruit LE SPI friend to work with a PIC microcontroller.
As I just want to pass packets of data to a mobile device, I use datamode.
I use the Adafruit Bluefruit LE app on my phone to test my firmware.

When I put the device in datamode using the +++ command (using SDEP), the BLE module jumps to datamode. This is visible by the LED blinking pattern on the module.
I can then send data via SPI to the module, and I receive this correct in the app on my phone.

However, I seem to be unable to retrieve data with the PIC when I send data from my phone back to the device.
If I use the command type BLE_UARTRX, wrapped in message 0x10 - 0x02 - 0x0A - 0x00, the BLE module responds with 0x20 - 0x02 - 0x0A - 0x00...To me it seems this means there is no data in the RX buffer. If I start sending data from my phone to the module, I keep seeing this response. I do not understand why this is...

While debugging this problem I discovered a periodic error message from the Bluefuit LE SPI friend. Maybe this is the problem but I am not sure.
Every second the Bluefruit module IRQ line goes high. I respond to this by initiating a SPI transfer and the module spits out the following error message: 0x80 - 0xA1 - 0x80 - 0x00.
What could this possibly be?
Is there a lookup table somewhere that shows me all possible error codes?
Interesting detail: If I put the Bluefruit LE board back in command mode, the error disappears, meaning, it only shows when in datamode.

Can somebody tell me what is going on?
Thanks!

User avatar
schrikdraad
 
Posts: 2
Joined: Tue Jan 23, 2018 7:16 am

Re: Bluefruit LE SPI friend - periodic error - no data recep

Post by schrikdraad »

I tried to do the same thing in command mode, and now data transfer from and to the device work well. Weird, as data parsing should be done in data mode isn't it?

One thing remains weird however...the periodical error message is now also present in command mode.

Every 1 second I receive 0x80 - 0xA1 - 0x80 - 0x00 which I do not understand. (This message appears with IRQ, but is not a response to a command, which is odd in my opinion).
I saw one other person dealing with this error on this forum, but I can not find his post anymore.

I am very curious is somebody knows what this error is...


And...It would be great if a low level manual, like a datasheet, of this module would become available!
Attachments
actual error message
actual error message
periodical_error_zoom2.jpg (149.75 KiB) Viewed 308 times
message with clear view on IRQ and CS
message with clear view on IRQ and CS
periodical_error_zoom1.jpg (145.55 KiB) Viewed 308 times
message in time (every 1 second it pops up)
message in time (every 1 second it pops up)
periodical_error.jpg (149.71 KiB) Viewed 308 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”