Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    View BLE data on Android using MITA

    Qua523
    Member

    View BLE data on Android using MITA

    Hi,

    I'm new to XDK, so I'm not sure what I'm missing but I have a "show stopper" - I'm trying to send data over BLE to Android app to no avail.

    VirtualXdkDemo works for me as expected with my Android phone running the virtual XDK app.

    But when trying to show the data on any other BLE app, it doesn't show anything. I know the device is connected but no data is being showed on the phone.

    I've tried both a play market app - "BLE Terminal" and a small app developed by me on the MIT2 platform.

    I also compiled some MITA examples where I adjusted a bit also to write to the console (which works), but still nothing shows on m BLE apps.

    What am I missing here?

    Thanks in advanced!

    Tags (1)
    6 REPLIES 6
    Grocamora
    Community Manager

    Re: View BLE data on Android using MITA

    Hello @Qua523,

    Welcome to the XDK world as well as to our community 🙂

    our XDK experts will have a look into your question and we will get back to you as soon as possible!

    Stay tuned!

     

    Roca

     

    Tags (4)
    Padmapriya
    Long-established Member

    Re: View BLE data on Android using MITA

    Hello,

    You can refer my sample MITA application for BLE communication. Wherein i used BLE scanner mobile application to read and write to the characteristics.

    package main;
    import platforms.xdk110;
    
    setup ppBLE : BLE {
    deviceName = "padmaMita";
    macAddress = "FC:D6:BD:10:03:E3";
    advertisingInterval = 2000;
    serviceUID = 0xFCD6;
    var ppIntCharc = int32_characteristic(0xFCD7);
    var ppBoolCharc = bool_characteristic(0xFCD8);
    var ppuIntCharc = uint32_characteristic(0xFCD9);
    }
    
    every 10 seconds{
    print("timer ble packet\r\n");
    ppBLE.ppIntCharc.write(81); //character- Q
    }
    
    every button_one.released{
    print("button one ble packet \r\n");
    ppBLE.ppIntCharc.write(90); //character- Z
    }

     

     

    Tags (4)
    Qua523
    Member

    Re: View BLE data on Android using MITA

    Hi @, thanks for the greetings. Looking forward to join many threads 🙂

    Hi @, thanks for your code. It gives me the same results as mine - works on the console, apps shows the XDK as connected but no data appear on the phone.

    The play market app I've tested with is Ble Terminal (https://play.google.com/store/apps/details?id=com.mightyit.gops.bleterminal) and I attached the "code" of my MIT2 app. Hope it helps...

    Tags (4)
    Padmapriya
    Long-established Member

    Re: View BLE data on Android using MITA

    Hello,

    Can you try to use BLE scanner https://play.google.com/store/apps/details?id=com.macdom.ble.blescanner&hl=en.

    Because the same application works for me in BLE scanner. Is there any special feature in BLE terminal, which is not covered in BLE scanner?

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist