Search found 9 matches

by jrveale
Mon Mar 01, 2021 3:49 pm
Forum: ESP32 Arduino
Topic: CAN ID hardware acceptance filtering
Replies: 3
Views: 5013

Re: CAN ID hardware acceptance filtering

Oh I think I see what I missed - my acceptance code needs shifting to the MSB, not just the acceptance mask. So, looking at the diagram from the documentation for a standard frame, if I want to only accept CAN frames with ID of 0x10 (aka 0b000 0001 0000). https://i.imgur.com/vy1er2t.png My acceptanc...
by jrveale
Fri Feb 26, 2021 3:35 pm
Forum: ESP32 Arduino
Topic: CAN ID hardware acceptance filtering
Replies: 3
Views: 5013

CAN ID hardware acceptance filtering

I'm having issues correctly setting the CAN acceptance filter to accept only messages with a particular ID. Say for example, I want to set the CAN controller to only accept messages with an ID of 0x10 (that's 0b000 0001 0000 as an 11 bit CAN ID). My understanding of the documentation (particularly t...
by jrveale
Wed Feb 24, 2021 5:40 pm
Forum: ESP32 Arduino
Topic: Checking if a file has been opened successfully in SD library
Replies: 1
Views: 2909

Checking if a file has been opened successfully in SD library

Hi, I've always thought that the way to check that an SD.open() was succesful was as follows. File myFile = SD.open("/path/to/file.txt", FILE_WRITE); if(!myFile) { // Oh no, myFile failed to open successfully } This is corroborated by all the examples I find online, and by the examples within the SD...
by jrveale
Mon Jan 18, 2021 3:37 pm
Forum: ESP32 Arduino
Topic: Compiler thinks I'm giving an int to the CAN_GENERAL_CONFIG_DEFAULT macro
Replies: 3
Views: 3862

Re: Compiler thinks I'm giving an int to the CAN_GENERAL_CONFIG_DEFAULT macro

Its the difference between C and C++. You have to cast it with: (int)canTxPin, (int) canRxPin Thanks chegewara, but the macro is expecting gpio_num_t not int. The issue was due to C vs C++ differences but was hidden within the macro and had nothing to do with my inputs. CAN_IO_UNUSED is defined as ...
by jrveale
Mon Jan 18, 2021 3:33 pm
Forum: ESP32 Arduino
Topic: Compiler thinks I'm giving an int to the CAN_GENERAL_CONFIG_DEFAULT macro
Replies: 3
Views: 3862

Re: Compiler thinks I'm giving an int to the CAN_GENERAL_CONFIG_DEFAULT macro

Solution: Expanded the macro and found the issue is that CAN_IO_UNUSED is defined as an int rather than a gpio_num_t. Replaced the macro with the expanded form, and casting CAN_IO_UNUSED to gpio_num_t. So can_general_config_t gConfig = CAN_GENERAL_CONFIG_DEFAULT(canTxPin, canRxPin, canMode); is repl...
by jrveale
Mon Jan 18, 2021 10:36 am
Forum: ESP32 Arduino
Topic: Compiler thinks I'm giving an int to the CAN_GENERAL_CONFIG_DEFAULT macro
Replies: 3
Views: 3862

Compiler thinks I'm giving an int to the CAN_GENERAL_CONFIG_DEFAULT macro

I've used CAN in the ESP-IDF succesfully and am currently porting my CAN tester program for use in the ESP32 Arduino environment. I'm having issues with the CAN_GENERAL_CONFIG_DEFAULT() macro that don't make any sense to me. See the below function (which simply wraps up a default can_driver_install(...
by jrveale
Mon Apr 01, 2019 12:52 pm
Forum: ESP32 Arduino
Topic: UUID for client application to use when connecting to ESP32's Bluetooth Serial?
Replies: 2
Views: 4486

Re: UUID for client application to use when connecting to ESP32's Bluetooth Serial?

Edit:

I have tried the usual 00001101-0000-1000-8000-00805F9B34FB with no luck.

I've also tried using a utility that can return a list of services (with their UUID) for any given Bluetooth server - but it's coming up blank.
by jrveale
Mon Apr 01, 2019 9:57 am
Forum: ESP32 Arduino
Topic: UUID for client application to use when connecting to ESP32's Bluetooth Serial?
Replies: 2
Views: 4486

UUID for client application to use when connecting to ESP32's Bluetooth Serial?

I have a PC application which needs to connect to my ESP32 via a BluetoothSerial. This program has to make the connection using the Address and UUID of the ESP32. I've found the specific Address for my chip, but I can't figure out what the UUID should be to allow the connection - can anyone help me?...