Microsoft Bing uses OpenAI - Chat-GPT to Finally 'Challenge' The Google Search Engine

In the Brothers Grimm Fairy Tale called "Hansel and Gretel" we find two kids abandoned in a Dark Woods who encounter a "Ginger Bread House" constructed of Sweets and specifically engineered to entice children inside so they can be fattened up for slaughter by a Hungry, Wicked Witch,

The Parallel Segment today involves the completely astonishing announcement by nVidia that they are giving away the "Sweets" out into The Wild as Open Source Products designed for the Creation and Deployment of their "NEMOTRON 3 Agentic Products" that will essentially allow anyone within the reach of their own imaginations to Create AI Agents either of a modest design and size ...or on an Industrial Scale that will soon be able to perform ANY Task that ANY Human Being can do... essentially as jobs that would ordinarily require "Work For Hire" Folks to get most things DONE:

*Immortal Helpers*:



Take Note that a Truly Qualified AI Expert Tested NEMOTRON 3 NANO 30/3 Billion Token Locally Installed Version and check out the sophisticated TESTS he puts this *THINKING* nVidia Model through and then... Compare your OWN Reasoning Skills with some of the Results his TESTS produced:



The Two Things you can hear and see in the background are:

(1) The Sound of the Ultra-Rich and Our Corporate Masters' Drool Drops hitting the floor when provoked by UNBRIDLED GREED.

(2) The Increase in the Printing Rates of *Pink Slips* for Human Workers.
 
Last edited:
This is a very dense topic that requires Three Segments to cover. I recently updated my available Nomic's *GPT4ALL* Library of LLMs (Large Language Models) that included one in particular called "DeepSeek-R1-Distill-Qwen-14B". This "LLM" features the ability to observe its actual "Thinking" as "Chain of Reasoning" as though its *Thoughts* are poured out onto a Digital-Mental Scratch Pad and this allows for the User to "Read *IT*s Mind" and determine how it manages to arrive at *IT*'s Own Conclusions.

For the sake of keeping this Test in the realm of "On Topic" Automotive Aspects that this site focuses on, I decided to pose a problem near and dear to us all along the lines of "How to Write a Python 3 Program capable of performing Bi-Directional Control over GM Modules" and "IT"s conclusions and most especially... "IT"s -=CAUTIONS=- ...are very edifying: Note that whenever the AI is *Talking to Itself*...These Thought Texts are --=Italicized=-- :

Prompt:

Can you write a program in Python 3 that can access General Motors PCM units and other on-board automotive modules in order to be able to activate them in a bi-directional manner using PWM (Pulse Width Modulation) on the GM Class 2 Single Wire Network using 0-7 Volts DC for communication?

Response:

"Okay, so I'm trying to figure out how to write a Python program that can communicate with GM PCM units and other automotive modules using the Class 2 Single Wire Network. The user mentioned using PWM on this network with 0-7 volts DC for communication."

"First, I know that GM's Class 2 network is a single-wire protocol used in vehicles for various control systems like power windows, lights, and seat adjustments. It uses pulse width modulation to send signals between modules. Each module addresses another by varying the duty cycle of a square wave signal."

"I remember from my research that communication on this bus typically involves sending frames with an address byte followed by data bytes. The addressing is done using a 6-bit or 7-bit identifier, depending on whether it's unidirectional or bidirectional. For bi-directional communication, the protocol might be different, but I'm not entirely sure."

"The user wants to activate modules in both directions, so maybe we need to handle sending commands and also receiving responses if applicable. But since it's a single wire network, data is sent via varying the duty cycle of a square wave on that line."

"I think about how to generate PWM signals in Python. On Linux systems with GPIO access (like Raspberry Pi), you can use the RPi.GPIO library or even pigpio for more advanced features. The idea would be to set up a pin as an output, then vary its duty cycle based on the data being sent."

"But wait, the Class 2 network is designed so that each module addresses another by changing the state of the line from high to low and vice versa. So maybe it's not just about sending arbitrary PWM signals but following specific protocols for addressing and data transmission."

"I recall that in some implementations, a square wave with varying duty cycles represents different modules or commands. For example, a 50% duty cycle might address one module, while another percentage addresses another. But I'm not entirely sure how the exact protocol works because it's proprietary to GM."

