Show pageOld revisionsBacklinksFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Send data to the HM10 from a BLE host (macbook) ====== Connect * HM-10 TX - FTDI RX * HM-10 RX - FTDI TX * HM-10 GND - FTDI GND * HM-10 VCC - FTDI VCC Settings: 9600, N, 8, 1; When you're connected type: AT - it should respond with OK You can find your firmware version: AT+VERS? - firmware version And set your device's name: AT+NAME? - get current name AT+NAMEyourname - set the name (12 chars max) <code> public class SampleGattAttributes { private static HashMap<String, String> attributes = new HashMap(); public static String CLIENT_CHARACTERISTIC_CONFIG = "00002902-0000-1000-8000-00805f9b34fb"; public static String HM_10_CONF = "0000ffe0-0000-1000-8000-00805f9b34fb"; public static String HM_RX_TX = "0000ffe1-0000-1000-8000-00805f9b34fb"; static { // Sample Services. attributes.put("0000ffe0-0000-1000-8000-00805f9b34fb", "HM 10 Serial"); attributes.put("00001800-0000-1000-8000-00805f9b34fb", "Device Information Service"); // Sample Characteristics. attributes.put(HM_RX_TX,"RX/TX data"); attributes.put("00002a29-0000-1000-8000-00805f9b34fb", "Manufacturer Name String"); } public static String lookup(String uuid, String defaultName) { String name = attributes.get(uuid); return name == null ? defaultName : name; } } </code> ===== Discover your HM-10 ===== - sudo cylon-ble-scan - show services provided: sudo cylon-ble-info ---UUID--- ==== Resources ==== * https://github.com/sandeepmistry/noble * https://github.com/hybridgroup/cylon-ble * https://github.com/hybridgroup/cylon-ble/blob/master/lib/characteristic.js * https://www.seeedstudio.com/wiki/images/c/cd/Bluetooth4_en.pdf * https://gist.github.com/bitmorse/fab766fed89d3df2d35d octanis1_hm10.txt Last modified: 6 years agoby raffael