IBM-Cloud / iot-sensor-tag

Sample code for connecting to a TI Sensor Tag and using that data in apps deployed to Bluemix.
Apache License 2.0
33 stars 45 forks source link

not discovering tag - tried on two separate devices. #5

Open stumpygreg opened 9 years ago

stumpygreg commented 9 years ago

I have tried the code in this repo with both a mac and an intel edison and it fails in the same way. I am using a 2560 tag.

^Cgreglakomski@Gregs-MBP:~/Sensortag/iot-sensor-tag/publish$ node sensor-tag.js Device MAC Address: 00249b063352 Make sure the Sensor Tag is on! MQTT client connected to IBM IoT Cloud.

And it sits here. It is entering the device.discover function but is not discovering.

stumpygreg commented 9 years ago

If I navigate to noble and run test.js the mac sees the tag

stumpygreg commented 9 years ago

After recloning the iot-sensor-tag repo yet agin, I checked for out of date packages. There were several including sensortag. I forced the install of the current packages and it looks like the sensor tag is now being recognized. Unfortunately, Bluemix is no longer connecting to my powerbook so I can't tell whether the issue has gone away.

ryanjbaxter commented 9 years ago

If there are newer packages that work, please submit a pull request

stumpygreg commented 9 years ago

Ok. Can you explain : client errorError: Connection refused: Not authorized

stumpygreg commented 9 years ago

Can you provide guidance on how to do pull request on cloned repo. I found instructions based on a forked repo. I am not a github expert.

ryanjbaxter commented 9 years ago

A not authorized error would indicate that you are not supplying the correct credentials when making a connection to the IoT service.

You can only submit a pull request based on a fork of a repo.

stumpygreg commented 9 years ago

Ryan, when the repo is cloned and npm install is executed, both sensor tag and mqtt come up with wrong versions.

Package Current Wanted Latest Location mqtt 1.3.5 1.0.5 1.3.5 mqtt getmac 1.0.6 1.0.6 1.0.7 getmac sensortag 1.0.2 0.1.9 1.0.2 sensortag

I updated to the above versions in order to get sensor tag to be discovered.

ryanjbaxter commented 9 years ago

@stumpygreg see #6. I will merge these changes in soon