Serial obj doesn't see COM ports in Windows [HC-06 bluetooth+arduino]
Hi all! I'm new in the forum but I follow you since long time. I always found solutions but this time I cannot go straight to this problem:
I've connected Arduino to Max via HC-06 bluetooth module with [serial] object. On my Mac anythings it's ok, I can easily get serial data from the port, opening and closing it whenever I want!
On Windows, the same Max patch cannot see the HC-06 serial port that i correctly installed, even if I force the COM number of the port and the correct baud rate. If I use "print" message I realize that Max cannot see my port but only shows port which has no "dev B" service for communication (in windows the BT module is installed with two COM ports, only one with 'dev B' capabilities). Obviously, that port is useless, I need the other one.
I tried with vvvv, puredata and several serial monitors, they all can see my port and receive data. Only Max ignores it...what is wrong with the [serial] obj? Sometimes the port is recognized. I can use it once but, if I disconnect, Max loses it until I remove the device and install it again (not suitable).
I run win7 x64 on Macbook pro, native partition.
thanks
nobody can help? no one tried to connect a BT device to Max in windows? :(
I had a similar problem with Mac Os and max 7
I sitch to Xbee and so far works great.
Thanks Balam,
unfortunately we cannot switch to Xbee cause our device is almost fully engineered and by now it works with every software we need; only Max is still refusing to see the COM, but now it's too late to change our mind...and Max still remain a "key" software for us...I hope a solution exists...
I ordered a brand new HC-06 and I'm going to try it without AT customization...we are desperate ;)
Hi, attached are some alternative serial objects for Windows (32- and 64-bit) which can replace the release versions (put them in a safe place, though) for those who are interested in trying something new. @modular drops has had a chance to play with them already, but it would be a good idea to get a few more folks grinding on them if possible. These use a more robust method for finding the serial ports on the system, and provide more useful information in response to the 'print' message. The actual serial connection code hasn't changed.
jb
I was just foruming and found this object link = comport object
Jeremy, is there a chance we could get such an updated object in max 6.1 ? I tried the provided mxe but it seems to work only in max7 (legit) which I'm not moving to immediately.
I'm desperate too, I've been trying to implement a BT connection for a year now, without success.
I'm using win8.1 x64, max 6.1.8 (can upgrade to 6.1.9 if necessary)
On another note, as a followup to my request for max 6 : I've tested the new object from JB above in max 7 with my existing patch that works with wired serial over USB (actual FTDI cable). My USB port (COM2) isn't listed with the new object, while the BT ports (there are 2 of those, COM10 and 11 for me) are. I can select the COM11 but the connection to the module isn't established.
I've got that issue with all my computers (and probably since max 5) with all BT modules I've used, from freetomove to the recent HC-05 or HC-06 modules. Even the bluefruit from adafruit doesn't work. All other serial terminal software that I've used work and actually connect to the port / initiate the opening of the port but for some reason that doesn't work with max. I've had the problem with both vista, win7 and now win8. The phone app I'm developping aside is connecting to all modules I've tried so far.
I'm desperate, I really need to have both the phone app and the computer app to both be able to connect to my device. Thanks !
Hi, I am a little confused by your description. It works in Max 7 or it doesn't?
I'll look into a Max 6 version, but it sounds like I need to order one of these modules in order to determine the cause of the communication problems.
Jeremy
apologies for the confusion, if any. It doesn't work in max7 for me at least. Object instantiate, list both BT ports, but none of them connect to the BT module (currently using a JY-MCU that has a HC-06 firmware, simplified AT commands and slave only). The new serial objects also ignores my regular USB serial port (COM2) which appear in both max 6 and 7 with the stock serial object.
Happy to help debugging that actively. flety@ircam.fr if needed ! cheers !
OK, my HC-06s arrived and I decided to take a day off from my vacation to play with them. Results attached. It turns out the the way I was iterating ports in the previous version was breaking the serial services of the bluetooth devices, as documented here: http://stackoverflow.com/questions/21119988/windows-7-wmic-query-of-win32-serialport-causes-bluetooth-devices-to-lose-their -- not sure why MS recommends this method when it simply doesn't work. I guess it works for other stuff.
In any case, the attached objects are properly connecting to and communicating with my Arduino Uno via HC-06 bluetooth. I've managed to simplify some of the COM port setup, as well, which may improve the speed and reliability of opening ports, but YMMV.
Jeremy
Hey Jeremy,
I tested your latest serial obj, the x64 one on Max 7. It's definitely a huge step ahead, because I noticed remarkable improvements;this time I can easily connect and disconnect without shutting off my device, with "open" and "close" commands. This is a great news, now it is robust enough! In addition, Max can comunicate with my Hc-06 (which is internally 57600 bps) with any lower bps (I tried setting baudrate 9600 and communication is very good) even if COM port in Win is setted to 57600. I'm going to try It with Max 6, both x86,x64...I'll give you update.
you rock man!
Attached are some Max 7-compatible serial objects (OSX and Windows) which add non-deferral and polling of output as options.
@defer (default = 1), set to 0, bangs to the object in the timer thread will cause immediate read/output, rather than deferring to the main thread (the legacy behavior).
@poll (default = 0.), set to >0, automatically polls the serial port for new data at the rate specified (the user need not bang the object). Note that polling is "quiet", so you only get output if data could be read, or if there was an error.
I won't be making Max 6 versions of these new features, though.
Jeremy
Hi, why is the serial object not working at 250 Kb rate? This in Max7 too!!
For jeremy: your Seral obj is not workin...Max says Serial has no main function
You know that 'serial' is shipped with Max, right? The features above are in the official version.
Yes I know!!!!!!!!!! And the feature is that it's not working over 115200 baud rate... ftdi driver supports 250000 and I have a device to control that use this rate!
OK, so it's a feature request. What device is it?
EDIT: actually, you can send a 'baud 256000' message to the serial object and work around the fact that the inspector doesn't offer your preferred rate. I'll add some faster speeds to the menu for convenience, though.
Hi Jeremy,
nice to know that the normal serial obj supports this speed....will try it just now.(both on Max 6.1.8 and Max 7)
The device is a Summing unit from Teknosign. This speed is do to the fact that the device transmit also the values for 16 + 1 stereo vu meters, and has to be very fast.
Have to try it with the unit attached... will post some pictures and snapshots
Many thanks!
That's not a limitation of the serial object, but of the usb serial driver, as best as I can tell. I'll make a note to investigate this further (I have some FTDI hardware, as well), but it might be a while. Sorry to disappoint.
However, this article seems to apply to you: https://spin.atomicobject.com/2013/06/23/baud-rates-ftdi-driver-mac/ and might help you solve your problem in the short term.