Skip to content

Commit

Permalink
0.1.7-70
Browse files Browse the repository at this point in the history
bugs fix
  • Loading branch information
mephist-cne committed Mar 15, 2024
1 parent 115c27a commit 28a6715
Show file tree
Hide file tree
Showing 28 changed files with 1,537 additions and 172 deletions.
Binary file removed APK Release/CS710SCSDemo0.1.6-060.apk
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ private void TagRangingThreadProc_CS108()
if (m_rdr_opt_parms.TagRanging.fastid)
Value |= 0x20;
MacWriteRegister(MACREGISTER.HST_IMPINJ_EXTENSIONS, Value);
// Set up the access bank register
Value = (UInt32)(m_rdr_opt_parms.TagRanging.bank1) | (UInt32)(((int)m_rdr_opt_parms.TagRanging.bank2) << 2);

// Set up the access bank register
Value = (UInt32)(m_rdr_opt_parms.TagRanging.bank1) | (UInt32)(((int)m_rdr_opt_parms.TagRanging.bank2) << 2);
MacWriteRegister(MACREGISTER.HST_TAGACC_BANK, Value);

// Set up the access pointer register (tells the offset)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ bool R2000Packet_NewInventory(byte[] recvData, int offset = 0)
info.pc = (UInt16)(recvData[newInventoryPacketOffset] << 8 | recvData[newInventoryPacketOffset + 1]);
int epcbytelen = ((info.pc & 0xf800) >> 11) * 2;

if (epcbytelen == 0)
return false;

if ((newInventoryPacketOffset + epcbytelen + 1) >= recvData.Length)
return false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,14 @@ internal Result StartOperation_CS710S(Operation opertion)
}
break;

case Operation.TAG_PREFILTER:
case Operation.TAG_SELECTED:
// Set Q = 1
SetFixedQParms_CS710S(1, 1);
// Set
TagSelected_CS710S();
break;

case Operation.TAG_PREFILTER:
TagSelected_CS710S();
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,55 +112,60 @@ public MODEL GetModel()
return m_oem_machine;
}

/*
public string GetCountryCode()
public uint GetCountry()
{
m_save_country_code = 2;
m_oem_freq_modification_flag = 0;
string country = "-" + m_save_country_code.ToString();
switch (m_save_country_code)
{
case 2:
if (m_oem_freq_modification_flag == 0)
{
country += " RW";
}
else
return m_oem_country_code;
}

/*
public string GetCountryCode()
{
m_save_country_code = 2;
m_oem_freq_modification_flag = 0;
string country = "-" + m_save_country_code.ToString();
switch (m_save_country_code)
{
switch (m_oem_special_country_version)
{
case 0x4f464341:
country += " OFCA";
break;
case 0x2a2a4153:
country += " AS";
break;
case 0x2a2a4e5a:
country += " NZ";
break;
case 0x20937846:
country += " ZA";
break;
case 0x2A2A5347:
country += " SG";
break;
}
}
break;
case 2:
if (m_oem_freq_modification_flag == 0)
{
country += " RW";
}
else
{
switch (m_oem_special_country_version)
{
case 0x4f464341:
country += " OFCA";
break;
case 0x2a2a4153:
country += " AS";
break;
case 0x2a2a4e5a:
country += " NZ";
break;
case 0x20937846:
country += " ZA";
break;
case 0x2A2A5347:
country += " SG";
break;
}
}
break;
case 8:
switch (m_oem_special_country_version)
{
case 0x2A4A5036:
country += " JP6";
case 8:
switch (m_oem_special_country_version)
{
case 0x2A4A5036:
country += " JP6";
break;
}
break;
}
break;
}
return country;
}
*/
return country;
}
*/

