stream data to excel (1 Viewer)

jmar

New member
Local time
Today, 19:05
Joined
Mar 23, 2024
Messages
5
I need to transmit data collected from a BT-909 (Bluethoot module) to Excel.
For this I use the modCOMM library - Written by: David M. Hitchner.
When I get it to recognize the BT909 module with a USB connection through port 6, everything works fine.
The problem is the first connection.
Testing with CoolTerm, I observed that when the BT909 module receives power it dumps information about it, then it is ready to establish communication.
At this point, if I disconnect CoolTerm and open the Excel sheet that contains modCOMM, I make the connection correctly.
But if I open the Excel sheet and try to connect the BT909 module, I cannot make the connection.
Could it be that the presentation data dump from the BT909 module fills the communication buffers???
In this case, how can I solve it? I am not an expert in VBA

thank you
 
I am building a photovoltaic energy system for my domestic use.
It is at 48v, therefore each panel charges its battery, controlled by its charger that sends data.
The data from the 4 batteries is collected by a microprocessor that sends them via Bluetooth to another Bluetooth module, working as master, which is the one who makes the request.
The Bluehot Master module is connected via USB to a PC, which in Excel, which with its library presents the data.
This works correctly.


The problem is the first connection.
Testing with CoolTerm, I observed that when the BT909 module receives power it dumps information about it, then it is ready to establish communication.
With CoolTerm, works fine, but I check manualy.

At this point, if I disconnect CoolTerm and open the Excel sheet that contains modCOMM, I make the connection correctly.

But if I open the Excel sheet in first time and try to connect the BT909 module, I cannot make the connection.

Could it be that the presentation data dump from the BT909 module fills the communication buffers???
In this case, how can I solve it? I am not an expert in VBA

thank you

I post the first message send by BT909 when receive power-up.
 
Hi. Just FYI, no need to post the same question multiple times. If you think it's in the wrong forum, you can report it, so we can move it. Good luck!

PS. I have merged two of your posts and deleted the duplicate thread.
 
By chance are you using Power Query to connect to the CoolTerm data dump?
 
By chance are you using Power Query to connect to the CoolTerm data dump?
Not.
When I make the first connexion with the module BT909 I don`t receive anything.
But if I make first the connexion with Coolterm then I disconnect the coolterm and connect with Excel, then works.
 

Attachments

You have to find out what you need to send to negotiate with your device, so it can send data.
That is down to the manufacturers of that device. Ask them.
 
I am creating a photovoltaic energy system for my use.
It works at 48v with 4 batteries in series. Each battery has its own charger, which I built, which receives power from its own panel.
With this I aim to always have the batteries equalized and the system works.
My problem begins when trying to send the charging data of these batteries to a PC, to record the evolution.
The data is collected by a uP and sent by Bluethoot with a BT-909 module.
These are received with another BT-909 module connected to a USB port of a PC, and an Excel sheet reads them.

To do this, I have used the modCOMM library implemented in an Excel sheet, which I found on the internet.

I'm not an expert in VBA, but I've gotten the system to work.
However, when I first try to connect the USB module to the Excel sheet, IT DOES NOT WORK and I get no response.
However, if the first connection was made through Coolterm and I sent AT to the BT909 module, it responds correctly, sending "OK". In this situation, without disconnecting the BT909 module from the port, I disconnect Coolterm and open and connect the Excel sheet, the transmissions are carried out correctly.

Could you give me some idea about what can happen in that first connection???
The truth is that I don't know where to go next and I don't know anyone who can help me...

I attach a pdf with screenshots of the process and the spreadsheet is half built, but with the communications completed.
 

Attachments

Dealing with hardware is not a core task of VBA.

I once had a task with a certain similarity. To use a scanner, you first had to make sure that the scanner was connected and available.

Available (new) hardware appears in the Device Manager of the Control Panel. That would be a visual clue.
In order to check this using code instructions, you would have to read the registry and check for relevant entries.
In my case the path was about there "HKEY_LOCAL_MACHINE\SYSTEM\currentcontrolset\services\usbscan\enum"

When establishing a connection via Bluetooth, you could also assume that some time is required, which you have to wait for before the subsequent code can be executed.
 

Users who are viewing this thread

Back
Top Bottom