Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8299295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:05:51+00:00 2026-06-08T16:05:51+00:00

I have an RFID scanner attached to a RedPark serial cable connected to an

  • 0

I have an RFID scanner attached to a RedPark serial cable connected to an iPad app. When people scan their RFID cards, I get a callback with -readBytesAvailable:. However, sometimes it doesn’t give me the entire RFID in one call. Sometimes it send it in two calls.

How can I determine if I’ve received everything? When my code takes the first callback’s data and tries to use it, I get an error, because let’s say the RFID was “123456789” sometimes I’ll get one call with @”12″ and a second call with @”3456789″. So I try to process @”12″ and get a user not found error, then I try to process @”3456789″ and get a user not found error.

How can I tell if I’m done reading data? The lengths of the RFIDs can vary from vendor to vendor, so I can’t just assume I need to read a certain number of digits.

This is the method I use to receive the data from the scanner through the RedPark:

- (void) readBytesAvailable:(UInt32)length {
    NSLog(@"readBytesAvailable: %lu", length);

    UInt8 rxLoopBuff[LOOPBACK_TEST_LEN];
    [self.rfidManager read:rxLoopBuff Length:length];

    NSString *rfid = [[NSString alloc] initWithBytes:rxLoopBuff length:length encoding:NSUTF8StringEncoding];

    NSLog(@"rfid=%@", rfid);

    [self receivedScanOfRFID:rfid];

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T16:05:53+00:00Added an answer on June 8, 2026 at 4:05 pm

    Serial port gives you no control over packetization. Data is just a stream of bytes with no way to predict which bytes appear in each read call. You have to parse the data stream itself to interpret the contents and understand start/end of your messages. You either need to look for a reliable terminating character or potentially use a timeout approach where you do multiple reads until you get no more data for some period of time. I don’t recommend the timeout approach.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 readers for RFID and some cards (from a Chinese company called
I have a project that is using a 125Khz RFID cards,dots, stickers. I need
I have used the code below to read rfid tag values. try { if
I have am building a win forms app which will have a text box
Do RFID tags have a real processor capable of simple computations? If so, what
have been trying couple of hours now to make my iphone app universal. The
I have a RFID project, and wants the system to detect the card on
I have coding I almost always use with my Omnikey RFID CardMan 5321 smart
we have an APP, that uses many local resources, such as windows printing API,
I'm working on an project that involves an RFID reader. I have written a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.