Guest User

Untitled

a guest
Jun 30th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. Forum didn't allow me to edit the previous message. This is the full message
  2.  
  3. ---
  4.  
  5. [QUOTE=Coleman.ConnectIQ;n1226674]The Edge 820 should be able to communicate with an ANT device without any real issue. Can you give us any snippits of code so we can try and help you see what's going on? If it is working in the sim, then we might have a bug in the device implementation or in the sim. My initial guess is that it has something to do with the type of pairing.You are doing.
  6.  
  7. Some sensors must be paired through the native system pairing process for a device first before you are given access. Some will connect directly with an app. We would really need to see some of the code and get some more info about the issue to diagnose it.
  8.  
  9. Thanks,
  10. -Coleman[/QUOTE]
  11. No pairing is needed for this device (custom hardware). I tested the firmware with the ANTWareII application.
  12.  
  13. Here is the part where i setup the ANT connection
  14.  
  15. [CODE]
  16. chanAssign = new Ant.ChannelAssignment(Ant.CHANNEL_TYPE_TX_NOT_RX, Ant.NETWORK_PRIVATE);
  17. GenericChannel.initialize(method(:onMessageReceived), chanAssign);
  18.  
  19. // setup ant configuration
  20. antDeviceConfig = new Ant.DeviceConfig({
  21. : deviceNumber => 0,
  22. : deviceType => 1,
  23. : transmissionType => 1,
  24. : messagePeriod => 3276,
  25. : radioFrequency => 66,
  26. : searchTimeroutLowPriority => 2, // measured in 2.5s increments. So it's 25 seconds
  27. : searchTimeroutHighPriority => 2,
  28. : searchThreshhold => 0
  29. });
  30.  
  31. // and set it
  32. GenericChannel.setDeviceConfig(antDeviceConfig);
  33.  
  34. System.println("SENSOR INITIALIZED");
  35. [/CODE]
  36.  
  37.  
  38. and I open the connection with
  39.  
  40. [CODE]
  41. var opened = GenericChannel.open();
  42. System.println("OPENING: " + opened);
  43.  
  44. if (opened) {
  45. System.println("SETTING PAYLOAD AND SENDING");
  46.  
  47. // send test msg
  48. var payload = new [8];
  49. payload[0] = 0xFA; // start
  50. payload[1] = 0;
  51. payload[2] = 0;
  52. payload[3] = 0;
  53. payload[4] = 0;
  54. payload[5] = 0;
  55. payload[6] = 0;
  56. payload[7] = 0;
  57.  
  58. // Form and send the message
  59. var message = new Ant.Message();
  60. message.setPayload(payload);
  61. GenericChannel.sendBroadcast(message);
  62. }
  63. [/CODE]
  64.  
  65.  
  66. Have I done something wrong?
Advertisement
Add Comment
Please, Sign In to add comment