Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

MAC library issue

Rank

Total Posts: 22

Joined 2015-01-28

PM

is their any function working ok on mac library.
i am using EI Capitan OS, and using latest MAC library.

I am using two channels, and i want to close one ant channel.
closechannel is not at all working fine.
it reset and connect once again.

when i am using 2 ant channels, one channels always fail to receive 1 messages between 5 to 6 messages.
and only that channels have greater failure or timeout for human interference.
so i decided to work on one channel on one screen.
and i cant do here closing of channel .
can you please help me support of this library, which does not work for what is name for.
     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

Are you using the static library or the dynamic library? I'm using the "demo_lib" static lib application and it seems to be opening and closing at least a single channel properly (on OS X Sierra). Could you turn on logging and give a sample of the issue?

Thanks      
Rank

Total Posts: 22

Joined 2015-01-28

PM

1) Yes , we are using static library. channel closing not working properly means single channel cannot close ,it will close all channels and sometimes another channel will reset.
2) When both channels are opened, one channel gets rx fails most of the time .
3) I have tried to set Transmit Power to max value 0 dBm or 4 dBm(3/4 value in library). but i didn't see much improvement in rx_fails reduction. i also tried for setProximitySearch to max 10 value, it also does not affect.
4) Major rx-fails i have observed due to human interference also. distance does not matter , sometimes it comes in 1m range ,sometimes 1.5 meter or 2 meter.
The major consequences for rx-fail in our App is sometimes it will reset channel. broadcasting also we need to do 2 to 3 times.
We have used Windows and Android ANT+ library, and i didn't get single rx_fail problem .
please suggest for this solution, i have attached images(log details) and code snippet (for possible channel setting i have tried).

     
Rank

Total Posts: 22

Joined 2015-01-28

PM

please see below link for attached images and code snippet ,

https://drive.google.com/drive/folders/0Bx0kGChmcM8BcWgxZWNMQ2xwNEU?usp=sharing      
Rank

Total Posts: 22

Joined 2015-01-28

PM

please find attached images for rssi value reading by both android and MAC library,

i can read rssi value in android ,but in mac i cant get rssi value      

Image Attachments

android_rssi.pngrssi.png

Click thumbnail to see full-size image

Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Are you running a master or a slave channel from the Mac?
Which USB stick are you using?
Is the range only an issue when using Mac?

The USB-m and USB2 devices do not support RSSI.      
Rank

Total Posts: 22

Joined 2015-01-28

PM

1) We are running slave channel from MAC.
2) We used ant sticks USB 2 and USB-m both ,with android and mac library
we have used USB 2 Ant stick with android library, it displays RSSI data .
but same is not works (displays) with MAC library(as i have shown in attached image).
3) The main issue we are facing is more and more Rx-failure when i use 2 channels at a time.
i have observed Rx-failure only on one channel which is bidirectional.
Second channel which is only on receive mode doesn't fails not even a single time.

so , for temporary solution, we have tried to open single channel on single screen(when we move from second screen to first screen, channel which has been open with second screen will close) but at that time also, Rx-fail occurs more on first channel, when second channel close, sometimes we have observed this due to human interference also.
Further, i am not able have proper communication even for 1.5 meter range. This is not the case with Android or Windows library.
4) To solve this issue, we assume transmit power may be less, so we have tried to set transmit function ,which is also not responding or changing behavior,
we have tried setProximitySearch to set high range,which is also not responding or changing behavior,.
so, at last we tried to read RSSI data, which in results as above.
can we please suggest, how should we read response for these functions. because we tried to read return value , for wrong parameter value also , it return true. means , i have set transmit power to 3 and 10, at both time it returns true .

Note: Can we have communication from mail so that we can have faster response from each other. we are already behind the schedule. my mail id is :[email protected]      

Image Attachments

android_rssi.pngrssi2.png

Click thumbnail to see full-size image

Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Have you tried changing the orientation of the Mac, or have you used a USB extension cable to bring the stick away from the case? As you are running a slave channel, nothing in software could affect the receive sensitivity of the USB2 stick, only changes in the physical space could cause range issues compared to other devices.

USB2's certainly do not support RSSI, they are able to pass a value which goes up and down somewhat which is tied to priority bins, but it is not an actual RSSI value. For real RSSI you must use a UIF board with a module mounted.

Are you using the Lib Config (6E) command to set the extended messages?

Direct support (including e-mail and phone) is available for ANT+ Members.      
Rank

Total Posts: 22

Joined 2015-01-28

PM

We have not used any USB extension, USB 2 is directly connected to case.

If Orientation or Physical space or as i have observed Human interference also affecting Rx_failure,then as i told, in Android library or Windows library their is no any failure , those libraries support much better range and will not fails.i am unable to define working wireless range.

Is set Transmit Power , setProximitySearch functions are not working in MAC library?
Rs_fail is because of sensitivity of USB 2.then USB 2 work well with Windows and Android Library.

I have used Lib Config (6E) command to set the extended messages.
I have tried all possible setting with values 0x40,0xe0 etc for id, RSSI, time stamp value.

Now, we have only one temporary solution ,as to keep line of sight and in as near as possible.
Is it like Mac library support single channel only?
Can we have two channels configuration library?
and last one why their is another channels which not fails single time?

     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

I would advise trying to use a USB extension cable to bring the device away from the body of the Mac. Do you have a "DeviceX_0.txt" log to share?

These functions seem to work in the Mac Library on Sierra, if you compare the Mac and Windows library they do not differ significantly except for the USB interface layer.

Do you have an Xcode project you could link? We have been unable to reproduce your issues here.      
Rank

Total Posts: 22

Joined 2015-01-28

PM

We can store log in Ant ware,but i don't know whether we can do it in Windows /MAC library.
I have attached log messages screen shots all ready.

Sir, I have shared all the details in mail.
     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

As I mentioned earlier, I can only support you here. If you are using the Demo code as a template, please be aware it was only written for a single channel. If you are attempting to support multiple channels, you must have separate code for each channel to handle managing each channel and received messages.

switch(channel_number)
{
   
switch(message_type)
   
{
      
...
   
}


The library cannot affect the physical range of a slave channel. Received signal strength is entirely hardware dependent, and I cannot replicate your issues here. Furthermore, the library cannot affect the firmware on the device, in that it only communicates with it over the serial bus and does no reprogramming to the device which could affect the range. Your issues must be related to the physical environment. Even plugging the USB stick into the back instead of the front of the machine can cause drastic changes in physical range.

Again, I advise:

1. To test on multiple Mac machines in multiple orientations with differing arrangements for the USB stick.
2. To separate your channel handling code based upon the channel number, and not to use the demo code as a strict template. I suspect the channel handling is causing a great number of your issues.
3. That the USB sticks do not support RSSI, and it's not a useful tool anyway here. The library itself cannot be responsible for changes in physical range for a slave channel, and your attempts to change the transmit power should also be demonstrating that.