Cubecell USB Comms


Has anyone been able to serial communicate to the CubeCell from another board?

Sorry for the long post but the serial journey with CubeCell has been complicated for me.

I have been trying to get my Teensy to talk to my Cubecell board (teensy = touch sensors and a homemade NE555 timer). My first issue was scrambled serial data with my CubeCell plugged into my computer. I resolved this issue by lowering the baud rate and added a slight delay(9) to my serial read command. So far so good. Works when Cubecell is plugged into my computer and sending long messages.

With the above fixed I happily plug both boards together and try to send some data but this does not work as expected. The Teensy is connected to the CubeCell via an OTA USB cable (male to male). However if I serial.print from Teensy I do not see any messages reaching the Cubecell. Just a simple serial.print on the Teensy and a on the CubeCell. I tried this on 2 different Teensy and Cubecell board combinations with no luck. So then I keep connected the 2 boards via OTA USB cable AND connect the boards’ vss and ground pins AND RX/TX pins from Teensy to the Cubecell PINS 7/8 (fyi these are the grayed out RX/TX pins in the pinout diagram). These 2 pins for RX/TX on the Cubecell apparently do not do anything as the Cubecell chip only has 1 UART (the USB). That is why I tried just to connect these boards via the OTA cable. When this did not work I decided to try the RX/TX method. FYI I use RX/TX comms for another project but to the Heltec ESP32 to Teensy RX/TX with no issues - works perfectly. To my surprise the CubeCell was able to communicate with the Teensy using the RX/TX for a short period of time, please read below.

During my testing using both boards connected via OTA USB cable, RX/TX pins, and +/- I discovered the following odd behavior. With the 2 board connected as described above if I unplug the Cubecell USB from the Teensy then plug the Cubecell into my computer, (with the RX/TX +/- still attached) then open the serial monitor and send any character via serial monitor I see the message getting to my Cubecell unscrambled (as expected) from the computer, BUT if at this point I unplug my CubeCell from the computer…this is the weird part…I get data sent to my CubeCell via PINS 8/9 with no USB cable attached! Yes just RX/TX pins 8/9 and +/- attaching the 2 boards. After some time however the messages stop coming over from Teensy to CubeCell. After this “timeout” I plug the Cubecell back into the computer and open the serial monitor I get Java lang NullPointer exception related to serial write. If I repeat this exercise to get the serial messages flowing but BEFORE the timeout click the reset button on the Cubecell I then have to unplug the boards again, plug the Cubcell back into my computer, open the serial monitor and send another test message to “prime” the serial communications.

Is there an easier way to serial communicate to the Cubecell from another custom board?



please have a look here:

Lol I created that topic. That thread is related to scrambled data.

This thread is related to using the UART via USB cable to send data to Cubecell from another board. Currently I cannot get any data from my Teensy board to Cubecell via the USB cable. USB only works from my computer to Cubcell. Also I found that data can be sent to Cubecell via pins 7/8 RX/TX. However both of these are not working properly.

i use the AT commands for communication between the CubeCell and an arduino for reading a gps and other Serial devices.
had no problems so far

Thanks for your response. How are you connecting the CubeCell to the Arduino?

Also how do to variable-ize the output from the Arduino. i.e. char read of AT command into a struct?

here you can find an example how to use AT commands:

i connect both with the rx/tx pins.
the arduino just get the data from the sensor and reformat it and send it with an at command to the cubecell

I uploaded your example but I get a format error when when sending any AT command from the Teensy to Cubecell via serial3 (on teensy) connected to the rx.tx pins on the Cubecell. See below.

Also you mentioned that the CubeCell and Arduino are connected via rx/tx. Are they also connected via a common ground?

Test commands sent: AT+SendStr=123 and AT+AppSKey=123
also tried
for both SendStr and AppSKey

Can you post the code from the Arduino with the AT command, that might help.



Dont have the code here right now.
But you need a common ground

Sending dont have to contain a carriage return at the end.
And if you dont send data for a given time the board goes to sleep and the first command will wake the board but gets not recognized.

I don’t use carriage return. Still not working for me - getting format error. I tried typing AT+SendStr=123 in the teensy serial monitor (with no line ending) but also doesn’t work. On the Cubecell I can open the serial monitor and type AT+SendStr=123 and it prints no problem. But from the Teensy it can’t send, baud rates are the same.

When you get a chance please post the arduino code that sends the AT command.