public string GetPCBAssemblyCode()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1659,11 +1659,11 @@ void SaveInitRegisters(int index, byte[]data, int size)
switch (m_oem_country_code)
{
case 0x01:
m_save_region_code = RegionCode.FCC;
m_save_region_code = RegionCode.ETSI;
break;

case 0x02:
m_save_region_code = RegionCode.ETSI;
m_save_region_code = RegionCode.FCC;
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="csl.CS710Sfulldemo.demo" android:installLocation="preferExternal" android:versionName="0.1.6" android:versionCode="61">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="csl.CS710Sfulldemo.demo" android:installLocation="preferExternal" android:versionName="0.1.7" android:versionCode="70">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
<application android:label="CS710S C# Reader" android:icon="@drawable/icon" android:theme="@style/MyTheme"></application>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
Expand Down
9 changes: 6 additions & 3 deletions MobileMvxApp/BLE.Client/BLE.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@

<ItemGroup>
<Compile Remove="PagesViewModelsSet\NewFolder1\**" />
<Compile Remove="PagesViewModelsSet\NewFolder\**" />
<EmbeddedResource Remove="PagesViewModelsSet\NewFolder1\**" />
<EmbeddedResource Remove="PagesViewModelsSet\NewFolder\**" />
<None Remove="PagesViewModelsSet\NewFolder1\**" />
<None Remove="PagesViewModelsSet\NewFolder\**" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -52,6 +49,9 @@
<ProjectReference Include="..\..\Library\CSLibrary\CSLibrary2024-NETStandard.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="PagesViewModelsSet\SpecialFuction\ASYGN\PageAsygnInventory.xaml.cs">
<DependentUpon>PageAsygnInventory.xaml</DependentUpon>
</Compile>
<Compile Update="PagesViewModelsSet\SpecialFuction\ImpinjSpecialFeatures\PageImpinjSpecialFeaturesProtectedMode.xaml.cs">
<DependentUpon>PageImpinjSpecialFeaturesProtectedMode.xaml</DependentUpon>
</Compile>
Expand All @@ -66,6 +66,9 @@
<Compile Update="PagesViewModelsSet\SpecialFuction\LEDTag\LEDTag.xaml.cs">
<DependentUpon>LEDTag.xaml</DependentUpon>
</Compile>
<Compile Update="PagesViewModelsSet\SpecialFuction\LEDTag\PageLEDTagWithGeiger.xaml.cs">
<DependentUpon>PageLEDTagWithGeiger.xaml</DependentUpon>
</Compile>
<Compile Update="PagesViewModelsSet\SpecialFuction\LEDTag\PageLEDTagWithInventory.xaml.cs">
<SubType>Code</SubType>
<DependentUpon>PageLEDTagWithInventory.xaml</DependentUpon>
Expand Down
26 changes: 22 additions & 4 deletions MobileMvxApp/BLE.Client/BleMvxApplication.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.ComponentModel.Design;
using System.Threading.Tasks;
using BLE.Client.ViewModels;
using CSLibrary;
Expand All @@ -9,6 +10,7 @@
using MvvmCross.ViewModels;
using Newtonsoft.Json;
using PCLStorage;
using Plugin.BLE.Abstractions.Contracts;
using Xamarin.Forms;
using static CSLibrary.RFIDDEVICE;

Expand All @@ -35,6 +37,7 @@ public enum FUNCTION

public string readerID = ""; // device GUID
public MODEL readerModel = MODEL.UNKNOWN;
public int country = 0;

public int BatteryLevelIndicatorFormat = 1; // 0 = voltage, other = percentage

Expand Down Expand Up @@ -143,10 +146,20 @@ public CONFIG(MODEL model)
RFID_OperationMode = CSLibrary.Constants.RadioOperationMode.CONTINUOUS;
RFID_TagGroup = new CSLibrary.Structures.TagGroup(CSLibrary.Constants.Selected.ALL, CSLibrary.Constants.Session.S0, CSLibrary.Constants.SessionTarget.A);
RFID_Algorithm = CSLibrary.Constants.SingulationAlgorithm.DYNAMICQ;
if (model == MODEL.CS710S)
RFID_Profile = 345;
else
RFID_Profile = 1;
switch (model)
{
case MODEL.CS710S:
// Set profile to 241 if CS710S-1 in application
// if (country == 1)
// RFID_Profile = 241;
// else
RFID_Profile = 244;
break;

default:
RFID_Profile = 1;
break;
}

RFID_DynamicQParms = new CSLibrary.Structures.DynamicQParms();
RFID_DynamicQParms.minQValue = 0;
Expand Down Expand Up @@ -220,6 +233,9 @@ public class BleMvxApplication : MvxApplication
static public HighLevelInterface _reader = new HighLevelInterface();
public static CONFIG _config;

// System
public static IDevice _deviceinfo;

// for Geiger and Read/Write
public static string _SELECT_EPC = "";
public static string _SELECT_TID = "";
Expand Down Expand Up @@ -351,9 +367,11 @@ static public void ResetConfig(uint port = 1)
{
var readerID = _config.readerID;
var readerModel = _config.readerModel;
var country = _config.country;
_config = new CONFIG(_config.readerModel);
_config.readerID = readerID;
_config.readerModel = readerModel;
_config.country = country;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,7 @@ void InventorySetting()
BleMvxApplication._reader.rfid.Options.TagRanging.compactmode = true;
BleMvxApplication._reader.rfid.Options.TagRanging.focus = BleMvxApplication._config.RFID_Focus;
BleMvxApplication._reader.rfid.Options.TagRanging.fastid = BleMvxApplication._config.RFID_FastId;
BleMvxApplication._reader.rfid.Options.TagRanging.compactmode = true;

// if CS108 enable fast ID, please use compactmode = false (slow speed)
if (BleMvxApplication._config.RFID_FastId)
if (BleMvxApplication._reader.rfid.GetModel() == CSLibrary.RFIDDEVICE.MODEL.CS108)
BleMvxApplication._reader.rfid.Options.TagRanging.compactmode = false;

BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_PRERANGING);

// Set Power setting and clone antenna 0 setting to other antennas
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8" ?>
<views:MvxContentPage x:TypeArguments="viewModels:ViewModelAsygnInventory"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:MvvmCross.Forms.Views;assembly=MvvmCross.Forms"
xmlns:viewModels="clr-namespace:BLE.Client.ViewModels;assembly=BLE.Client"
x:Class="BLE.Client.Pages.PageAsygnInventory"
Title="Asygn Temp Tag Inventory">

<StackLayout>

<ListView x:Name="liewViewTagData" ItemsSource="{Binding TagInfoList}" ItemSelected="OnItemSelected" HasUnevenRows="true" >

<ListView.Header>
<StackLayout Padding="10,5,0,5" BackgroundColor="#cccccc">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*" />
<ColumnDefinition Width="0.2*" />
</Grid.ColumnDefinitions>
<Label Text="EPC" VerticalTextAlignment="Center" FontSize="Small" />
<Label Grid.Column="1" Text="RSSI" VerticalTextAlignment="Center" HorizontalTextAlignment="Start" FontSize="Small" />
</Grid>
</StackLayout>
</ListView.Header>

<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Vertical">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*" />
<ColumnDefinition Width="0.2*" />
</Grid.ColumnDefinitions>
<Label Text="{Binding EPC}" VerticalTextAlignment="Center" FontSize="Small" />
<Label Grid.Column="1" Text="{Binding RSSI}" VerticalTextAlignment="Center" HorizontalTextAlignment="Start" />
</Grid>

<Label Text="{Binding Bank1Data}" VerticalTextAlignment="Center" FontSize="Small" />
<Label Text="{Binding Bank2Data}" VerticalTextAlignment="Center" FontSize="Small" />

</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>

</ListView>

<StackLayout Orientation="Vertical" VerticalOptions="EndAndExpand" >

<Button Text= "{Binding startInventoryButtonText}" Font="Large" Command="{Binding OnStartInventoryButtonCommand}" />
<Button Text="Clear" Font="Large" Command="{Binding OnClearButtonCommand}" />

<StackLayout Orientation="Horizontal">

<Label Text="{Binding FilterIndicator}" Font="Small" TextColor="Red" HorizontalOptions="Start" VerticalTextAlignment="End"/>
<Label Text="{Binding InventoryTime}" Font="Small" HorizontalOptions="CenterAndExpand" VerticalOptions="End" />

</StackLayout>

<StackLayout Orientation="Horizontal">

<Label Text="{Binding numberOfTagsText}" Font="Small" HorizontalOptions="StartAndExpand" VerticalOptions="CenterAndExpand" />
<Label Text="{Binding labelVoltage}" Font="Small" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" />
<Label Text="{Binding tagPerSecondText}" Font="Small" HorizontalOptions="EndAndExpand" VerticalOptions="CenterAndExpand" />

</StackLayout>
</StackLayout>

</StackLayout>
</views:MvxContentPage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BLE.Client.Pages;
using BLE.Client.ViewModels;
using MvvmCross.Forms.Views;
using Xamarin.Forms;

namespace BLE.Client.Pages
{
public partial class PageAsygnInventory : MvxContentPage<ViewModelAsygnInventory>
{
public PageAsygnInventory()
{
InitializeComponent();
}

public async void OnItemSelected(object sender, SelectedItemChangedEventArgs e)
{
var answer = await DisplayAlert("Select Tag", "Selected Tag for Read/Write and Geiger search", "OK", "Cancel");

if (answer)
{
//BLE.Client.ViewModels.ViewModelInventorynScan.TagInfo Items = (BLE.Client.ViewModels.ViewModelInventorynScan.TagInfo)e.SelectedItem;
TagInfoViewModel Items = (TagInfoViewModel)e.SelectedItem;

BleMvxApplication._SELECT_EPC = Items.EPC;
BleMvxApplication._SELECT_PC = Items.PC;

if ((BleMvxApplication._config.RFID_MBI_MultiBank1Enable && BleMvxApplication._config.RFID_MBI_MultiBank1 == CSLibrary.Constants.MemoryBank.TID) ||
(!BleMvxApplication._config.RFID_MBI_MultiBank1Enable && BleMvxApplication._config.RFID_MBI_MultiBank2Enable && BleMvxApplication._config.RFID_MBI_MultiBank2 == CSLibrary.Constants.MemoryBank.TID))
BleMvxApplication._SELECT_TID = Items.Bank1Data;
else if (BleMvxApplication._config.RFID_MBI_MultiBank2Enable && BleMvxApplication._config.RFID_MBI_MultiBank2 == CSLibrary.Constants.MemoryBank.TID)
BleMvxApplication._SELECT_TID = Items.Bank2Data;
}
}
}
}
Loading

0 comments on commit 28a6715

Please sign in to comment.