Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Forum didn't allow me to edit the previous message. This is the full message
- ---
- [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.
- 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.
- Thanks,
- -Coleman[/QUOTE]
- No pairing is needed for this device (custom hardware). I tested the firmware with the ANTWareII application.
- Here is the part where i setup the ANT connection
- [CODE]
- chanAssign = new Ant.ChannelAssignment(Ant.CHANNEL_TYPE_TX_NOT_RX, Ant.NETWORK_PRIVATE);
- GenericChannel.initialize(method(:onMessageReceived), chanAssign);
- // setup ant configuration
- antDeviceConfig = new Ant.DeviceConfig({
- : deviceNumber => 0,
- : deviceType => 1,
- : transmissionType => 1,
- : messagePeriod => 3276,
- : radioFrequency => 66,
- : searchTimeroutLowPriority => 2, // measured in 2.5s increments. So it's 25 seconds
- : searchTimeroutHighPriority => 2,
- : searchThreshhold => 0
- });
- // and set it
- GenericChannel.setDeviceConfig(antDeviceConfig);
- System.println("SENSOR INITIALIZED");
- [/CODE]
- and I open the connection with
- [CODE]
- var opened = GenericChannel.open();
- System.println("OPENING: " + opened);
- if (opened) {
- System.println("SETTING PAYLOAD AND SENDING");
- // send test msg
- var payload = new [8];
- payload[0] = 0xFA; // start
- payload[1] = 0;
- payload[2] = 0;
- payload[3] = 0;
- payload[4] = 0;
- payload[5] = 0;
- payload[6] = 0;
- payload[7] = 0;
- // Form and send the message
- var message = new Ant.Message();
- message.setPayload(payload);
- GenericChannel.sendBroadcast(message);
- }
- [/CODE]
- Have I done something wrong?
Advertisement
Add Comment
Please, Sign In to add comment