I am currently trying to write some test scripts to get a bluetooth device fcc certified. I have been following these two sites http://processors.wiki.ti.com/index.php/CC256x_VS_HCI_Commands,
http://processors.wiki.ti.com/index.php/WL18xx_Bluedroid_Bluetooth_RF_Testing. I've been using the later to convert commands from the former into tests that the bluedroid test tool will recognize. I have had success for the most part, but I need away to turn on BLE advertising mode and cannot find a way to do it. The bluetooth chip I am using is a Pan13xx from Panasonic. If anyone could point me in the right direction that would be amazing.
Thanks in advance.
I haven't tried this, but according to the Bluetooth 4.2 spec (Vol 2, Part E, 7.8.9 Page 1284):
HCI_LE_Set_Advertise_Enable is the command for starting/stopping advertising.
It takes an Advertising_Enable parameter which is defined as:
0x00: Advertising is disabled (default)
0x01: Advertising is enabled.
0x02 – 0xFF: Reserved for future use Value
and returns Status which is defined as:
0x00: LE_Set_Advertise_Enable command succeeded
0x01 – 0xFF: LE_Set_Advertise_Enable command failed
Related
Can anyone please explain how to establish a communication between stm32 dev board and gps module? I am not knowing how to send AT commands to gps module through MC through a source file through UART. Please clarify me in this aspect.
There is a lot of literature on STM32 and UARTs on the web. If I were you I would download the STM32CubeMX. This program generates most of the code for you. You select your processor (or development board), select the clocks and peripherals, and click Generate Code. It also comes with very handy example projects, and might even have a complete project with a working UART that you can put straight onto your board.
And I would first make sure my UART is fully working before connecting the GPS. This you can do by trying to echo. Connect your TX and RX pins with a wire. Then, everything you transmit you will receive as well. It's a easy test to see if everything is working.
I would also work through the TrueStudio IDE. It basically works plug and play
If you use the ublox module, you must use a serial port to communicate.
You have to connect RXD(ublox) to TXD(micro) and TXD(Ublox) to RXD(micro) ,
and config your StmCubemx like This :
http://wiki.sunfounder.cc/index.php?title=Ublox_NEO-6M_GPS_Module
Config Stm32 :
[Step 1: https://i.stack.imgur.com/1B4Ed.jpg ]
[Step 2: https://i.stack.imgur.com/6ULOm.jpg]
[Step 3: https://i.stack.imgur.com/GD0VL.jpg]
If you have another question, please ask
First of all, I think you should test AT command with module sim through (USB to UART) to PC in order to understand procedure operation, such as: module sim - TCP/IP - thingspeak server. The next time, you can refer this link for code: https://bitbucket.org/mbari_peter/sim800-mqtt-ravi/src/78e36076c89b4618cf57a538f0c70f91b2b876dd/modemDrivers.ino?at=master&fileviewer=file-view-default
If you have any questions or encounter any problems, you can ask! Thanks for reading!
Typically, GPS sends data # 1 Hz after starting up. You just need to capture this NMEA sentences and filter the receive buffer according to your requirement.
Try using UART receive interrupt. Make sure the baud rate of both GPS module and STM32 are same.
I have an infrared thermometer which operates on a virtual serial port over USB, which I am trying to use on a Linux intel and next on a raspberry Pi. The system did not enumerate a /dev/ttyUSB device.
I found a piece of a solution here :
Cygnal Integrated Products serial port on Linux
I reprogrammed the product_ID and can now see it as /dev/ttyUSB0.
But trying to talk to the thermometer with minicom doesn't work.
minicom keeps saying "disconnected" despite the "9600 8N1" indication.
I must say, I had many attempt to work with this kind of communication over USB/serial adapter trying using many different terminal emulator like screen or minicom but without any success at all !
I'm not even sure about the right way to send request and receive data.
Here is the documentation I'm using trying to talk to the thermometer :
http://www.optris.com/interfaces?file=tl_files/downloads/Manuals/addendums-de-en/ct-ctlaser-commands.pdf
Edit :
I'm now trying to use PySerial Python library in a Python script with an Arduino as a target (to act as my thermometer, the arduino runs a simple code that takes the data received and send them back to my Python console.) But still, there is so many confusion possible between ASCII, Hexa, binary, that I'm not capable of debugging anything as I don't know where the transformation between different format takes place !
The communication is working as I can get some data forth and back from my Python console through the Arduino. But I can't get sending hexadecimal data and getting any response back in hexadecimal format. + You say "Your latest question puts you in the off-topic category. ", what do you mean ? Sorry of being so confused.
I know that UART0 is used as U-Boot's console input and output. I would like to be able to write data to the UART1, which is connected with another device, but I cannot find how to configure U-Boot to use it.
I have a Netduino Plus with at transeiver attached via SPI. I would like to reset the transiever every time the Netduino restarts. Is it possible to programmatically power on/off the 3V3 pin?
I would recommend using a FET (controlled by one of the I/O) pins to enable/disable 3V3 power to your transceiver. When you say transceiver, I think "more than a few mA" :)
BTW, we took this feedback into account with the new Shield Base module for Netduino Go. It has an integrated FET on both 3V3 and 5V power headers, so you could enable/disable power to your shield in code. Once the new Ethernet go!bus module ships and the Shield Base comes out of beta (soon), your solution can be redeployed to Netduino Go + Shield Base with few/no code changes.
Chris
Secret Labs LLC
Looking at the circuit diagram ( http://www.netduino.com/netduinoplus/schematic.pdf ), I can see only the Micro SD Card Slot having its power controlled programmatically. You could rig up a relay to control it (via a transistor, of course) instead, or if the transceiver uses less than 130mA (the current limit of the device shown: http://www.datasheetarchive.com/BSS84W-7-F-datasheet.html) you could copy the circuit from the Netduino Plus. Buying a relay shield looks like overkill, but you might have other uses for it.
Have you looked into resetting the transceiver programmatically instead of the brute-force method of power-cycling it?
Just to provide another view. You could use a transistor powered off the netduino RESET line, this will reset the device every time the netduino reboots. Or you can just link the transistor to a spare digital pin and power it in code..
What specific SPI device are you using? You mention that it's a transceiver but we could probably provide better information if we know the exact part number. If your device requires less than 8mA the Netduino Plus specs seem to indicate that one option could be using a digital output pin as the power source.
Unfortunately Secret Labs don't use exactly the language I'd expect and call out the sink and source current maximums so I would contact them directly first to see if you risk blowing your chip. I'll see if I can get an answer from them and amend this post if/when I do.
Update: Sink and source current is the same on the Netduino. See my post on their forums about sink vs. source current for a more in depth explanation. So, if your device can run off of just a few milliamps you should be able to use a digital I/O pin to power it.
Also, a lot of devices have enable pins. You can usually reset them with that line instead of pulling the power if that helps. Sometimes with flaky hardware it is better to pull the power though.
I'd like to start coding against an ELM327 based automotive OBD-II Bluetooth adapter in iOS/Objective-C. Is there a guide/primer on how to get started?
I would imagine the ELM327 adapter is a serial device... I can probably figure out how to establish a Bluetooth connection with the phone, but I haven't any idea where to start with sending/receiving OBD-II messages to/from it.
Is there a pre-existing API for this device?
If you need some OBDKey specific commands let me know. As an example, to access the RPM data, issue the following commands
ATZ\r
ATSP0\r
0100\r
010C\r
These instructions will initialise the OBDKey interface, set the protocol search on to automatic, initialise communcations with the engine managment ECU and send the mode 1 PID 0C command to request engine speed (RPM) data. The value returned in response to the 010C command is actually four time the real engine speed value.
Using sockets and streams in iOS / Objective-C is the best way to set up communications to the OBDKey WLAN (the default IP address is 192.168.0.74, port 23).
The elm327 odb2 device uses AT and ODB commands.
The AT commands are the same as you use on modems, they always start with AT.
When the devices initializes it sends
ELM327 v2.1
>
If you send
ATZ
this will reset device and it will issue "ELM327 v2.1" and > prompt again.
AT commands are used to manage the elm327 device.
ODB commands are in asci hex such as the above example
01 0c
to get the rpm or
01 05
to get coolant temp
At http://www.elmelectronics.com/obdic.html there are data sheet pdf files with more details.
Also you can search ituns for "elm327" and get 2 free books on the subject.
I'm just starting the same project for my generic elm327 wifi device so I dont have any details yet.
I will add comments as soon as I learn anything useful.