TEXT 13
Bluetooth.txt Guest on 25th June 2020 03:51:49 AM
  1. 1) Power up bluetooth chip:
  2.  
  3. echo 1 > /sys/bus/platform/devices/neo1973-pm-bt.0/power_on
  4. echo 0 > /sys/bus/platform/devices/neo1973-pm-bt.0/reset
  5.  
  6. 2) Load modules:
  7.  
  8. modprobe ohci-hcd
  9. modprobe hci_usb
  10. modprobe bluetooth
  11. modprobe bnep
  12.  
  13. 3) start hcid:
  14.  
  15. /etc/init.d/bluetooth start
  16.  
  17. 4) add passkey "1234" to /etc/bluetooth/hcid.conf
  18.  
  19. 5) configure network on phone side:
  20.  
  21. pand --listen --role NAP --master --autozap
  22. ifconfig bnep0 10.0.5.1 up
  23.  
  24. 6) configure network on PC side:
  25.  
  26. pand --connect 00:06:6E:16:EB:C6 --service NAP --autozap
  27. ifconfig bnep0 10.0.5.2 up
  28. ping 10.0.5.1
  29.  
  30. 7) Enable ip forwarding:
  31.  
  32. echo 1 > /proc/sys/net/ipv4/ip_forward
  33.  
  34. 8) Configure NAT on phone
  35.  
  36. iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
  37.  
  38. 9) Set routing on PC:
  39.  
  40. ip route add default via 10.0.5.2 dev bnep0

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.