So I read the source for Serial Monitor. Java. Ew.
Nothing.
Read the source for Serial. More Java. Ew.
Nothing.
Managed to find a hint to RxTx and downloaded the source for that, with a quick look at Serial Monitor behaviour when resetting (eg: select the same baud rate in the drop down to trigger a reset) and I think I have managed to work something out...
When things aren't panning out, I tend to do something that I know will work.
The memo annoys me, as the font (Courier New) should render every character with the same width, but this memo doesn't. Fancy shmancy. May revert to a vanilla memo and see if it fixes it. Later.
I compiled a sketch via command line today. It's possible I might reinvent the wheel and throw together a little windows editor for Arduino development...
It takes 32seconds to start the Tellurium monitor (latest, XP SP3). Maybe a similar issue as the one with the IDE and Bluetooth dongle connected (new rxtxSerial.dll needed)?
PS: it does not work with Bluetooth COMs. It shots down the BT COM driver (teraterm and IDE serial work fine via BT).
I have some hc-06 modules on their way, so I will be able to test this when they arrive.
I have caught up on the rxtx.dll stuff, but I am using the setupapi.dll which is a MS Windows DLL, not something I can really replace. I see one of the other terminal apps had a similar issue, and used registry readings instead, which is what I was doing previously. I am working through a design to use both as a failsafe mechanism. Quick startup time (and not locking up the computer when opening a comport) is very important.
My HC06 modules arrived and after spending yesterday trying to get them to work and having nothing but frustration and tourettes programming episodes (dramatised for your amusement) I was ready to forget about ever interfacing with the BT modules. Frustratement abounded.
A new day and renewed optimism had me looking at the BT setup, looking for data sheets, reading blog posts, investigating some BT-specific dev tools and finally biting the bullet and implementing an entirely new port enumeration methodology.
You can imagine my delight when it finally all came together, BT modules behaving themselves, ok my start up behaving itself and playing nice with BT modules, all working here and doing what they should.
Highly recommend you update to the new version if you want to connect to BT or have BT devices connected.
Pito: would really appreciate it if you could try the new version and let me know if it starts up properly, rather than bogging down, and that you can connect to your BT modules. I have managed to connect to HC06 modules but do not have HC05 firmware installed, so would be very interested in how you fare.
Looks like I may have spoken too soon. SPP service has disappeared from Properties --> Services tab for the HC06 devices. Not sure if that's due to my app or they just time out like little bitches.