Hello!
I tried to send and receive UART data communication with iPhone app.
OS error found advertise function; OSError: Can not apply advertisment data. status: 0x09
I tried to advertise without params, advertise function did not return error.
But, connect with iPhone was unstable(connected and disconnected continuously) and no response for data sending.
How can I fix this?
===============
# the Nordic UART Service.
uuid_spp_vender_specific = UUID("6E400001-B5A3-F393-E0A9-E50E24DCCA9E")
uuid_spp_rx_characteristic = UUID("6E400002-B5A3-F393-E0A9-E50E24DCCA9E")
uuid_spp_tx_characteristic = UUID("6E400003-B5A3-F393-E0A9-E50E24DCCA9E")
periph = Peripheral()
service_SPP = Service(uuid_spp_vender_specific)
SPP_rx_pros = Characteristic.PROP_WRITE
SPP_rx_attrs = Characteristic.ATTR_CCCD
SPP_rx_characteristic = Characteristic(uuid_spp_rx_characteristic, props = SPP_rx_pros, attrs = SPP_rx_attrs)
service_SPP.addCharacteristic(SPP_rx_characteristic)
SPP_tx_pros = Characteristic.PROP_NOTIFY
SPP_tx_attrs = Characteristic.ATTR_CCCD
SPP_tx_characteristic = Characteristic(uuid_spp_tx_characteristic, props = SPP_tx_pros, attrs = SPP_tx_attrs)
service_SPP.addCharacteristic(SPP_tx_characteristic)
periph.addService(service_SPP)
periph.setConnectionHandler(event_handler)
periph.advertise(device_name="nRF52", services=[service_SPP])
[nRF52840] UART service advertising error.
-
- Posts: 5
- Joined: Sat Feb 10, 2018 1:27 pm
- Location: South Korea
Re: [nRF52840] UART service advertising error.
As a starter, could you try out a patch for the iOS connection, to see if this solves the issue?
I have not done a PR of this yet, as i do not have a recent version of iPhone/iPad to test it out on myself in order to verify that it fixes the issue.
https://github.com/glennrub/micropython ... aa9e89762e
It relates to the raised issue:
https://github.com/micropython/micropython/issues/4288
I have not done a PR of this yet, as i do not have a recent version of iPhone/iPad to test it out on myself in order to verify that it fixes the issue.
https://github.com/glennrub/micropython ... aa9e89762e
It relates to the raised issue:
https://github.com/micropython/micropython/issues/4288