Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Sandeep Mistry
    @sandeepmistry
    drewforchione
    @drewforchione
    Hi @sandeepmistry, Thank you for your efforts on the BLE software and sensortag implementation. My name is Drew. I am having an issue with the simplekeyservice disconnecting my sensortag from my raspi2&3 when I press the sensortag button. This happens with both test.js and sensortag.js from the two node_modules you have created. Can you offer any advice? Here's my hcidump and Here is what terminal looks like:
    '''readSimpleRead - waiting for button press ...
    disconnected!'''
    Sandeep Mistry
    @sandeepmistry
    @drewforchione
    > HCI Event: Disconn Complete (0x05) plen 4
        status 0x00 handle 64 reason 0x08
        Reason: Connection Timeout
    looks like the sensor tag is sending a disconnect
    Also, i believe the default behaviour of the firmware disconnected on button press
    actually, this is on the CC2650 model
    drewforchione
    @drewforchione
    @sandeepmistry , Thank you again. You were correct. I bought your Make:Bluetooth book. It is very helpful. I finally was able to update to the latest firmware in the CC2650 sensortag and get it to connect to the Pi3. In the sensor-tag-remote-master folder when I run .js programs the Pi connects to the CC2650 reliably but I never see "Sensortag remote is ready", any thoughts on why this could be? I put a console.log in the function onServicesAndCharacteristicsDiscovered() but apparently I am not getting into that function.
    drewforchione
    @drewforchione
    I figured out that changing var serviceUUIDs = ['FFE0'] to ffe0 in lower case and chaning ffe1 to lowercase will make the sensortag.js module run properly. Thanks again for your help @sandeepmistry
    Sandeep Mistry
    @sandeepmistry
    @drewforchione nice! I'll look into updating the book accordingly
    Manuel
    @mbruschi
    Has anyone ever managed to get the Wake On Motion working with node-sensortag? I have this mask (0xB8 // 1011 000) which means that accelerometer XYZ and Wake On Motion are set but I get the XYZ values in my notifyAccelerometer function all the time. On the TI App, the Sensortag stops sending after 10s and resends again on motion but not in my JS Code.
    function notifyMe() {
      tag.setAccelerometerPeriod(1000);
      tag.notifyAccelerometer(listenForAcc);
    }
    
    function listenForAcc() {
      tag.on('accelerometerChange', (x, y, z) => {
        let data = [x.toFixed(2), y.toFixed(2), z.toFixed(2)];
        detectFace(data);
      });
    }`
    Manuel
    @mbruschi
    Ok, now after deeper research, I've seen what the problem is. Even if I have this mask, it seems that the MPU get's initialized with 0x007f anyways and I have to re-set the WOM bit. The open Pull-Request on the repo was a good hint
    Sandeep Mistry
    @sandeepmistry
    @mbruschi yes, it's hard coded older f/w versions seemed buggy and old worked with 0x7f
    mz92341
    @mz92341
    Hey! Could someone help me? I'm not able to visualize the SensorTag node
    Sandeep Mistry
    @sandeepmistry
    @mz92341 can you please provide more details on what you are trying to do? also, what have you tried so far?
    mz92341
    @mz92341
    @sandeepmistry yes so, I'm trying to install sensortag on my node-red in order to get the node and connect it to create an app interface. When I start my node-red I get this message:
    This message was deleted
    sensortag error.jpg
    @sandeepmistry I seems that I've missed an step or probably I'm doing something wrong. I'm really new on this and I don't know how to fix it
    Sandeep Mistry
    @sandeepmistry
    @mz92341 that looks ok, xpc-connection is only needed for OS X
    the package.json warning is because you don't have the file in the directory
    i'm not to familiar with node-red, so not sure what directory you need to run npm install in
    mz92341
    @mz92341
    @sandeepmistry So the problem of the node not showing up might be fixed it if I run de npm install in the right directory? I'll try to figure it out then
    Sandeep Mistry
    @sandeepmistry
    Yep, I would ask the author of that module or check their documentation
    R.J. Steinert
    @rjsteinert
    Hi @sandeepmistry - I'm looking to continually collect data from SensorTags while optimizing battery life. Do you know of any resources that describe the sleep habits of the SensorTag or how to wake it up? I notice when running node test.js and node test-discover.js that only SensorTags that have recently powered on will be detected.
    R.J. Steinert
    @rjsteinert
    After a few tests, it seems like around two minutes is amount of time the SensorTag will stay awake after last disconnect. Can I extend that by not disconnecting? Does that help or hurt battery life?
    Sandeep Mistry
    @sandeepmistry
    @rjsteinert if you don't disconnect it will remain on, i would expect it drains more battery
    you'll need to flash custom f/w on the sensor tag to remove the default 2 minute advertising timeout
    krrishnayak
    @krrishnayak

    hello sandeep.. i wud like to compliment on ur hard work.. great project.. im using ur project to learn about node js.. i have installed all node packages in my raspberry pie.. when i try to run test.js using "node test.js" i get the following error.. pi@dex:~/node_modules/sensortag $ node test.js
    module.js:339
    throw err;
    ^

    Error: Cannot find module 'async'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/home/pi/node_modules/sensortag/test.js:3:13)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:457:10)

    mz92341
    @mz92341
    Hey! I've tried many things in order to install the sensortag node to use it within node-red, even installing it through the node-red localhost server. However, it didn't work and some errors (MSB3428, MSB8036) spotted for command line installation. They have to do with Visual C++ and Windows SDK, but I do have those updated. Does anybody know if there could be anything else that is causing these problems?
    Sandeep Mistry
    @sandeepmistry
    @krrishnayak run npm install async, async is a dev dependency so not installed when you run npm install
    @mz92341 not sure, I'm not a full time Windows user
    R.J. Steinert
    @rjsteinert
    Thanks for the info @sandeepmistry
    Abhijeet Bhatikar
    @abhatikar
    Hi Sandeep, I am a novice in nodejs.I had a question related to Ti Sensor tag reading MPU9250 data
    i am trying to understand how to read motion sensor data using gatttool
    I see in your code you see the config mask as 0x7F which is enabling all axes for all 3 sensors/meters
    when I try to do this using gatttool, i am not able get any data from the handle associated with AA81*
    Could you please help
    Abhijeet Bhatikar
    @abhatikar

    abhatikar@abhatikar-mac:~$ gatttool -I -b 24:XX:89:XX:XX:XX
    [24:XX:89:XX:XX:XX][LE]> connect
    Attempting to connect to 24:XX:89:XX:XX:XX
    Connection successful
    [24:XX:89:XX:XX:XX][LE]> char-read-uuid f000aa82-0451-4000-b000-000000000000
    handle: 0x003f value: 00 02
    [24:XX:89:XX:XX:XX][LE]> char-write-req 0x3f 007f
    Characteristic value was written successfully
    Notification handle = 0x003c value: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

    [24:XX:89:XX:XX:XX][LE]> char-read-uuid f000aa81-0451-4000-b000-000000000000
    handle: 0x003c value: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [24:XX:89:XX:XX:XX][LE]>

    Please find the logs for your reference
    Joshua Davis
    @a11smiles
    sandeep, how do i run your library in parallel? I want to connect multiple Sensor Tags at a time. However, the only way that all of them connect is if all of them are turned on when the app starts. But, if I start the app (with all tags initially turned off) and then turn the first tag on, I cannot turn on and connect another one. Looking at your noble-device code, it seems that once a device is connected, discovery is turned off. Is this correct? If so, why?
    Sandeep Mistry
    @sandeepmistry
    @a11smiles are you calling discoverAll instead of discover?
    ScottTaftPotter
    @ScottTaftPotter
    Hi sandeep, I am using your library with the Qualcomm Dragonboard and the TI CC2650 SensorTag. Running test.js, I get successful discovery but random disconnects very soon in the process. Here is the result of sudo DEBUG=* node test.js:
    hold on, cut paste failing
    att b0:91:22:f6:e3:06: read: 031700 +2ms
    att b0:91:22:f6:e3:06: new MTU is 23 +39ms
    att b0:91:22:f6:e3:06: write: 100100ffff0028 +1ms
    hci write acl data pkt - writing: 0208000b0007000400100100ffff0028 +0ms
    hci onSocketData: 020800070003000400020502 +17ms
    hci event type = 2 +0ms
    hci onSocketData: 0208000b0007000400100100ffff0028 +1ms
    hci event type = 2 +0ms
    hci onSocketData: 020820180014000400110601000700001808000800011809001b000a18 +14ms
    hci event type = 2 +0ms
    hci cid = 4 +1ms
    hci handle = 8 +0ms
    hci data = 110601000700001808000800011809001b000a18 +0ms
    att b0:91:22:f6:e3:06: read: 110601000700001808000800011809001b000a18 +1ms
    att b0:91:22:f6:e3:06: write: 101c00ffff0028 +1ms
    hci write acl data pkt - writing: 0208000b0007000400101c00ffff0028 +0ms
    hci onSocketData: 0208000b0007000400101c00ffff0028 +0ms
    hci event type = 2 +1ms
    hci onSocketData: 020820070003000400031700 +11ms
    hci event type = 2 +0ms
    hci cid = 4 +1ms
    hci handle = 8 +0ms
    hci data = 031700 +0ms
    att b0:91:22:f6:e3:06: read: 031700 +0ms
    att b0:91:22:f6:e3:06: write: 08010007000328 +12ms
    hci write acl data pkt - writing: 0208000b000700040008010007000328 +0ms
    hci onSocketData: 020820180014000400110601000700001808000800011809001b000a18 +1ms
    hci event type = 2 +0ms
    hci cid = 4 +0ms
    hci handle = 8 +0ms
    hci data = 110601000700001808000800011809001b000a18 +1ms
    att b0:91:22:f6:e3:06: read: 110601000700001808000800011809001b000a18 +0ms
    att b0:91:22:f6:e3:06: write: 08080008000328 +1ms
    hci write acl data pkt - writing: 0208000b000700040008080008000328 +1ms
    hci onSocketData: 0208200c000800040011061c0021000f18 +13ms
    hci event type = 2 +0ms
    hci cid = 4 +1ms
    hci handle = 8 +0ms
    hci data = 11061c0021000f18 +0ms
    att b0:91:22:f6:e3:06: read: 11061c0021000f18 +0ms
    att b0:91:22:f6:e3:06: write: 0809001b000328 +1ms
    hci write acl data pkt - writing: 0208000b00070004000809001b000328 +0ms
    hci onSocketData: 0208200c000800040011061c0021000f18 +1ms
    hci event type = 2 +0ms
    hci cid = 4 +0ms
    hci handle = 8 +0ms
    hci data = 11061c0021000f18 +0ms
    att b0:91:22:f6:e3:06: read: 11061c0021000f18 +1ms
    readDeviceName
    device name = undefined
    readSystemId
    system id = undefined
    readSerialNumber
    serial number = undefined
    readFirmwareRevision
    firmware revision = undefined
    readHardwareRevision
    hardware revision = undefined
    readSoftwareRevision
    software revision = undefined
    readManufacturerName
    manufacturer name = undefined
    enableIrTemperature
    hci onSocketData: 0208201b001700040009070200020300002a0400020500012a0600020700042a +26ms
    hci event type = 2 +1ms
    hci cid = 4 +0ms
    hci handle = 8 +0ms
    hci data = 09070200020300002a0400020500012a0600020700042a +1ms
    att b0:91:22:f6:e3:06: uh oh, no current command +0ms
    hci onSocketData: 01060403080013 +2s
    hci event type = 1 +1ms
    hci cmd = 1030 +0ms
    hci data len = 3 +16ms
    hci onSocketData: 040f0400010604 +4ms
    hci event type = 4 +5ms
    hci sub event type = 15 +0ms
    hci status = 0 +3ms
    hci cmd = 1030 +1ms
    hci onSocketData: 04050400080016 +1ms
    hci event type = 4 +1ms
    hci sub event type = 5 +1ms
    hci handle = 8 +1ms
    hci reason = 22 +10ms
    disconnected!
    hci set scan enabled - writing: 010c20020001 +7ms
    linaro@linaro-alip:/usr/lib/node/sensortag$
    Sandeep Mistry
    @sandeepmistry
    @ScottTaftPotter please open an issue on Github to track this, please also include an HCI dump capture sudo hcidump -t -x
    Maarten Biesbrouck
    @MaartenBiesb_twitter
    Does someone know how to solve this error
    npm ERR! Refusing to install package with name "sensortag" under a package
    npm ERR! also called "sensortag". Did you name your project the same
    npm ERR! as the dependency you're installing?
    Sandeep Mistry
    @sandeepmistry
    @MaartenBiesb_twitter run the npm install in a folder not named sensortag
    marcob2178
    @marcob2178

    Hi @sandeepmistry , sorry to bother you. I have six of these boards nRF52840

    Do you know where to get an Arduino Bluetooth sample code for using six of these boards in a peer to peer network setup?