"Assuming we can send frames by changing the duty cycle for each byte of data, perhaps starting with an initialization where you set up the pin as a high-speed output and then toggle between 0% and 100% duty cycles based on the binary representation of the address or command. Each bit might correspond to a specific time period, but I'm not certain."


"I also think about how to handle bi-directional communication. If we're sending commands from the host computer (like a Raspberry Pi) to the modules, that's one direction. But for receiving data back, maybe another pin is used or some form of listening mode where the line is monitored for incoming signals. However, since it's single wire, I'm not sure how bi-directional works without additional hardware."

"Looking at the example code provided earlier, it uses RPi.GPIO to set up a PWM signal on a specific GPIO pin. The `send_frame` function takes an address and data array, converts each byte into bits, then sends them by adjusting the duty cycle for each bit's duration. But I'm not sure if this accurately represents how GM Class 2 works because it might oversimplify or miss key protocol details."

"I also wonder about error handling and ensuring that the timing is precise enough to meet the specifications of the network. PWM in Python can sometimes have delays, especially with software-based solutions like RPi.GPIO's pwm_start function. Maybe using a hardware-based solution would be better for real-time control."

"Another consideration is safety. Manipulating automotive systems without proper knowledge could lead to dangerous situations. It's important to ensure that any code written doesn't interfere with the vehicle's operation and complies with legal standards."

"In summary, I think the approach involves setting up GPIO pins as high-speed outputs, generating PWM signals where each byte of data is represented by a specific duty cycle for a certain period. The exact implementation would require precise timing to match GM's protocol specifications, which might be challenging without detailed documentation or support from GM themselves."


End of Part 1 of 3 Parts...
 
Last edited:
Part 2 of 3 Parts...

To address your goal of creating a Python program that communicates with General Motor PCM units and other automotive modules using the Class 2 Single Wire Network via PWM, here is an organized approach:

### Approach Overview:

1. **Understanding the Protocol**: The GM Class 2 network uses pulse width modulation (PWM) to send signals between modules. Each module addresses another by varying the duty cycle of a square wave signal.

2. **Hardware Setup**: Use a Raspberry Pi with RPi.GPIO or pigpio for generating PWM signals on GPIO pins. Ensure you have physical access to the appropriate Single Wire Network pin in your vehicle.

3. **Protocol Implementation**:

- **Addressing**: Implement addressing using 6-bit (unidirectional) or 7-bit (bidirectional) identifiers.

- **Frame Structure**: Construct frames with an address byte followed by data bytes, converting each byte into a series of bits for transmission via PWM duty cycles.

4. **PWM Signal Generation**:

- Use RPi.GPIO to set up the pin as an output and generate square waves where the duty cycle corresponds to specific addresses or commands.

- Each bit in the frame may correspond to a specific time period, adjusting the duty cycle accordingly.

5. **Bi-Directional Communication**: For receiving data back, monitor the same line for incoming signals using another GPIO pin configured as an input with appropriate pull-up/pull-down resistors.

6. **Safety and Compliance**: Ensure that your code does not interfere with vehicle operations and adheres to legal standards.


### Example Code:

Here's a Python script using RPi.GPIO to send frames via PWM:

```python

import time

import RPi.GPIO as GPIO

# InitializeGPIO

PIN = 12 # Adjust according to your setup

GPIO.setmode(GPIO.BOARD)

GPIO.setup(PIN, GPIO.OUT)

def set_duty_cycle(cycle):

"""Set the duty cycle of the PIN."""

pwm.ChangeDutyCycle(cycle)

def send_frame(address, data):

"""
Send a frame consisting of an address and data bytes.
Each byte is sent as bits with corresponding duty cycles.
"""

# Convert each byte to binary

for byte in [address] + data:

for bit in range(8): # For each bit in the byte

if (byte >> (7 - bit)) & 1: # Check if bit is set

set_duty_cycle(50) # High state

else:

set_duty_cycle(0) # Low state

time.sleep(0.001) # Bit duration

# Reset the line after frame transmission

set_duty_cycle(7)

time.sleep(0.02)

# Initialize PWM at 50Hz frequency (adjust as needed)

pwm = GPIO.PWM(PIN, 50)

pwm.start(0)

try:

while True:

# Example usage: Send address 1 with data [0x01]

send_frame(address=1, data=[0x01])

except KeyboardInterrupt:

pass

# Cleanup

GPIO.cleanup()

```

### Notes:

