Following this thread, I tried to upgrade my dongle from s130 v1.0 to s130 v2.0.
- I'm using windows driver 0.5.0
- Tested both binaries for 0.5.0 downloaded and compiled myself
- USB dongle PCA: 10031 V 1.1.0 2015.27
- Programmed withs130_nrf51_2.0.0_softdevice.hex (SDK v11.0.0)
- ble_connectivity_s130_hci_pca100028 from SDK v11.0.0 recompiled for pca100031
ble_connectivity_s130_hci_pca100028 from SDK v11.0.0 was compiled with following options:
In ser_phy_config_conn_nrf51.h change UART pins to UART through USB:
#define SER_PHY_UART_RX RX_PIN_NUMBER
#define SER_PHY_UART_TX TX_PIN_NUMBER
#define SER_PHY_UART_CTS CTS_PIN_NUMBER
#define SER_PHY_UART_RTS RTS_PIN_NUMBER
In ser_config.h turn off parity:
#define SER_PHY_UART_PARITY false
Add preprocessor definition: HCI_LINK_CONTROL
Baud rate can be changed in ser_config.h:
#define SER_PHY_UART_BAUDRATE UART_BAUDRATE_BAUDRATE_Baud1M
Unfortunately, I'm unable to connect the dongle anymore (same code woring with s130 v1.0). I do:
sd_rpc_serial_port_name_set(serial_port);
sd_rpc_serial_baud_rate_set(1000000);
sd_rpc_log_handler_set(log_handler);
sd_rpc_evt_handler_set(ble_evt_dispatch);
error_code = sd_rpc_open();
ble_enable_params_t ble_enable_params;
memset(&ble_enable_params, 0, sizeof(ble_enable_params));
ble_enable_params.gatts_enable_params.attr_tab_size = BLE_GATTS_ATTR_TAB_SIZE_DEFAULT;
ble_enable_params.gatts_enable_params.service_changed = false;
err_code = sd_ble_enable(&ble_enable_params);
But sd_ble_enable
runs for ever and never returns.