On 29 January 2013 16:14, Simeon Obwogo via SMSLib Discussion Group <smslib+noreply-apn2wqddux9umbisawkc8mnbgatghvawk6mpfusp91pfnd...@googlegroups.com> wrote: > Hello Guys, > Is there a way to make the program that you are developing to automatically > detect which port the modem is connected to instead of you having to go to > my computer then manage to pick out the port and put it in code. I'm sure > you wouldn't want your clients to do that every time.
I suspect this is built in to SMSLib, but if not here's a lib we use, which was adapted from SMSLib port tester: https://github.com/frontlinesms/at-modem-detector The main access is through `AllModemsDetector` (https://github.com/frontlinesms/at-modem-detector/blob/master/src/main/java/net/frontlinesms/messaging/AllModemsDetector.java) e.g. AllModemsDetector d = new AllModemsDetector(); d.refresh(); d.waitUntilDetectionComplete(); for(ATDeviceDetector a: d.getDetectors()) { // ... do something with the detected ports ... } -- You received this message because you are subscribed to the Google Groups "SMSLib Discussion Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
