My original idea was to sniff the 6 serial port and report each byte to the host with a preceeding byte indicating from where it was coming from. Like 01 37 would mean the byte 0x37 has been received from serial port number 1, 04 9A would represent the value 0x9A received from serial port number 4, etc. Also, my idea was to create a new status in response after the ACK (0x00) and NACK (0x05), something like NEWDATA (0x0A) which would represent a cctalk special packet that could arrive anytime between poll so host would know thta this was coming from sniffing.
Since Microchip and Harmony allow to relatively easily add serial port emulation for the PC, I decided to change a little the way sniffer port would be reported to host.
So now my target is this:
1. Have an emulated port that would be a kind of "Console Port" on which the host may communicate with NiceSpot to configure it, to get status from it, etc.
1. Have an emulated port that would be the sniffing result of ports 1 and 2.
1. Have an emulated port that would be the sniffing result of ports 3 and 4.
1. Have an emulated port that would be the sniffing result of ports 5 and 6.
For each of the last three, the same original idea of previously with a preceeding byte of 0x00 and 0x01 to indicate from which port it is coming from would be used.
All this will simplify the job on the PC side of knowing from where it's coming from. Same code could be re-use because it will be three times the same demultiplexage that will need to be done to determine the source of the sniffed byte. It would be simply from host-1 or device-2, three times instead of unmixe three host-x and three device-3.
All this possible with the possibility of emulating more than one serial port! Thank you Microchip and Harmony!