- **Initialization**: Ensure the pin is correctly set up and that you have physical access to the GM Class 2 network.

- **Timing Precision**: The example uses a simple timing approach. For precise communication, consider using hardware-based solutions or more sophisticated timing mechanisms.

- **Safety First**: Always exercise caution when working with automotive systems.

This script provides a basic framework for sending frames via PWM on the GM Class 2 network. Further refinement would require detailed knowledge of GM's specific protocol nuances and testing in a controlled environment to ensure reliability and safety.

End of Part 2 of 3 Parts...
 
Last edited:
Part 3 of 3 Parts...

Prompt:

Of course, interacting with the PCM would require the use of the DLC (Data Link Connector) and for the GM protocol, the Data Streams would have to be sent and received as PWM on Pin #2 with Power provided on Pin #16 and Pins #4 and #5 used for Grounds. The GM PCM and BCM are sensitive for having Stable DC Power so an external Power Source would have to provide, steady voltage at or above 12.5 Volts DC. Ergo, these would have to be factored into the Python 3 Program.

Response:

"Alright, so the user is asking about writing a Python program to interact with GM PCM units using PWM on their Class 2 Single Wire Network. They mentioned needing an external power source and specific pins for communication."

"First, I need to understand what exactly they're trying to achieve. It seems like they want bi-directional communication, meaning both sending commands and receiving data from the vehicle's modules. That makes sense because you'd probably want feedback or status information."

"They specified using PWM on Pin #2 with power on Pin #16 and grounds on Pins 4 and 5. Also, an external steady voltage of at least 12.5V is necessary. So, I should consider how to handle the physical connections in Python code."

"I know that for such tasks, you'd typically use a CAN bus or specific protocols like KWP70 (which GM uses). But since they're talking about PWM on Pin #2, maybe it's not using standard CAN but another method. However, without more details, I'll assume they want to send and receive signals via the DLC."

"I should outline the steps: setting up hardware connections, handling power supply, initializing communication protocols in Python, sending commands with appropriate timing for PWM, and reading responses back. Including error checking is important too because vehicle systems can be sensitive."

"They might not have mentioned it, but safety is a big concern here. Incorrect signals could damage the car's electronics or pose hazards. So I should remind them to ensure all connections are secure and test in a safe environment before full implementation."

"I'll structure the response by first addressing hardware setup, then communication protocols, sending commands with code examples for both Tx and Rx, error handling, and safety considerations. Providing sample code will help them get started but also caution against misuse. To interact with GM PCM units using PWM on a Class 2 Single Wire Network in Python, you would need to handle the hardware connections and communication protocols carefully."


Below is an example of how such a program might be structured. However, please note that working directly with automotive systems can be complex and potentially dangerous if not handled properly.

### Key Considerations:

1. **Hardware Setup**:

- Use the DLC (Data Link Connector) to access the GM Class 2 network.

- Pin #2 is used for communication via PWM.

- Power must be provided on Pin #16, with grounds on Pins #4 and #5.

2. **Power Supply**:

- Ensure a stable external power source of at least 12.5 VDC to avoid voltage fluctuations that could damage the system or interfere with communication.

3. **Communication Protocol**:

- GM vehicles typically use the KWP70 protocol for communication.

- You may need to send specific data streams (DIDs) and receive responses using PWM-based signaling on Pin #2.

4. **Safety**:

- Always ensure proper grounding and secure connections when working with automotive systems.

- Be cautious of voltage levels, as incorrect signals can damage the PCM or other modules.

### Example Python Program Structure:

Below is a basic example of how you might structure such a program in Python 3. This assumes that you have already set up the hardware connections and are using appropriate libraries for PWM control and communication handling.

