To identify what kind of modem that is connected on a serial port, you can use AT commands
ATI Request Identification Information
AT+GMI Request Manufacturer Identification
AT+GMM Request Model Identification
AT+GMR Request Revision Identification
AT+GOI Request Global Object Identification
AT+GSN Request Product Serial Number Identification
AT+CGMI Request Manufacturer Identification
AT+CGMM Request Model Identification
AT+CGMR Request Revision Identification
AT+CGSN Request Product Serial Number Identification
AT+CIMI Request international mobile subscriber identity
With regards to determining which of dualsim, there is no standardised way of doing this.
If you are really adventurous and not afraid of entering into the unintuitive and nothing-is-easily-understandable-documented land of SIM (using AT+CSIM/AT+CRSM), you could possibly find some useful information in some EF (but I mention this option more or less just for completeness...).