sandeepmistry / node-6lowpan-ble

MIT License
2 stars 2 forks source link

Progress - Examples, work to be done? #1

Closed brycejacobs closed 8 years ago

brycejacobs commented 8 years ago

Hey @sandeepmistry ,

Have you done any testing on this yet? Do you need any help? I'm interested in trying this out on some Intel Edison's and Beaglebone's that I have lying around.

Bryce

sandeepmistry commented 8 years ago

This repo is highly experimental at this point in time, I've pushed my latest changes.

You can try it out with 2 Linux devices:

"node":

  1. Clone this repo.
  2. Run npm install
  3. Replace node_modules/bleno with the latest master version (latest changes are not on npm).
  4. Run sudo hciconfig hci0 down && sudo node index.js

"router"

  1. Switch to root user.
  2. Run mod probe bluetooth_6lowpan
  3. Run hcitool lescan to get BT address of "node"
  4. Run echo "connect 7C:C7:08:60:46:CC 1" > /sys/kernel/debug/bluetooth/6lowpan_control (swap address with one obtained from step 3)
  5. Run ifconfig, new bt0 interface will appear. You should see some printouts on the "node" side
  6. Run ping6 -I bt0 fe80::2C7:08ff:fe60:46CC (again swap address). You should see more print outs on the "node" side.

Basically all the above does is exchange 6lowpan packets over a BLE link, and parses the header on the other side. The Linux 6lowpan stack is used in one side, while the other side uses this module. Of course you can use the kernel stack on both sides and have something fully functional.

There's a ton of work that needs to be done, including:

I'd like to then glue to above together with existing Node.js COAP and MQTT implementations.

brycejacobs commented 8 years ago

I'll see about looking into some of these this weekend if I have some free time.

sandeepmistry commented 8 years ago

Closing this for now ...