Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: BGLib Arduino library for Bluegiga BLE112 Bluetooth Low Energy module on: November 28, 2012, 03:15:59 pm
I've boiled the problem down to a simple addition of a large array to your original test program (attached).

With a single byte array, the program runs as expected, increase the array size to 2048 or similar and the program no longer runs correctly.

Any ideas?

Toby
2  Using Arduino / Networking, Protocols, and Devices / Re: BGLib Arduino library for Bluegiga BLE112 Bluetooth Low Energy module on: November 28, 2012, 02:34:58 pm
Hi Jeff,

I'm experiencing some odd behaviour, specifically when the binary size of my application gets about about 17,000 bytes - Under this size BGLib and BGAPI over serial using SoftwareSerial work very reliably, but above this kind of size strange things begin to happen such as the BLE112 not responding to commands, or either the BLE112 or Arduino spontaneously resetting.

In trying to get the bottom of this problem I've rebuilt my application from the base up, and repeated my observation that the odd behaviour begins at around the 17,000 byte binary size.

I wonder whether you've exercised BGLib more than running your test application? Or whether you've used it within the context of a larger application?

To give you some idea of the functions and callbacks I'm making use of, these are:

  ble112.ble_rsp_system_hello
  ble112.ble_rsp_gap_set_scan_parameters
  ble112.ble_rsp_gap_discover
  ble112.ble_rsp_gap_end_procedure
  ble112.ble_rsp_sm_set_bondable_mode
  ble112.ble_rsp_gap_set_mode
  ble112.ble_rsp_attributes_write
  ble112.ble_rsp_sm_set_parameters
  ble112.ble_rsp_sm_encrypt_start
  ble112.ble_rsp_sm_passkey_entry
  ble112.ble_rsp_sm_get_bonds
  ble112.ble_evt_system_boot
  ble112.ble_evt_gap_scan_response
  ble112.ble_evt_attributes_value
  ble112.ble_evt_connection_status
  ble112.ble_evt_sm_passkey_request
  ble112.ble_evt_sm_passkey_display
  ble112.ble_evt_sm_bonding_fail
  ble112.ble_evt_sm_bond_status
  ble112.ble_evt_connection_version_ind
  ble112.ble_evt_connection_disconnected
  ble_cmd_system_reset
  ble_cmd_system_hello
  ble_cmd_sm_set_parameters
  ble_cmd_gap_set_mode
  ble_cmd_sm_set_bondable_mode
  ble_cmd_sm_encrypt_start
  ble_cmd_sm_passkey_entry
  ble_cmd_connection_disconnect
  ble_cmd_sm_set_bondable_mode
  ble_cmd_attributes_write

 Thanks in advance for any ideas you may have about this odd behaviour,

Toby




3  Using Arduino / Networking, Protocols, and Devices / Re: BGLib Arduino library for Bluegiga BLE112 Bluetooth Low Energy module on: November 28, 2012, 02:32:01 pm
Hi Jeff,

I'm experiencing some odd behaviour, specifically when the binary size of my application gets about about 17,000 bytes - Under this size BGLib and BGAPI over serial using SoftwareSerial work very reliably, but above this kind of size strange things begin to happen such as the BLE112 not responding to commands, or either the BLE112 or Arduino spontaneously resetting.

In trying to get the bottom of this problem I've rebuilt my application from the base up, and repeated my observation that the odd behaviour begins at around the 17,000 byte binary size.

I wonder whether you've exercised BGLib more than running your test application? Or whether you've used it within the context of a larger application?

To give you some idea of the functions and callbacks I'm making use of, these are:

  ble112.ble_rsp_system_hello
  ble112.ble_rsp_gap_set_scan_parameters
  ble112.ble_rsp_gap_discover
  ble112.ble_rsp_gap_end_procedure
  ble112.ble_rsp_sm_set_bondable_mode
  ble112.ble_rsp_gap_set_mode
  ble112.ble_rsp_attributes_write
  ble112.ble_rsp_sm_set_parameters
  ble112.ble_rsp_sm_encrypt_start
  ble112.ble_rsp_sm_passkey_entry
  ble112.ble_rsp_sm_get_bonds
  ble112.ble_evt_system_boot
  ble112.ble_evt_gap_scan_response
  ble112.ble_evt_attributes_value
  ble112.ble_evt_connection_status
  ble112.ble_evt_sm_passkey_request
  ble112.ble_evt_sm_passkey_display
  ble112.ble_evt_sm_bonding_fail
  ble112.ble_evt_sm_bond_status
  ble112.ble_evt_connection_version_ind
  ble112.ble_evt_connection_disconnected
ble_cmd_system_reset
4  Using Arduino / Networking, Protocols, and Devices / Re: BGLib Arduino library for Bluegiga BLE112 Bluetooth Low Energy module on: November 21, 2012, 11:25:28 am
Just heard back from BlueGiga support:

"Hello,

BGAPI is not supported over SPI at the moment, you can use this over UART and USB at this time. SPI can support things like sensors and displays for now.

Best regards,

Sam Pullen"

It would help if the BlueGiga docs were consistent - Various diagrams etc show BGAPI being connected to a microcontroller via SPI.

5  Using Arduino / Networking, Protocols, and Devices / Re: BGLib Arduino library for Bluegiga BLE112 Bluetooth Low Energy module on: November 20, 2012, 11:23:55 am
Hi Jeff,

Thanks for that, really useful.
I've been experimenting a bit, I'm using USART 0 rather than one on pins P1_4 & P1_5. According to the spec, there is a special 'packet' mode that can be defined in the hardware.xml for using BGApi over a serial port without flow control. It just requires adding a length byte to the start of the command - I added this to your code and it seems to work fine.
I'm wondering about using BGApi over SPI, as the docs suggest this is possible, however it's not clear to me how this would be achieved in terms of which end is master and which end is slave, and how the slave end sends data when the master end isn't clocking any across.

Toby
Pages: [1]