serial communication on /dev/rfcomm0
in
Integration and Hardware
•
7 months ago
Hi,
I am trying to perform serial communication on between Ubuntu 12.04 and a JY-MCU bluetooth serial module connected to an Arduino.
I have created this configuration in /etc/bluetooth/rfcomm.conf
However, despite many attempts I simply cannot see how to create a serial port in Processing that works in any way.
For example :
I am trying to perform serial communication on between Ubuntu 12.04 and a JY-MCU bluetooth serial module connected to an Arduino.
I have created this configuration in /etc/bluetooth/rfcomm.conf
- rfcomm0 {
- # # Automatically bind the device at startup
- bind yes;
- # # Bluetooth address of the device
- device 00:12:11:19:08:54;
- # # RFCOMM channel for the connection
- channel 1;
- # # Description of the connection
- comment "Linvor Bluetooth Module";
- }
However, despite many attempts I simply cannot see how to create a serial port in Processing that works in any way.
For example :
- println(Serial.list());
prints nothing at all.
If I execute:
If I execute:
- String portName = "/dev/rfcomm0";
- myPort = new Serial(this, portName, 9600);
- println(myPort);
- processing.serial.Serial@1712651
But if I then call:
I can't understand why this fails. I have been following all the instructions from Tom Igoe's "Making Things Talk", but this just does not work the way he says...
Any help would b great!
Thanks,
Bob
- myPort.write('9');
I get an exception:
- java.lang.NullPointerException
- at processing.serial.Serial.write(Serial.java:572)
- ...
I can't understand why this fails. I have been following all the instructions from Tom Igoe's "Making Things Talk", but this just does not work the way he says...
Any help would b great!
Thanks,
Bob
1