Show Posts
|
|
Pages: [1]
|
|
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
|
|
|
|
|
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
|
|
|
|
|