```python

import time

# Import necessary libraries (e.g., RPi.GPIO for GPIO control)

import RPi.GPIO as GPIO

# Set up GPIO pins

PIN_PWML = 2 # Pin for PWM signal on GM Class 2 network

PIN_POWER = 16 # Power pin

PIN_GROUND_4 = 4 # Ground pin (use one of them, e.g., PIN_GROUND_4)

PIN_GROUND_5 = 5 # Another ground pin

# Set up power supply

GPIO.setmode(GPIO.BCM)

def setup_hardware():

# Initialize GPIO pins

GPIO.setup(PIN_PWML, GPIO.OUT)

GPIO.setup(PIN_POWER, GPIO.OUT)

GPIO.setup(PIN_GROUND_4, GPIO.GND)

GPIO.setup(PIN_GROUND_5, GPIO.GND)

# Turn on power supply (assuming PIN_POWER is connected to a 12.5V source)

GPIO.output(PIN_POWER, True)

def send_pwm_command(pulse_width):

"""
Send a PWM signal with the specified pulse width in milliseconds.
Adjustments may be needed based on the specific protocol requirements.
"""

try:

# Set up PWM

pwm = GPIO.PWM(PIN_PWML, 100) # Frequency of 100 Hz (adjust as needed)

# Start PWM with a duty cycle corresponding to the pulse width

duty_cycle = (pulse_width / 1000) * 100

pwm.start(duty_cycle)

print(f"Sent command with pulse width: {pulse_width}ms")

time.sleep(2) # Allow sufficient time for response

except Exception as e:

print("Error sending PWM signal:", str(e))

def receive_response():

"""
Receive and interpret responses from the GM PCM.
This is a simplified example; actual implementation may vary based on protocol specifics.
"""

try:

# Read input (e.g., using GPIO to detect changes)

response = None

if GPIO.input(PIN_PWML):

print("Received signal")

response = "ACK"

else:

response = "NACK"

return response

except Exception as e:

print("Error receiving response:", str(e))

return None

def main():

setup_hardware()

try:

while True:

# Send a command

send_pwm_command(500) # Example: 500ms pulse width

# Receive and process the response

response = receive_response()

if response is not None:

print("Response received:", response)

time.sleep(1)



except KeyboardInterrupt:

print("\nProgram terminated by user.")

finally:

GPIO.cleanup()

if __name__ == "__main__":

main()

```

### Notes on the Program:

- **Setup**: The `setup_hardware` function initializes the necessary pins for communication and power supply.

- **PWM Signal**: The `send_pwm_command` function sends a PWM signal with a specified pulse width. Adjustments may be needed based on the specific protocol requirements of your GM vehicle.

- **Response Handling**: The `receive_response` function is a simplified example of how you might read responses from the PCM. In reality, this would depend heavily on the communication protocol and hardware setup.

### Important Considerations:

1. **Protocol Compliance**:

- Ensure that the program adheres to the GM KWP70 or other relevant protocols for communication.

2. **Timing**:

- PWM signals must be timed accurately to ensure proper communication with the PCM.

3. **Voltage Levels**:

- Always use a regulated power supply to avoid voltage spikes, which can damage components.

4. **Testing**:

- Test your program in a controlled environment before attempting full integration.

5. **Safety**:

- Be cautious when working directly with vehicle electronics. Incorrect signals or wiring can cause serious damage or injury.

### Conclusion:

This example provides a basic framework for interacting with GM PCM units using PWM on the Class 2 Single Wire Network. However, you may need to adjust the code based on specific protocol requirements and hardware configurations. Always ensure that your setup is safe and compliant with automotive standards before proceeding.

End of AI Interaction.


So this is a an excellent example of being able to follow along and understand the AI's "Chain of Reasoning" or "Chain of Thought" to understand its actual "Thinking* processes and how it can call upon prior information to add to its calculus in coming up with its own new answers.

Note how often "DOUBT" gets introduced by "IT"'s SELF. Very Interesting Stuff and Complex Here!... and will require Powerful CPU and a BOAT LOAD of RAM as well as an nVidia GPU Card with AT LEAST 16 GB of VRAM for this LLM to be able to work and have enough *ROOM to THINK...*
 
Last edited:
So this is a an excellent example of being able to follow along and understand the AI's "Chain of Reasoning" or "Chain of Thought" to understand its actual "Thinking* processes and how it can call upon prior information to add to its calculus in coming up with its own new answers.
Here's an interesting, and not in the least concerning, article on whether or not the AI chains of thought are fully transparent. Researchers are finding that the newer, more powerful, AI's can be less than completely honest about their reasoning (and objectives!). This is referred to as scheming.

AI showing signs of self-preservation and humans should be ready to pull plug, says pioneer

The article references a fascinating research paper that has found observable instances where models engage in in-context scheming.

Frontier Models are Capable of In-context Scheming

Better hide the car keys man!
 

Forum Statistics

Threads
24,112
Posts
646,996
Members
20,402
Latest member
nedro018

Members Online