Just checked - looks like there's a crash if you do:
NRF.setServices({ '555a0001-0aaa-467a-9538-01f0652c74e8' : { '555a0003-0aaa-467a-9538-01f0652c74e8' : { value : [0], maxLen : 20, readable : true, notify : true, } } }, { advertise : ['555a0001-0aaa-467a-9538-01f0652c74e8'] });
But try this one instead:
NRF.setServices({ '555a0001-0aaa-467a-9538-01f0652c74e8' : { '555a0003-0aaa-467a-9538-01f0652c74e8' : { value : [0], maxLen : 20, readable : true, notify : true, } } }, { advertise : ['555a0001-0aaa-467a-9538-01f0652c74e8'], uart:false });
The issue was that it was trying to advertise two 128 bit UUIDs (the UART and the Google one). If you disable the BLE UART it should be fine.
You could also manually specify the advertising payload to remove the name and put the UUID in the main packet with:
NRF.setServices({ '555a0001-0aaa-467a-9538-01f0652c74e8' : { '555a0003-0aaa-467a-9538-01f0652c74e8' : { value : [0], maxLen : 20, readable : true, notify : true, } } }, { }); NRF.setAdvertising([2,1,5,17,7,0xe8,0x74,0x2c,0x65,0xf0,0x01,0x38,0x95,0x7a,0x46,0xaa,0x0a,0x01,0x00,0x5a,0x55])
But that's probably overkill :)
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just checked - looks like there's a crash if you do:
But try this one instead:
The issue was that it was trying to advertise two 128 bit UUIDs (the UART and the Google one). If you disable the BLE UART it should be fine.
You could also manually specify the advertising payload to remove the name and put the UUID in the main packet with:
But that's probably overkill :)