I'm using a serial cable bought from RedPark(ios device to RS232) for my first project. I already got it to work by sending and receiving data.(Not too far yet.) How I want my app to work is iphone acts as Master in the communication by sending commands and external device reply with the data required.
And lots of times, I need to ask for several data package at a same time.
I ran into a problem that is the readByteAvaible() provided by RedPark, event driven, So I can't send several commands together in viewDidLoad or other methods. I've tried different ways to get all the packages I need. Like multithread. None of them works. From the library FAQ, it's said "you must be returned to your run loop before these are processed".
I'm still fairly new to objective C, and still feel a little confused. Can anyone tell me how to achieve this? Or maybe some information about main run loop of objective C?